mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
improve the java script code of changing the text and visibility
Improved the logic in order to remove the unesssary text changes and visibility changes. and fix the code formatting issues found in the code.
This commit is contained in:
parent
479c76d897
commit
0ad6448c12
@ -234,22 +234,20 @@ $.fn.datatables_extended = function(settings){
|
||||
$('.dataTables_wrapper [data-click-event=toggle-selected]').click(function () {
|
||||
var button = this,
|
||||
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
|
||||
if(!$(button).hasClass('disabled')){
|
||||
if ($(button).html() == 'Select All') {
|
||||
$(button).html('Deselect All');
|
||||
$('.bulk-action-row').removeClass('hidden');
|
||||
thisTable.api().rows().every(function () {
|
||||
$(this.node()).addClass(rowSelectedClass);
|
||||
$(button).html('Deselect All');
|
||||
$('.bulk-action-row').addClass('hidden');
|
||||
});
|
||||
}
|
||||
else if ($(button).html() == 'Deselect All') {
|
||||
$('.bulk-action-row').addClass('hidden');
|
||||
$(button).html('Select All');
|
||||
thisTable.api().rows().every(function () {
|
||||
$(this.node()).removeClass(rowSelectedClass);
|
||||
$(button).html('Select All');
|
||||
$('.bulk-action-row').removeClass('hidden');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@ -303,17 +303,17 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
|
||||
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
|
||||
if (!$(button).hasClass('disabled')) {
|
||||
if ($(button).html() == 'Select All') {
|
||||
$(button).html('Deselect All');
|
||||
$('.bulk-action-row').removeClass('hidden');
|
||||
thisTable.api().rows().every(function () {
|
||||
$(this.node()).addClass(rowSelectedClass);
|
||||
$(button).html('Deselect All');
|
||||
$('.bulk-action-row').addClass('hidden');
|
||||
});
|
||||
}
|
||||
else if ($(button).html() == 'Deselect All') {
|
||||
$('.bulk-action-row').addClass('hidden');
|
||||
$(button).html('Select All');
|
||||
thisTable.api().rows().every(function () {
|
||||
$(this.node()).removeClass(rowSelectedClass);
|
||||
$(button).html('Select All');
|
||||
$('.bulk-action-row').removeClass('hidden');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user