Revision 49342f82 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember/ember-all.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember/ember-all.js
4 4
// I defined the above resource to extend its Route
5 5
this.resource('sections', {'path':'/'});
6 6
for(var i=0; i<Synnefo.conf.sectors.length; i++)
7
	this.resource(Synnefo.conf.sectors[i].destination/*, function() {
8
		this.route('grid');
9
		this.route('list');
10
	}*/);
7
	this.resource(Synnefo.conf.sectors[i].destination, function() {
8
		// this.route('grid');
9
		// this.route('list');
10
		this.route('create');
11
	});
11 12
});
12 13

  
13 14

  
......
21 22
		//  have to set vm navigation icon full
22 23
		this.transitionTo('vms');
23 24
	},
24
	actions: {
25
		openWizard: function() {
26
			console.log('2');
27
			return this.render('wizard', {
28
				into: 'application',
29
				outlet: 'wizard'
30
			});
31
		}
32
	}
33 25
});
34 26

  
35 27
Synnefo.SectionsRoute = Ember.Route.extend({
......
39 31
	},
40 32
	renderTemplate: function(controller) {
41 33
		this.render('snfElems', {controller: controller});
34
	},
35
	actions: {
36
		openWizard: function() {
37
			var wizardType = this.routeName;
38
			this.transitionTo(wizardType+'.create')
39
		}
42 40
	}
43 41
});
44 42

  
43
Synnefo.CreateRoute = Ember.Route.extend({
44
	model: function(){
45
		return {name: 'vm-wizard'}
46
	},
47
	renderTemplate: function(controller) {
48
		this.render('wizard',{controller: controller});
49
	}
50
});
45 51

  
46 52
Synnefo.VmsRoute = Synnefo.SectionsRoute.extend({
47 53
	modelName: 'vm'
......
63 69
	modelName: 'userImage'
64 70
});
65 71

  
72
Synnefo.VmsCreateRoute = Synnefo.CreateRoute.extend({});
73

  
74
Synnefo.NetworksCreateRoute = Synnefo.CreateRoute.extend({});
75

  
76
Synnefo.VolumesCreateRoute = Synnefo.CreateRoute.extend({});
77

  
78
Synnefo.SnapshotsCreateRoute = Synnefo.CreateRoute.extend({});
79

  
80
Synnefo.ImagesCreateRoute = Synnefo.CreateRoute.extend({});
66 81

  
67 82

  
68 83

  
......
75 90
		Synnefo.set('currentPath', this.get('currentPath'))
76 91
		return this.get('currentPath');
77 92
	}.observes('currentPath'),
78
	actions: {
79
		test: function() {
80
			console.log('This is test from Synnefo.ApplicationController');
81
			return 0;
82
		}
83
	},
84 93

  
85 94
	pageTitle : function() {
86 95
		var currentPath =this.get('currentPath');
......
152 161
	createBtn: false,	
153 162
	actions: {
154 163
		shutdown: function(param) {
155
			console.log(this.get('model.status'));
156 164
			this.set('model.status', 'shutting');
157 165
		},
158 166
		destroyElement: function(param) {
......
301 309
		}
302 310
	}.property(),
303 311
		click: function () {
304
	        // var type = this.get('type');
305
	        // var wizardEl = $('#'+ type.substring(0, type.length - 1)+'-wizard');
306
	        // $('.overlay-area-custom').fadeIn(100);
307
	        // $('body').addClass('with-overlay');
308
	        // wizardEl.fadeIn('slow');
309
	        console.log('1');
310 312
	        this.sendAction('action');
311 313
		}
312 314
});
......
314 316
Synnefo.LoginMenuComponent = Ember.Component.extend({
315 317
	classNames: ['login'],
316 318
	didInsertElement: function() {
317
		console.log('didInsertElement');
318 319
		var self = this.$();
319 320
		self.mouseenter(function(e){
320 321
	        self.find('ul').stop(true, true).slideDown(200);

Also available in: Unified diff