mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Feature #495: Select all checkbox autoselects when all is checked and viceversa.
This commit is contained in:
parent
1696587c75
commit
7288f5c189
@ -2235,9 +2235,17 @@ function tableCheckboxesListener(dataTable){
|
||||
dataTable = $(this).parents('table').dataTable();
|
||||
context = dataTable.parents('form');
|
||||
last_action_b = $('.last_action_button',context);
|
||||
nodes_length = $('input:checked',dataTable.fnGetNodes()).length;
|
||||
nodes = dataTable.fnGetNodes();
|
||||
total_length = nodes.length;
|
||||
checked_length = $('input:checked',nodes).length;
|
||||
|
||||
if (nodes_length){
|
||||
if (total_length == checked_length){
|
||||
$('.check_all',dataTable).attr("checked","checked");
|
||||
} else {
|
||||
$('.check_all',dataTable).removeAttr("checked");
|
||||
}
|
||||
|
||||
if (checked_length){
|
||||
$('.top_button, .list_button',context).button("enable");
|
||||
if (last_action_b.length && last_action_b.val().length){
|
||||
last_action_b.button("enable");
|
||||
|
Loading…
x
Reference in New Issue
Block a user