Bug 23475: Unset the storage if the values do not exist
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit44be943fed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit9ce2f22b62) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
69b775e8a0
commit
496aaf7760
|
|
@ -344,6 +344,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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue