[Update] check all 只选择当前页面

pull/944/head
ibuler 2018-01-15 18:32:07 +08:00
parent 7e2d627d3f
commit dad21cadb3
1 changed files with 4 additions and 4 deletions

View File

@ -319,11 +319,11 @@ jumpserver.initDataTable = function (options) {
if (!jumpserver.checked) { if (!jumpserver.checked) {
$(this).closest('table').find('.ipt_check').prop('checked', true); $(this).closest('table').find('.ipt_check').prop('checked', true);
jumpserver.checked = true; jumpserver.checked = true;
table.rows({search:'applied'}).select(); table.rows({search:'applied', page:'current'}).select();
} else { } else {
$(this).closest('table').find('.ipt_check').prop('checked', false); $(this).closest('table').find('.ipt_check').prop('checked', false);
jumpserver.checked = false; jumpserver.checked = false;
table.rows({search:'applied'}).deselect(); table.rows({search:'applied', page:'current'}).deselect();
} }
}); });
@ -438,11 +438,11 @@ jumpserver.initServerSideDataTable = function (options) {
if (!jumpserver.checked) { if (!jumpserver.checked) {
$(this).closest('table').find('.ipt_check').prop('checked', true); $(this).closest('table').find('.ipt_check').prop('checked', true);
jumpserver.checked = true; jumpserver.checked = true;
table.rows({search:'applied'}).select(); table.rows({search:'applied', page:'current'}).select();
} else { } else {
$(this).closest('table').find('.ipt_check').prop('checked', false); $(this).closest('table').find('.ipt_check').prop('checked', false);
jumpserver.checked = false; jumpserver.checked = false;
table.rows({search:'applied'}).deselect(); table.rows({search:'applied', page:'current'}).deselect();
} }
}); });