Bugzilla – Attachment 192762 Details for
Bug 41563
Tidy kohaTable block - acqui
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41563: Remove JS error from newordersuggestion
Bug-41563-Remove-JS-error-from-newordersuggestion.patch (text/plain), 2.98 KB, created by
Paul Derscheid
on 2026-02-09 12:12:30 UTC
(
hide
)
Description:
Bug 41563: Remove JS error from newordersuggestion
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2026-02-09 12:12:30 UTC
Size:
2.98 KB
patch
obsolete
>From 4a122ed755d8453fb83acfd03607f94e403a95e8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Jan 2026 13:12:49 +0100 >Subject: [PATCH] Bug 41563: Remove JS error from newordersuggestion > >Not caused by this patchset but it's a good place to fix it (and not add >a conflict) > >Uncaught TypeError: can't access property "DataTable", suggestionst is undefined > >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > .../en/modules/acqui/newordersuggestion.tt | 44 ++++++++++--------- > 1 file changed, 23 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt >index 02d63ab4799..f6eabe7d5b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt >@@ -130,28 +130,30 @@ > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] >- <script> >- const logged_in_user = [% To.json(logged_in_user.unblessed) | $raw %]; >- </script> >- <script> >- $(document).ready(function () { >- var suggestionst = $("#suggestionst").kohaTable({ >- columnDefs: [ >- { targets: [0], visible: false, searchable: true }, // must be searchable for filtering >- ], >- pagingType: "full", >+ [% IF suggestions.size %] >+ <script> >+ const logged_in_user = [% To.json(logged_in_user.unblessed) | $raw %]; >+ </script> >+ <script> >+ $(document).ready(function () { >+ var suggestionst = $("#suggestionst").kohaTable({ >+ columnDefs: [ >+ { targets: [0], visible: false, searchable: true }, // must be searchable for filtering >+ ], >+ pagingType: "full", >+ }); >+ let table_dt = suggestionst.DataTable(); >+ $("#show_only_mine").on("click", function (e) { >+ e.preventDefault(); >+ table_dt.columns(0).search(`^${logged_in_user.borrowernumber}$`, true).draw(); >+ }); >+ $("#show_all").on("click", function (e) { >+ e.preventDefault(); >+ table_dt.columns(0).search("").draw(); >+ }); > }); >- let table_dt = suggestionst.DataTable(); >- $("#show_only_mine").on("click", function (e) { >- e.preventDefault(); >- table_dt.columns(0).search(`^${logged_in_user.borrowernumber}$`, true).draw(); >- }); >- $("#show_all").on("click", function (e) { >- e.preventDefault(); >- table_dt.columns(0).search("").draw(); >- }); >- }); >- </script> >+ </script> >+ [% END %] > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >-- >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 41563
:
191069
|
191070
|
191071
|
191072
|
191073
|
191074
|
191075
|
191076
|
191077
|
191078
|
191079
|
191080
|
191290
|
191291
|
191292
|
191293
|
191294
|
191295
|
191296
|
191297
|
191298
|
191299
|
191300
|
191301
|
191302
|
191303
|
192026
|
192730
|
192731
|
192748
|
192749
|
192750
|
192751
|
192752
|
192753
|
192754
|
192755
|
192756
|
192757
|
192758
|
192759
|
192760
|
192761
| 192762 |
192963