Revision 969d4e10 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/wizard.js
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/wizard.js | ||
---|---|---|
180 | 180 |
} |
181 | 181 |
else if(wizardType == 'network-wizard') { |
182 | 182 |
wizard.find('li .manual .input').hide(); |
183 |
wizard.find('ul.subnet_options').parent('li').show();
|
|
183 |
wizard.find('ul.subnet-options').parent('li').show();
|
|
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
ui.wizard.currentStep = 1; |
... | ... | |
198 | 198 |
wizard.find('.current').not('.preselected').removeClass('current'); |
199 | 199 |
wizard.find('.preselected').not('.current').addClass('current'); |
200 | 200 |
wizard.find('.custom.dropdown.medium a:first').addClass('current'); // to fix |
201 |
wizard.find('.snf-radio-checked').not('.prechecked').toggleClass('snf-radio-checked snf-radio-unchecked'); |
|
202 |
wizard.find('.snf-radio-unchecked.prechecked').toggleClass('snf-radio-checked snf-radio-unchecked'); |
|
203 |
wizard.find('.snf-checkbox-checked').not('.prechecked').toggleClass('snf-checkbox-checked snf-checkbox-unchecked'); |
|
204 |
wizard.find('.snf-checkbox-unchecked.prechecked').toggleClass('snf-checkbox-checked snf-checkbox-unchecked'); |
|
201 |
ui.radiobtn.reset(wizard); |
|
202 |
ui.checkbox.reset(wizard); |
|
205 | 203 |
wizard.find('.snf-arrow-up.preselected').toggleClass('snf-arrow-up snf-arrow-down'); |
206 | 204 |
if(wizardType == 'vm-wizard') { |
207 | 205 |
var preselectedImgCategory = wizard.find('.top .sub-menu[data-step=1] .preselected').data('img-type'); |
... | ... | |
465 | 463 |
ui.expandDownArea(this, wizard.find('.advanced-conf-options')); |
466 | 464 |
}); |
467 | 465 |
} |
468 |
else if (wizardType == 'network-wizard') { |
|
469 | 466 |
|
470 |
wizard.find('.network_options .check').click(function(e){ |
|
471 |
e.preventDefault(); |
|
472 |
e.stopPropagation(); |
|
473 |
this.blur(); |
|
474 |
$(this).parents('li').siblings().find('ul.subnet_options').parent('li').toggle(); |
|
475 |
}); |
|
476 |
|
|
477 |
wizard.find('.network_options .dhcp_option').click(function(e){ |
|
478 |
e.preventDefault(); |
|
479 |
$(this).find('.check').trigger('click'); |
|
480 |
}); |
|
481 |
|
|
482 |
wizard.find('.network_options .radio_btn').click(function(e){ |
|
483 |
e.preventDefault(); |
|
484 |
e.stopPropagation(); |
|
485 |
this.blur(); |
|
486 |
var state = $(this).find('span'); |
|
487 |
if(state.hasClass('snf-radio-checked')) { |
|
488 |
if($(this).hasClass('manual')) { |
|
489 |
$(this).siblings('.input').show(); |
|
490 |
} |
|
491 |
else { |
|
492 |
$(this).closest('li').siblings('.manual').find('.input').hide(); |
|
493 |
} |
|
494 |
} |
|
495 |
}); |
|
496 |
|
|
497 |
wizard.find('.subnet_options>li').click(function(e) { |
|
498 |
$(this).find('.radio_btn').trigger('click'); |
|
499 |
}) |
|
500 |
} |
|
501 | 467 |
else if (wizardType == 'volume-wizard') { |
502 | 468 |
// step-1 |
503 | 469 |
wizard.find('.volume_options .options a').hover( |
... | ... | |
513 | 479 |
$(this).addClass('current'); |
514 | 480 |
} |
515 | 481 |
}); |
516 |
|
|
517 |
//step-2 |
|
518 |
wizard.find('.vms-list a').click(function(e) { |
|
519 |
e.preventDefault(); |
|
520 |
e.stopPropagation(); |
|
521 |
ui.checkOneRadioButton(this); |
|
522 |
ui.changeRadiobuttonState(this); |
|
523 |
}); |
|
524 |
|
|
525 |
wizard.find('.vms-list li').click(function(e) { |
|
526 |
e.preventDefault(); |
|
527 |
$(this).find('a').trigger('click'); |
|
528 |
}); |
|
529 |
|
|
530 | 482 |
} |
531 | 483 |
|
532 |
else if(wizardType == 'snapshot-wizard') { |
|
533 |
wizard.find('.vms-list a').click(function(e) { |
|
534 |
e.preventDefault(); |
|
535 |
e.stopPropagation(); |
|
536 |
ui.checkOneRadioButton(this); |
|
537 |
ui.changeRadiobuttonState(this); |
|
538 |
}); |
|
539 |
|
|
540 |
wizard.find('.vms-list li').click(function(e) { |
|
541 |
e.preventDefault(); |
|
542 |
$(this).find('a').trigger('click'); |
|
543 |
}); |
|
544 |
} |
|
545 | 484 |
} |
546 | 485 |
|
547 | 486 |
}) |
Also available in: Unified diff