Revision 01fa9e32 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/gp-script.js
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/gp-script.js | ||
---|---|---|
23 | 23 |
$('.vm_options .select').click(function(event){ |
24 | 24 |
event.preventDefault(); |
25 | 25 |
var checkbox = $(this).find('.custom_checkbox'); |
26 |
|
|
26 | 27 |
if(checkbox.hasClass('checkbox-unchecked')){ |
27 | 28 |
checkbox.html('b'); |
29 |
checkbox.addClass('checkbox-checked'); |
|
28 | 30 |
checkbox.removeClass('checkbox-unchecked'); |
29 | 31 |
} |
30 | 32 |
else{ |
31 | 33 |
checkbox.html('a'); |
34 |
checkbox.removeClass('checkbox-checked'); |
|
32 | 35 |
checkbox.addClass('checkbox-unchecked'); |
36 |
|
|
37 |
} |
|
38 |
var cntCheckbox = $('.vm_options .checkbox-checked').length; |
|
39 |
if (cntCheckbox == 0 ){ |
|
40 |
$('.header .main-actions').hide(); |
|
41 |
} else { |
|
42 |
$('.header .main-actions').show(); |
|
43 |
if (cntCheckbox > 1) { |
|
44 |
$('.header .main-actions .single').hide(); |
|
45 |
} else { |
|
46 |
$('.header .main-actions .sigle').show(); |
|
47 |
} |
|
33 | 48 |
} |
34 | 49 |
}); |
35 | 50 |
|
Also available in: Unified diff