Fix hide/view columns dialog did not work on pages with more than 1 table (references #1058)

This commit is contained in:
Bernd Bestel
2020-11-11 22:28:05 +01:00
parent c3e59d21b9
commit 0a600d3277
27 changed files with 56 additions and 58 deletions

View File

@@ -762,7 +762,7 @@ $(window).on("message", function(e)
}
});
$("#change-table-columns-visibility").on("click", function(e)
$(".change-table-columns-visibility-button").on("click", function(e)
{
var dataTableSelector = $(e.currentTarget).attr("data-table-selector");
var dataTable = $(dataTableSelector).DataTable();

View File

@@ -70,8 +70,7 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#batteries-table"

View File

@@ -65,8 +65,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#batteries-journal-table"

View File

@@ -87,8 +87,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#batteries-overview-table"

View File

@@ -70,8 +70,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#chores-table"

View File

@@ -65,8 +65,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#chores-journal-table"

View File

@@ -109,8 +109,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#chores-overview-table"

View File

@@ -61,8 +61,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#equipment-table"

View File

@@ -70,8 +70,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#locations-table"

View File

@@ -75,8 +75,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#apikeys-table"

View File

@@ -393,8 +393,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#barcode-table"
@@ -484,11 +484,10 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#qu-conversion-table"
data-table-selector="#qu-conversions-table"
href="#"><i class="fas fa-eye"></i></a>
</th>
<th>{{ $__t('Quantity unit from') }}</th>

View File

@@ -70,8 +70,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#productgroups-table"

View File

@@ -88,8 +88,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#products-table"

View File

@@ -126,8 +126,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#qu-conversions-table"

View File

@@ -70,8 +70,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#quantityunits-table"

View File

@@ -145,8 +145,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#recipes-pos-table"
@@ -248,8 +248,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#recipes-includes-table"

View File

@@ -99,8 +99,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#recipes-table"

View File

@@ -175,8 +175,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#shoppinglist-table"

View File

@@ -70,8 +70,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#shoppinglocations-table"

View File

@@ -36,8 +36,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#stockentries-table"

View File

@@ -76,8 +76,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#stock-journal-table"

View File

@@ -145,8 +145,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#stock-overview-table"

View File

@@ -70,8 +70,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#taskcategories-table"

View File

@@ -105,8 +105,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#tasks-table"

View File

@@ -66,8 +66,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#userentities-table"

View File

@@ -80,8 +80,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#userfields-table"

View File

@@ -66,8 +66,8 @@
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"><a id="change-table-columns-visibility"
class="text-muted"
<th class="border-right"><a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Hide/view columns') }}"
data-table-selector="#users-table"