Bugzilla – Attachment 142679 Details for
Bug 31994
Clicking the next button of a DataTable loading its data from the HTML does nothing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31994: DataTable next button does not work when using data in the HTML
Bug-31994-DataTable-next-button-does-not-work-when.patch (text/plain), 1.95 KB, created by
Olivier Hubert
on 2022-10-26 16:35:36 UTC
(
hide
)
Description:
Bug 31994: DataTable next button does not work when using data in the HTML
Filename:
MIME Type:
Creator:
Olivier Hubert
Created:
2022-10-26 16:35:36 UTC
Size:
1.95 KB
patch
obsolete
>From 77e2b90c190533eabec906774cbc48c7a7b905c5 Mon Sep 17 00:00:00 2001 >From: Olivier Hubert <olivier.hubert@inlibro.com> >Date: Wed, 26 Oct 2022 12:29:20 -0400 >Subject: [PATCH] Bug 31994: DataTable next button does not work when using > data in the HTML > >This patch resolves the issue that occurs when the next button of a DataTable with data straight from the HTML is clicked. > >Test plan: >1. Open itemtypes.pl. >2. If there are fewer than 11 item types, create additional item types until there are more than 10, so that the next button can be used. >3. Click on the next button / link. >4. Notice that nothing happens. >5. Apply the patch. >6. Restart plack / memcached if using. >7. Reload itemtypes.pl. >8. Click on the next button / link. >9. Notice that the next page is displayed. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index 8df6eb56cc..b0955d3367 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -202,7 +202,8 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { > > if ( table_settings ) { > if ( table_settings.hasOwnProperty('default_display_length') && table_settings['default_display_length'] != null ) { >- new_parameters["pageLength"] = table_settings['default_display_length']; >+ // pageLength needs to be a number, not a string, or it can cause issues with DataTable's next button. >+ new_parameters["pageLength"] = parseInt(table_settings['default_display_length']); > } > if ( table_settings.hasOwnProperty('default_sort_order') && table_settings['default_sort_order'] != null ) { > new_parameters["order"] = [[ table_settings['default_sort_order'], 'asc' ]]; >-- >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 31994
:
142679
|
145903
|
148899
|
148930