Revision 49342f82

b/snf-cyclades-app/synnefo/ui/new_ui/ui/index.html
29 29
			</div>
30 30
		</header>
31 31
		<div class="body-wrapper">
32
			{{outlet 'wizard'}}
33
			<section class="main row">
34
				{{outlet}}
35
			</section>
32
			{{outlet}}
36 33
		</div>
37 34
	</script>
38 35

  
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember.js
194 194
// I defined the above resource to extend its Route
195 195
this.resource('sections', {'path':'/'});
196 196
for(var i=0; i<Synnefo.conf.sectors.length; i++)
197
	this.resource(Synnefo.conf.sectors[i].destination/*, function() {
198
		this.route('grid');
199
		this.route('list');
200
	}*/);
197
	this.resource(Synnefo.conf.sectors[i].destination, function() {
198
		// this.route('grid');
199
		// this.route('list');
200
		this.route('create');
201
	});
201 202
});
202 203

  
203 204

  
......
211 212
		//  have to set vm navigation icon full
212 213
		this.transitionTo('vms');
213 214
	},
214
	actions: {
215
		openWizard: function() {
216
			console.log('2');
217
			return this.render('wizard', {
218
				into: 'application',
219
				outlet: 'wizard'
220
			});
221
		}
222
	}
223 215
});
224 216

  
225 217
Synnefo.SectionsRoute = Ember.Route.extend({
......
229 221
	},
230 222
	renderTemplate: function(controller) {
231 223
		this.render('snfElems', {controller: controller});
224
	},
225
	actions: {
226
		openWizard: function() {
227
			var wizardType = this.routeName;
228
			this.transitionTo(wizardType+'.create')
229
		}
232 230
	}
233 231
});
234 232

  
233
Synnefo.CreateRoute = Ember.Route.extend({
234
	model: function(){
235
		return {name: 'vm-wizard'}
236
	},
237
	renderTemplate: function(controller) {
238
		this.render('wizard',{controller: controller});
239
	}
240
});
235 241

  
236 242
Synnefo.VmsRoute = Synnefo.SectionsRoute.extend({
237 243
	modelName: 'vm'
......
253 259
	modelName: 'userImage'
254 260
});
255 261

  
262
Synnefo.VmsCreateRoute = Synnefo.CreateRoute.extend({});
263

  
264
Synnefo.NetworksCreateRoute = Synnefo.CreateRoute.extend({});
265

  
266
Synnefo.VolumesCreateRoute = Synnefo.CreateRoute.extend({});
267

  
268
Synnefo.SnapshotsCreateRoute = Synnefo.CreateRoute.extend({});
269

  
270
Synnefo.ImagesCreateRoute = Synnefo.CreateRoute.extend({});
256 271

  
257 272

  
258 273

  
......
265 280
		Synnefo.set('currentPath', this.get('currentPath'))
266 281
		return this.get('currentPath');
267 282
	}.observes('currentPath'),
268
	actions: {
269
		test: function() {
270
			console.log('This is test from Synnefo.ApplicationController');
271
			return 0;
272
		}
273
	},
274 283

  
275 284
	pageTitle : function() {
276 285
		var currentPath =this.get('currentPath');
......
342 351
	createBtn: false,	
343 352
	actions: {
344 353
		shutdown: function(param) {
345
			console.log(this.get('model.status'));
346 354
			this.set('model.status', 'shutting');
347 355
		},
348 356
		destroyElement: function(param) {
......
491 499
		}
492 500
	}.property(),
493 501
		click: function () {
494
	        // var type = this.get('type');
495
	        // var wizardEl = $('#'+ type.substring(0, type.length - 1)+'-wizard');
496
	        // $('.overlay-area-custom').fadeIn(100);
497
	        // $('body').addClass('with-overlay');
498
	        // wizardEl.fadeIn('slow');
499
	        console.log('1');
500 502
	        this.sendAction('action');
501 503
		}
502 504
});
......
504 506
Synnefo.LoginMenuComponent = Ember.Component.extend({
505 507
	classNames: ['login'],
506 508
	didInsertElement: function() {
507
		console.log('didInsertElement');
508 509
		var self = this.$();
509 510
		self.mouseenter(function(e){
510 511
	        self.find('ul').stop(true, true).slideDown(200);
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);
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates.js
198 198
function program1(depth0,data) {
199 199
  
200 200
  var buffer = '';
201
  data.buffer.push("\n		");
201
  data.buffer.push("\n			");
202 202
  data.buffer.push(escapeExpression(helpers.view.call(depth0, "Synnefo.ElemView", {hash:{},hashTypes:{},hashContexts:{},contexts:[depth0],types:["ID"],data:data})));
203
  data.buffer.push("\n	");
203
  data.buffer.push("\n		");
204 204
  return buffer;
205 205
  }
206 206

  
207
  data.buffer.push("<div ");
207
  stack1 = helpers._triageMustache.call(depth0, "outlet", {hash:{},hashTypes:{},hashContexts:{},contexts:[depth0],types:["ID"],data:data});
208
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
209
  data.buffer.push("\n<section class=\"main row\">\n	<div ");
208 210
  data.buffer.push(escapeExpression(helpers['bind-attr'].call(depth0, {hash:{
209 211
    'class': (":entities :list-view")
210 212
  },hashTypes:{'class': "STRING"},hashContexts:{'class': depth0},contexts:[],types:[],data:data})));
211
  data.buffer.push(">\n<ul class=\"items-list\">\n	");
213
  data.buffer.push(">\n	<ul class=\"items-list\">\n		");
212 214
  data.buffer.push(escapeExpression((helper = helpers['add-new'] || (depth0 && depth0['add-new']),options={hash:{
213 215
    'type': ("controller.type"),
214 216
    'action': ("openWizard")
215 217
  },hashTypes:{'type': "ID",'action': "STRING"},hashContexts:{'type': depth0,'action': depth0},contexts:[],types:[],data:data},helper ? helper.call(depth0, options) : helperMissing.call(depth0, "add-new", options))));
216
  data.buffer.push("\n	");
218
  data.buffer.push("\n		");
217 219
  stack1 = helpers.each.call(depth0, {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[],types:[],data:data});
218 220
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
219
  data.buffer.push("\n</ul>\n</div>");
221
  data.buffer.push("\n	</ul>\n	</div>\n</section>");
220 222
  return buffer;
221 223
  
222 224
});
......
239 241
  
240 242

  
241 243

  
242
  data.buffer.push("<section class=\"overlay-area-custom\">\n	<div id=\"vm-wizard\" class=\"overlay-div wizard\">\n	</div>\n</section>");
244
  data.buffer.push("<section class=\"overlay-area-custom\">\n	<div id=\"vm-wizard\" class=\"overlay-div wizard\">\n		<h2>Wizard</h2>\n	</div>\n</section>");
243 245
  
244 246
});
245 247

  
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/snfElems.hbs
1
<div {{bind-attr class=":entities :list-view"}}>
2
<ul class="items-list">
3
	{{add-new type=controller.type action="openWizard"}}
4
	{{#each}}
5
		{{view Synnefo.ElemView}}
6
	{{/each}}
7
</ul>
8
</div>
1
{{outlet}}
2
<section class="main row">
3
	<div {{bind-attr class=":entities :list-view"}}>
4
	<ul class="items-list">
5
		{{add-new type=controller.type action="openWizard"}}
6
		{{#each}}
7
			{{view Synnefo.ElemView}}
8
		{{/each}}
9
	</ul>
10
	</div>
11
</section>
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/wizard.hbs
1 1
<section class="overlay-area-custom">
2 2
	<div id="vm-wizard" class="overlay-div wizard">
3
		<h2>Wizard</h2>
3 4
	</div>
4 5
</section>

Also available in: Unified diff