mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 18:00:57 +00:00
User group detail
This commit is contained in:
@@ -297,6 +297,7 @@ jumpserver.initDataTable = function (options) {
|
||||
url: options.i18n_url || "/static/js/plugins/dataTables/i18n/zh-hans.json"
|
||||
},
|
||||
order: options.order || [[ 1, 'asc' ]],
|
||||
select: options.select || 'multi',
|
||||
buttons: options.buttons || [
|
||||
{extend: 'excel',
|
||||
exportOptions: {
|
||||
@@ -323,9 +324,6 @@ jumpserver.initDataTable = function (options) {
|
||||
}
|
||||
],
|
||||
columnDefs: columnDefs,
|
||||
// select: 'single',
|
||||
// select: options.select || {style: 'single'},
|
||||
// select: false,
|
||||
ajax: {
|
||||
url: options.ajax_url ,
|
||||
dataSrc: ""
|
||||
@@ -333,16 +331,16 @@ jumpserver.initDataTable = function (options) {
|
||||
columns: options.columns || [],
|
||||
lengthMenu: [[15, 25, 50, -1], [15, 25, 50, "All"]]
|
||||
});
|
||||
// table.on('select', function(e, dt, type, indexes) {
|
||||
// var $node = table[ type ]( indexes ).nodes().to$();
|
||||
// $node.find('input.ipt_check').prop('checked', true);
|
||||
// }).on('deselect', function(e, dt, type, indexes) {
|
||||
// var $node = table[ type ]( indexes ).nodes().to$();
|
||||
// $node.find('input.ipt_check').prop('checked', false);
|
||||
// }).on('draw', function(){
|
||||
// $('#op').html(options.op_html || '');
|
||||
// $('#uc').html(options.uc_html || '');
|
||||
// });
|
||||
table.on('select', function(e, dt, type, indexes) {
|
||||
var $node = table[ type ]( indexes ).nodes().to$();
|
||||
$node.find('input.ipt_check').prop('checked', true);
|
||||
}).on('deselect', function(e, dt, type, indexes) {
|
||||
var $node = table[ type ]( indexes ).nodes().to$();
|
||||
$node.find('input.ipt_check').prop('checked', false);
|
||||
}).on('draw', function(){
|
||||
$('#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);
|
||||
@@ -354,5 +352,6 @@ jumpserver.initDataTable = function (options) {
|
||||
table.rows().deselect();
|
||||
}
|
||||
});
|
||||
|
||||
return table;
|
||||
};
|
||||
|
Reference in New Issue
Block a user