Revision f6cfe41c snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/vm-wizard.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/vm-wizard.js
238 238
		$(area).find('.snf-checkbox-unchecked.prechecked').toggleClass('snf-checkbox-checked snf-checkbox-unchecked');
239 239
		$('.expand-link').find('.snf-arrow-up.preselected').toggleClass('snf-arrow-up snf-arrow-down');
240 240
		$('.step-1').addClass('current');
241
		
242
		$('.os li').hide();
243
		$('#vm-wizard .top .sub-menu[data-step=1] .preselected').data('img-type')
244
		$('.os').find('.'+$('#vm-wizard .top .sub-menu[data-step=1] .preselected').data('img-type')).show();
241 245
	},
242 246

  
243 247
	pickResources: function(resource) {
244 248
		$('.flavor .with-flavor a:not(.' + resource + ')').removeClass('current');
245 249
		$('.flavor .with-flavor a.' + resource + '').addClass('current');
250
	},
251

  
252
	showImageCategory: function(imagesCategory) {
253
		$(imagesCategory).closest('.sub-menu').find('.current').removeClass('current');
254
		$(imagesCategory).addClass('current');
255
		$('.os li').hide();
256
		$('.os .details').hide();
257
		selectedImages = $(imagesCategory).data('img-type');
258
		$('.os').find('.'+selectedImages).fadeIn();
259
		
260
	
246 261
	}
247 262

  
248 263
}
......
441 456
	ui.wizard.btns.close.click(function() {
442 457
		ui.wizard.close();
443 458
	});
459
	
460
	$('.os .system-images').show();
461

  
462
	$('#vm-wizard .top .sub-menu[data-step=1] a').click(function() {
463
		ui.wizard.showImageCategory(this);
464
	})
444 465
});

Also available in: Unified diff