Revision 9ca32eaa

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js
643 643
        e.preventDefault();
644 644
        e.stopPropagation();
645 645
        ui.changeCheckboxState(this);
646
        console.log('check clicked');
647
        var parentLi = $(this).closest('li');
648
        if (parentLi.hasClass('with-checkbox') && parentLi.hasClass('has-more')) {
649
            $(this).parent().next('.more').stop().slideToggle(400, function() {
650
                if ($(this).parent().next('.more:visible').length != 0) {
651
                    $(this).find('span').removeClass('snf-checkbox-unchecked').addClass('snf-checkbox-checked');
652
                } else {
653
                    $(this).find('span').removeClass('snf-checkbox-checked').addClass('snf-checkbox-unchecked');
654
                }
655
            });
656
        }
646 657
    });
647 658

  
648 659
    // for checkboxes created after document.ready
......
654 665

  
655 666

  
656 667
    $('.with-checkbox').click(function(e){
657
        e.preventDefault();
658
        e.stopPropagation();
659
        var checkbox = $(this).find('.check');
660
        ui.changeCheckboxState(checkbox);
668
        console.log('with-checkbox');
669
        $(this).find('.check').trigger('click');
661 670
    });
662 671

  
663 672
    $('.with-checkbox').find('a').click(function(e){
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/wizard.js
464 464
				e.preventDefault();
465 465
				ui.expandDownArea(this, wizard.find('.advanced-conf-options'));
466 466
			});
467

  
468

  
469
			// reaction li.click *
470
			wizard.find('.advanced-conf-options .with-checkbox').click(function(e) {
471
				e.preventDefault();
472
				$(this).find('.check').trigger('click');
473
			});
474

  
475
			// reaction a.click *
476
			$('.with-checkbox .check').click(function(e) {
477
				e.stopPropagation();
478
				console.log('hi');
479
				var self = this;
480
				if ($(this).closest('.with-checkbox').hasClass('has-more')) {
481
					$(this).parent().next('.more').stop().slideToggle(400, function() {
482
						if ($(self).parent().next('.more:visible').length != 0) {
483
							$(self).find('span').removeClass('snf-checkbox-unchecked').addClass('snf-checkbox-checked');
484
						} else {
485
							$(self).find('span').removeClass('snf-checkbox-checked').addClass('snf-checkbox-unchecked');
486
						}
487
					});
488
				}
489
			});
490 467
		}
491 468
		else if (wizardType == 'network-wizard') {
492 469

  

Also available in: Unified diff