Bugzilla – Attachment 192729 Details for
Bug 41324
Tidy kohaTable block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41563: Remove JS error from newordersuggestion
68ef36c.patch (text/plain), 2.93 KB, created by
Jonathan Druart
on 2026-02-09 10:53:32 UTC
(
hide
)
Description:
Bug 41563: Remove JS error from newordersuggestion
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-02-09 10:53:32 UTC
Size:
2.93 KB
patch
obsolete
>From 68ef36c386057b29c539629babb540930a0117d9 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 >--- > .../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.43.0 >
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 41324
:
189994
|
189995
|
189996
|
191189
|
192723
|
192728
|
192729