Bugzilla – Attachment 177262 Details for
Bug 38255
Do not use dataTable constructor directly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38255: Fix additional-contents
Bug-38255-Fix-additional-contents.patch (text/plain), 2.67 KB, created by
Jonathan Druart
on 2025-01-28 11:24:55 UTC
(
hide
)
Description:
Bug 38255: Fix additional-contents
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-28 11:24:55 UTC
Size:
2.67 KB
patch
obsolete
>From fe7e171ae6f9f102e4d13310b6d7e1a9133dbe28 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Jan 2025 12:24:41 +0100 >Subject: [PATCH] Bug 38255: Fix additional-contents > >--- > .../prog/en/modules/tools/additional-contents.tt | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index 2faee1b7d64..ddac9fdd71c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -611,6 +611,7 @@ > ], > pagingType: "full_numbers", > }); >+ let table_dt = table.DataTable(); > > $("#del_form").on("click", ".delete_news", function(e){ > e.preventDefault(); >@@ -631,32 +632,32 @@ > > $("#show_expired").on("change", function(){ > /* redraw the DataTable according to the custom search function */ >- table.draw(); >+ table_dt.draw(); > }); > >- table.on( 'search.dt', function () { >- var term = table.search(); >+ table_dt.on( 'search.dt', function () { >+ var term = table_dt.search(); > $("#news_keyword").val( term ); > }); > > $("#news_keyword").on("keyup", function(){ > var term = $(this).val(); >- filterDataTable( table, null, term ); >+ filterDataTable( table_dt, null, term ); > }); > > $("#news_display_location").on("change", function(){ > var term = $(this).val(); >- filterDataTable( table, 1, term ); >+ filterDataTable( table_dt, 1, term ); > }); > > $("#news_library").on("change", function(){ > // Table must be filtered by the <option>'s text, not its value > var opt = $(this).find("option:selected").text(); >- filterDataTable( table, 2, opt ); >+ filterDataTable( table_dt, 2, opt ); > }); > > $(".dt_button_clear_filter").on("click", function(){ >- table.search('').columns().search('').draw(); >+ table_dt.search('').columns().search('').draw(); > $("#news-filter select").each(function(){ > $(this).val(""); > }); >-- >2.34.1
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 38255
:
175181
|
175182
|
175183
|
175184
|
175185
|
175352
|
175598
|
175599
|
175872
|
175873
|
176062
|
176063
|
176064
|
176065
|
176066
|
176067
|
176068
|
176069
|
176070
|
176071
|
176146
|
176348
|
176349
|
176350
|
176351
|
176352
|
176353
|
176354
|
176355
|
176356
|
176357
|
176358
|
176550
|
176551
|
176552
|
176553
|
176554
|
176555
|
176556
|
176557
|
176558
|
176559
|
176560
|
177076
|
177077
|
177078
|
177079
|
177080
|
177081
|
177082
|
177083
|
177084
|
177085
|
177086
|
177214
|
177215
|
177216
|
177217
|
177218
|
177219
|
177220
|
177221
|
177222
|
177223
|
177224
| 177262