mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #1171 from Kamidu/master
Fix git issue https://github.com/wso2/product-iots/issues/1629
This commit is contained in:
commit
20a7072f90
@ -117,7 +117,8 @@ $.fn.datatables_extended = function(settings){
|
||||
}
|
||||
else if (filterColumn.eq(column.index()).hasClass('text-filter')) {
|
||||
var title = filterColumn.eq(column.index()).attr('data-for');
|
||||
$(filterColumn.eq(column.index()).empty()).html('<input type="text" class="form-control" placeholder="Search ' + title + '" />');
|
||||
$(filterColumn.eq(column.index()).empty()).html('<input type="text" class="form-control" ' +
|
||||
'placeholder="Search ' + title + '" />');
|
||||
|
||||
filterColumn.eq(column.index()).find('input').on('keyup change', function () {
|
||||
column.search($(this).val()).draw();
|
||||
@ -142,10 +143,12 @@ $.fn.datatables_extended = function(settings){
|
||||
*/
|
||||
var table = this;
|
||||
if (table.hasClass('sorting-enabled')) {
|
||||
var dropdownmenu = $('<ul class="dropdown-menu arrow arrow-top-right dark sort-list add-margin-top-2x"><li class="dropdown-header">Sort by</li></ul>');
|
||||
var dropdownmenu = $('<ul class="dropdown-menu arrow arrow-top-right dark sort-list ' +
|
||||
'add-margin-top-2x"><li class="dropdown-header">Sort by</li></ul>');
|
||||
$('.sort-row th', elem).each(function () {
|
||||
if (!$(this).hasClass('no-sort')) {
|
||||
dropdownmenu.append('<li><a href="#' + $(this).html() + '" data-column="' + $(this).index() + '">' + $(this).html() + '</a></li>');
|
||||
dropdownmenu.append('<li><a href="#' + $(this).html() + '" data-column="' + $(this).index() +
|
||||
'">' + $(this).html() + '</a></li>');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -234,20 +237,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');
|
||||
});
|
||||
}
|
||||
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');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
@ -266,7 +269,8 @@ $.fn.datatables_extended = function(settings){
|
||||
|
||||
thisTable.api().rows().every(function () {
|
||||
if (!$(this.node()).hasClass(rowSelectedClass)) {
|
||||
$(button).closest('.dataTables_wrapper').find('[data-click-event=toggle-selected]').html('Select All');
|
||||
$(button).closest('.dataTables_wrapper').find('[data-click-event=toggle-selected]').
|
||||
html('Select All');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -190,7 +190,8 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
|
||||
});
|
||||
} else if (filterColumn.eq(column.index()).hasClass('text-filter')) {
|
||||
var title = filterColumn.eq(column.index()).attr('data-for');
|
||||
$(filterColumn.eq(column.index()).empty()).html('<input type="text" class="form-control" placeholder="Search ' + title + '" />');
|
||||
$(filterColumn.eq(column.index()).empty()).html('<input type="text" class="form-control" ' +
|
||||
'placeholder="Search ' + title + '" />');
|
||||
|
||||
//noinspection SpellCheckingInspection
|
||||
filterColumn.eq(column.index()).find('input').on('keyup', function () {
|
||||
@ -211,10 +212,12 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
|
||||
*/
|
||||
var table = this;
|
||||
if (table.hasClass('sorting-enabled')) {
|
||||
var dropdownmenu = $('<ul class="dropdown-menu arrow arrow-top-right dark sort-list add-margin-top-2x"><li class="dropdown-header">Sort by</li></ul>');
|
||||
var dropdownmenu = $('<ul class="dropdown-menu arrow arrow-top-right dark sort-list ' +
|
||||
'add-margin-top-2x"><li class="dropdown-header">Sort by</li></ul>');
|
||||
$('.sort-row th', elem).each(function () {
|
||||
if (!$(this).hasClass('no-sort')) {
|
||||
dropdownmenu.append('<li><a href="#' + $(this).html() + '" data-column="' + $(this).index() + '">' + $(this).html() + '</a></li>');
|
||||
dropdownmenu.append('<li><a href="#' + $(this).html() + '" data-column="' + $(this).index() +
|
||||
'">' + $(this).html() + '</a></li>');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -303,15 +306,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');
|
||||
});
|
||||
}
|
||||
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');
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -333,7 +338,8 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
|
||||
|
||||
thisTable.api().rows().every(function () {
|
||||
if (!$(this.node()).hasClass(rowSelectedClass)) {
|
||||
$(button).closest('.dataTables_wrapper').find('[data-click-event=toggle-selected]').html('Select All');
|
||||
$(button).closest('.dataTables_wrapper').find('[data-click-event=toggle-selected]').
|
||||
html('Select All');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user