Bugzilla – Attachment 175051 Details for
Bug 38595
Table settings behavior broken on some tables in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38595: Fix broken table settings behaviour on some tables at the OPAC
Bug-38595-Fix-broken-table-settings-behaviour-on-s.patch (text/plain), 3.67 KB, created by
Owen Leonard
on 2024-12-02 12:41:22 UTC
(
hide
)
Description:
Bug 38595: Fix broken table settings behaviour on some tables at the OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-12-02 12:41:22 UTC
Size:
3.67 KB
patch
obsolete
>From 90b50c8579c5bea0f509e035ac6fc23d52f41e85 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 2 Dec 2024 11:48:42 +0100 >Subject: [PATCH] Bug 38595: Fix broken table settings behaviour on some tables > at the OPAC > >Problem highlighted by bug 38436. There is a JS error on some views >with tables at the OPAC. > > Uncaught TypeError: table_settings.columns is undefined > >Test plan: >Go to the 3 views modified by this patch and confirm that the JS error >in the console is gone when this patch is applied. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt | 3 +-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt | 3 +-- > .../opac-tmpl/bootstrap/en/modules/opac-search-history.tt | 3 +-- > 3 files changed, 3 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt >index 3e39a2725b..cca64a6274 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt >@@ -185,7 +185,6 @@ > $('#sort').change(function() { > $('#sortform').submit(); > }); >- var columns_settings = []; // Empty because there are no columns we want to be configurable > var table = KohaTable("#table_holdshistory", { > "dom": '<"top"<"table_entries"i><"table_controls"fB>>t', > "autoWidth": false, >@@ -197,7 +196,7 @@ > "search": "_INPUT_", > "searchPlaceholder": _("Search") > } >- }, columns_settings); >+ }); > }); > </script> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index c0a3b0212c..497ee3fbaa 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -234,7 +234,6 @@ > $('#sortform').submit(); > }); > >- var columns_settings = []; // Empty because there are no columns we want to be configurable > var table = KohaTable("#readingrec", { > "dom": '<"top"<"table_entries"i><"table_controls"fB>>t', > "language": { >@@ -249,7 +248,7 @@ > { "visible": false, "targets": [0]}, > { "orderable": false, "targets": [1]} > ], >- }, columns_settings); >+ }); > let table_dt = table.DataTable(); > > $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >index 196471ce72..1d35a87e8f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >@@ -294,7 +294,6 @@ > $(document).ready(function() { > // We show table ordered by descending dates by default > // (so that the more recent query is shown first) >- var columns_settings = []; // Empty because there are no columns we want to be configurable > var table = KohaTable(".historyt", { > "order": [[ 1, "desc" ]], > "dom": '<"top"<"table_entries"><"table_controls"fB>>t', >@@ -309,7 +308,7 @@ > "responsive": { > "details": { "type": 'column',"target": -1 } > }, >- }, columns_settings); >+ }); > > $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) { > table.DataTable().responsive.recalc(); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38595
:
175049
|
175051
|
175062