Bugzilla – Attachment 113904 Details for
Bug 23475
Search context is lost when simple search leads to a single record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23475: Unset the storage if the values do not exist
Bug-23475-Unset-the-storage-if-the-values-do-not-e.patch (text/plain), 1.47 KB, created by
Nick Clemens (kidclamp)
on 2020-11-20 19:54:14 UTC
(
hide
)
Description:
Bug 23475: Unset the storage if the values do not exist
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-11-20 19:54:14 UTC
Size:
1.47 KB
patch
obsolete
>From abecfb6a6280fcd6a92e88cac953a377bf3ccf54 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 20 Nov 2020 19:53:51 +0000 >Subject: [PATCH] Bug 23475: Unset the storage if the values do not exist > >--- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 02c4b621a4..4f06af9465 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -345,6 +345,16 @@ function resetSearchContext() { > > function saveOrClearSimpleSearchParams() { > // Simple masthead search - pass value for display on details page >- localStorage.setItem('cat_search_pulldown_selection', $("#cat-search-block select.advsearch").val() ); >- localStorage.setItem('searchbox_value', $("#cat-search-block #search-form").val() ); >+ if( $("#cat-search-block select.advsearch").length ){ >+ pulldown_selection = $("#cat-search-block select.advsearch").val(); >+ } else { >+ pulldown_selection =""; >+ } >+ if( $("#cat-search-block #search-form").length ){ >+ searchbox_value = $("#cat-search-block #search-form").val(); >+ } else { >+ searchbox_value =""; >+ } >+ localStorage.setItem('cat_search_pulldown_selection', pulldown_selection ); >+ localStorage.setItem('searchbox_value', searchbox_value ); > } >-- >2.11.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 23475
:
92357
|
93558
|
93562
|
108124
|
109624
|
111325
|
111338
|
111339
|
111340
|
111798
|
111799
|
111800
|
112697
|
112714
|
112971
|
113744
|
113784
|
113904
|
114055
|
114056