Revision e5c8c342 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js | ||
---|---|---|
44 | 44 |
var stopped = $('.snf-checkbox-checked').parents('.container').find('.stopped').length; |
45 | 45 |
$('.header .main-actions li:not(.permanent) a').removeClass('active'); |
46 | 46 |
if ( (running*stopped) > 0 ){ |
47 |
$('.header .main-actions li.both a').addClass('active');
|
|
48 |
$('.header .main-actions li.single a').removeClass('active');
|
|
47 |
$('.main-actions li.both a').addClass('active');
|
|
48 |
$('.main-actions li.single a').removeClass('active');
|
|
49 | 49 |
} else { |
50 | 50 |
if (running > 0) { |
51 |
$('.header .main-actions li.both a').addClass('active');
|
|
52 |
$('.header .main-actions li.running a').addClass('active');
|
|
51 |
$('.main-actions li.both a').addClass('active');
|
|
52 |
$('.main-actions li.running a').addClass('active');
|
|
53 | 53 |
} else if (stopped>0) { |
54 |
$('.header .main-actions li.both a').addClass('active');
|
|
55 |
$('.header .main-actions li.stopped a').addClass('active');
|
|
54 |
$('.main-actions li.both a').addClass('active');
|
|
55 |
$('.main-actions li.stopped a').addClass('active');
|
|
56 | 56 |
} |
57 | 57 |
if ( all > 1 ) { |
58 |
$('.header .main-actions li.single a').removeClass('active');
|
|
58 |
$('.main-actions li.single a').removeClass('active');
|
|
59 | 59 |
} |
60 | 60 |
} |
61 | 61 |
} |
Also available in: Unified diff