Merge "Make the multi-select button on the "Floating IPs" page work again"
This commit is contained in:
commit
05bbcbde76
@ -244,22 +244,19 @@ $(parent).find("table.datatable").each(function () {
|
||||
header_options = {};
|
||||
// Disable if not sortable or has <= 1 item
|
||||
if ($table.find('tbody tr').not('.empty').length > 1){
|
||||
$table.find("thead th").each(function (i, val) {
|
||||
$table.find("thead th[class!='table_header']").each(function (i, val) {
|
||||
$th = $(this);
|
||||
if (!$th.hasClass('sortable')) {
|
||||
header_options[i] = {sorter: false};
|
||||
} else if ($th.data('type') == 'size'){
|
||||
// set as [i-1] as there is one more <th> in <thead>
|
||||
// than <td>'s in <tbody>
|
||||
header_options[i-1] = {sorter: 'sizeSorter'};
|
||||
header_options[i] = {sorter: 'sizeSorter'};
|
||||
} else if ($th.data('type') == 'ip'){
|
||||
// set as [i-1] as there is one more <th> in <thead>
|
||||
// than <td>'s in <tbody>
|
||||
header_options[i-1] = {sorter: 'ipAddress'};
|
||||
header_options[i] = {sorter: 'ipAddress'};
|
||||
}
|
||||
});
|
||||
$table.tablesorter({
|
||||
headers: header_options,
|
||||
selectorHeaders: "thead th[class!='table_header']",
|
||||
cancelSelection: false
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user