Revision 0467b6cd snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember/routers.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember/routers.js
16 16

  
17 17
Synnefo.ApplicationRoute = Ember.Route.extend({
18 18
	model: function() {
19
		return {email: 'athina@mail.com'};
19
		return this.store.find('account', 1);
20 20
	},
21 21
	redirect: function() {
22 22
		//  have to set vm navigation icon full
......
68 68
/* Wizards Routes */
69 69

  
70 70
Synnefo.CreateRoute = Ember.Route.extend({
71
	model: function(){
72
		return [{name: 'vm-wizard'}]
73
	},
71

  
74 72
	renderTemplate: function(controller) {
75
		this.render('wizard',{controller: controller});
73
		this.render('wizard', {controller: controller}); // template
76 74
	},
77
/*	beforeModel: function() {
75

  
76
	/*	beforeModel: function() {
78 77
		this._super();
79 78
		console.log('beforeModel ',this.get('router.url'))
80 79
		this.previousRoute = this.get('router.url'); // should return the current path but some times it returns the path where the user was before (when i dont type the url of the wizard)
81 80
	},
82 81
	previousRoute: undefined,*/
82

  
83
	setupController: function(controller) {
84
		controller.set('image', this.store.find('image'));
85
		controller.set('account', this.store.find('account', 1));
86
	},
83 87
	actions: {
84 88
		closeWizard: function() {
85 89
			history.back();
......
88 92
});
89 93

  
90 94
Synnefo.VmsCreateRoute = Synnefo.CreateRoute.extend({
91
	model: function() {
92
		return Synnefo.wizards.vmWizard;
93
	}
95

  
94 96
});
95 97

  
96 98
Synnefo.NetworksCreateRoute = Synnefo.CreateRoute.extend();

Also available in: Unified diff