From bbc009597401f155d475769b62dfa99d7b9c970c Mon Sep 17 00:00:00 2001 From: Elkasitu Date: Thu, 20 Jul 2017 12:25:28 +0200 Subject: [PATCH] [FIX] web: Save search bar state to local storage The state of the search bar (expanded or not) is supposed to be saved into a local storage variable which is retrieved whenever loading a view that has the search bar in it and it is expanded automatically if it was done previously in any other view, this didn't happen previous to this commit because the variable wasn't being set properly (missing key). --- addons/web/static/src/js/chrome/search_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/chrome/search_view.js b/addons/web/static/src/js/chrome/search_view.js index 26305817e55..6c3adcafcca 100644 --- a/addons/web/static/src/js/chrome/search_view.js +++ b/addons/web/static/src/js/chrome/search_view.js @@ -232,7 +232,7 @@ var SearchView = Widget.extend({ 'click .o_searchview_more': function (e) { $(e.target).toggleClass('fa-search-plus fa-search-minus'); var visibleSearchMenu = this.call('local_storage', 'getItem', 'visible_search_menu'); - this.call('local_storage', 'setItem', visibleSearchMenu !== 'true'); + this.call('local_storage', 'setItem', 'visible_search_menu', visibleSearchMenu !== 'true'); this.toggle_buttons(); }, 'keydown .o_searchview_input, .o_searchview_facet': function (e) {