Bugzilla – Attachment 149973 Details for
Bug 33426
Add client storage of user-selected DataTables configuration to suggestion.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33426: Add DataTables saveState to suggestion.tt
Bug-33426-Add-DataTables-saveState-to-suggestiontt.patch (text/plain), 2.10 KB, created by
Martin Renvoize (ashimema)
on 2023-04-20 16:16:24 UTC
(
hide
)
Description:
Bug 33426: Add DataTables saveState to suggestion.tt
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-04-20 16:16:24 UTC
Size:
2.10 KB
patch
obsolete
>From 01123d7bd097cfbeaaa5469f8d66814a1cd50001 Mon Sep 17 00:00:00 2001 >From: emlam <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 5 Apr 2023 15:51:33 -0400 >Subject: [PATCH] Bug 33426: Add DataTables saveState to suggestion.tt > >To test: >1. In the staff client, go to Purchase Suggestion management page and > add a suggestion if needed to make the table display. >2. Make some changes to the table settings (hide/show columns, change > sort column, and/or change number of rows to display) >3. Navigate to a different page. >4. Navigate back to Purchase Suggestions page. Note that the table > settings have been reset. >5. Apply patch and restart_all >6. Repeat steps 1-4. Note that this time the changes to the table > settings were preserved. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index bb1efb003e..47b9382274 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1368,12 +1368,16 @@ > } > > table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] >+ var saved_table = localStorage.getItem("DataTables_suggestions_/cgi-bin/koha/suggestion/suggestion.pl"); >+ var updated_settings = get_columns_saved_state(saved_table, table_settings); >+ > [% FOREACH suggestion IN suggestions %] > [% IF suggestion.suggestions.size %] > KohaTable("table_[% loop.count| html %]", { > "sorting": [[ 3, "asc" ]], > "autoWidth": false, >- }, table_settings ); >+ "stateSave": true, >+ }, updated_settings ); > [% END %] > [% END %] > >-- >2.40.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 33426
:
149222
|
149446
| 149973