user-group detail page: users op

This commit is contained in:
xiaokong1937@gmail.com
2016-09-28 21:11:43 +08:00
parent 2522f0d80f
commit f9b49605e4
11 changed files with 248 additions and 72 deletions

View File

@@ -257,6 +257,7 @@ $.fn.serializeObject = function()
return o;
};
var jumpserver = {};
jumpserver.checked = false;
jumpserver.initDataTable = function (options) {
// options = {
// ele *: $('#dataTable_id'),
@@ -331,5 +332,16 @@ jumpserver.initDataTable = function (options) {
$('#op').html(options.op_html || '');
$('#uc').html(options.uc_html || '');
});
$('.ipt_check_all').on('click', function() {
if (!jumpserver.checked) {
$(this).closest('table').find('.ipt_check').prop('checked', true);
jumpserver.checked = true;
table.rows().select();
} else {
$(this).closest('table').find('.ipt_check').prop('checked', false);
jumpserver.checked = false;
table.rows().deselect();
}
})
return table;
}