mirror of https://github.com/jumpserver/jumpserver
[Update] check all 只选择当前页面
parent
7e2d627d3f
commit
dad21cadb3
|
@ -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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue