Fixes for multiple datatables overlapping function call points

revert-70aa11f8
Rasika Perera 7 years ago
parent 9e3b17c65d
commit 5f37af8fd1

@ -232,14 +232,14 @@ $.fn.datatables_extended = function (settings) {
/**
* append advance operations to list table toolbar
*/
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
table.closest('.dataTables_wrapper').find('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
getAdvanceToolBar()
);
/**
* sorting dropdown menu select function
*/
$('.dataTables_wrapper .sort-list li a').click(function () {
table.closest('.dataTables_wrapper').find('.sort-list li a').click(function () {
$(this).closest('li').siblings('li').find('a').removeClass('sorting_asc').removeClass('sorting_desc');
var thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
@ -263,7 +263,7 @@ $.fn.datatables_extended = function (settings) {
/**
* Enable/Disable selection on rows
*/
$('.dataTables_wrapper [data-click-event=toggle-selectable]').click(function () {
table.closest('.dataTables_wrapper').find('[data-click-event=toggle-selectable]').click(function () {
var button = this,
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
if ($(button).html() == 'Select') {
@ -286,7 +286,7 @@ $.fn.datatables_extended = function (settings) {
/**
* select/deselect all rows function
*/
$('.dataTables_wrapper [data-click-event=toggle-selected]').click(function () {
table.closest('.dataTables_wrapper').find('[data-click-event=toggle-selected]').click(function () {
var button = this,
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
if ($(button).html() == 'Select All') {

@ -297,7 +297,7 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
/**
* sorting dropdown menu select function
*/
$('.dataTables_wrapper .sort-list li a').click(function () {
table.closest('.dataTables_wrapper').find('.sort-list li a').click(function () {
$(this).closest('li').siblings('li').find('a').removeClass('sorting_asc').removeClass('sorting_desc');
var thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
@ -321,7 +321,7 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
/**
* Enable/Disable selection on rows
*/
$('.dataTables_wrapper [data-click-event=toggle-selectable]').click(function () {
table.closest('.dataTables_wrapper').find('[data-click-event=toggle-selectable]').click(function () {
var button = this,
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
if ($(button).html() == 'Select') {
@ -345,7 +345,7 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
/**
* select/deselect all rows function
*/
$('.dataTables_wrapper [data-click-event=toggle-selected]').click(function () {
table.closest('.dataTables_wrapper').find('[data-click-event=toggle-selected]').click(function () {
var button = this,
thisTable = $(this).closest('.dataTables_wrapper').find('.dataTable').dataTable();
if (!$(button).hasClass('disabled')) {

Loading…
Cancel
Save