Bugzilla – Attachment 177790 Details for
Bug 37883
Add a filter for staff search results to filter by library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37883: Use localStorage instead of cookies to remember selection
Bug-37883-Use-localStorage-instead-of-cookies-to-r.patch (text/plain), 1.59 KB, created by
Lucas Gass (lukeg)
on 2025-02-11 20:55:48 UTC
(
hide
)
Description:
Bug 37883: Use localStorage instead of cookies to remember selection
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-02-11 20:55:48 UTC
Size:
1.59 KB
patch
obsolete
>From 237730bf3b4cdc132569f1f0c4025ce67f994b61 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 16 Jan 2025 20:20:48 +0000 >Subject: [PATCH] Bug 37883: Use localStorage instead of cookies to remember > selection > >--- > .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 12eb813dc0b..96770b08dbd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -807,7 +807,7 @@ > > [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] > $(document).ready( function() { >- if ( Cookies.get("show_local_items") == 'local' ) { >+ if (localStorage.getItem("show_local_items") === 'local') { > $('#toggleitems').click(); > } > }); >@@ -823,9 +823,9 @@ > > $(this).toggleClass('show-local-items show-all-items'); > if ($(this).hasClass('show-local-items')) { >- Cookies.set("show_local_items", 'all', { path: '/', sameSite: 'Lax' }); >+ localStorage.setItem("show_local_items", 'all'); > } else { >- Cookies.set("show_local_items", 'local', { path: '/', sameSite: 'Lax' }); >+ localStorage.setItem("show_local_items", 'local'); > } > }); > [% END %] >-- >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 37883
:
171256
|
171257
|
171261
|
171286
|
171287
|
171289
|
171291
|
171406
|
171407
|
171408
|
171409
|
171410
|
171411
|
176697
|
177306
|
177784
|
177785
|
177786
|
177787
|
177788
|
177789
|
177790
|
177791
|
178772
|
178773
|
178774
|
178775
|
178776
|
178777