Revision 77d5883f snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js
46 46
*/
47 47
ui.entitiesActionsEnabled = function(){
48 48
    var all = $('.snf-checkbox-checked').length;
49
    var running = $('.snf-checkbox-checked').parents('.container').find('.running').length;
50
    var stopped = $('.snf-checkbox-checked').parents('.container').find('.stopped').length;
49
    var running = $('.snf-checkbox-checked').parents('li').find('.running').length;
50
    var stopped = $('.snf-checkbox-checked').parents('li.off').length;
51
    console.log(stopped, 'actions here');
51 52
    $('.header .main-actions li:not(.permanent) a').removeClass('active');  
52 53
    if ( (running*stopped) > 0 ){          
53 54
         $('.main-actions li.both a').addClass('active');
......
194 195
*/
195 196

  
196 197
ui.changeCheckboxState =function(checkbox_link) {
197
     $(checkbox_link).find('.snf-checkbox-unchecked, .snf-checkbox-checked').toggleClass('snf-checkbox-unchecked snf-checkbox-checked');
198
    $(checkbox_link).find('.snf-checkbox-unchecked, .snf-checkbox-checked').toggleClass('snf-checkbox-unchecked snf-checkbox-checked');
199
    ui.entitiesActionsEnabled();
198 200
}
199 201

  
200 202
ui.changeRadiobuttonState = function(radiobtn_link) {
......
236 238
        }
237 239
    })
238 240

  
241
    $('.header .login').mouseenter(function(e){
242
        $(this).find('ul').stop().slideDown(200);
243
    });
244
    $('.header .login').mouseleave(function(e){
245
        $(this).find('ul').stop().slideUp(200);
246
    });
247

  
239 248
    $('.entities a').click(function(){
240 249
        if ($(this).attr('data-reveal-id')) {
241 250
            $('.entities li .more').hide();
......
408 417
            $('.list-view  li .check span').addClass('snf-checkbox-checked');
409 418
            $('.list-view  li .check span').removeClass('snf-checkbox-unchecked');
410 419
        }
420
        ui.entitiesActionsEnabled();
411 421
     });
412 422

  
413 423
    // set filter visible

Also available in: Unified diff