Revision 8db75456 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js
36 36
}
37 37

  
38 38
ui.cntCheckbox = function(){ 
39
    var all = $('.checkbox-checked').length;
40
    var running = $('.checkbox-checked').parents('.container').find('.running').length;
41
    var stopped = $('.checkbox-checked').parents('.container').find('.stopped').length;
39
    var all = $('.snf-checkbox-checked').length;
40
    var running = $('.snf-checkbox-checked').parents('.container').find('.running').length;
41
    var stopped = $('.snf-checkbox-checked').parents('.container').find('.stopped').length;
42 42
    $('.header .main-actions li:not(.permanent) a').removeClass('active');  
43 43
    if ( (running*stopped) > 0 ){          
44 44
         $('.header .main-actions li.both a').addClass('active');   
......
99 99
            $(this).stop(true, true).removeClass('set-border');
100 100
            $(this).find('.options').stop(true, true).fadeOut(200); 
101 101
            $(this).find('.img').stop(true, true).fadeIn('slow');
102
            $(this).find('.custom_checkbox:not(.checkbox-checked)').parents('.check').stop(true, true).removeClass('active');
102
            $(this).find('.snf-checkbox-unchecked').parents('.check').stop(true, true).removeClass('active');
103 103
            $(this).find('.visible-info em').stop(true, true).each(function(){
104 104
                $(this).animate({
105 105
                 left: 0,
......
111 111
    $('.entities .container .check').click(function(e){
112 112
        e.preventDefault();
113 113

  
114
        var checkbox = $(this).find('.custom_checkbox');
114
        var checkbox = $(this).find('.snf-checkbox-unchecked, .snf-checkbox-checked');
115 115

  
116
        checkbox.toggleClass('checkbox-checked');
116
        checkbox.toggleClass('snf-checkbox-unchecked');
117
        checkbox.toggleClass('snf-checkbox-checked');
117 118
        
118
        if(checkbox.hasClass('checkbox-checked')){
119
            checkbox.html('b');
119
        if(checkbox.hasClass('snf-checkbox-checked')){
120 120
            $(this).parents('.container').addClass('set-bg');
121 121
            $(this).addClass('active');
122 122
        }
123 123
        else{
124
            checkbox.html('a'); 
125 124
            $(this).parents('.container').removeClass('set-bg');
126 125
            
127 126
      
......
143 142
            $(this).stop(true, true).removeClass('set-border');
144 143
            $(this).find('.options').stop(true, true).fadeOut(200); 
145 144
            $(this).find('.img').stop(true, true).fadeIn('slow');
146
            $(this).find('.custom_checkbox:not(.checkbox-checked)').parents('.check').stop(true, true).removeClass('active');
145
            $(this).find('.snf-checkbox-unchecked').parents('.check').stop(true, true).removeClass('active');
147 146
            $(this).find('.visible-info em').stop(true, true).each(function(){
148 147
                $(this).animate({
149 148
                 left: 0,

Also available in: Unified diff