Merge pull request #1240 from rasika/master

Fix advanced operationsbar overlapping when multiple tables exists.
4.x.x
Rasika Perera 7 years ago committed by GitHub
commit 49584eb8f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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') {

@ -290,14 +290,14 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
/**
* append advance operations to list table toolbar
*/
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
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();
@ -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