[FIX] web: mobile: display searchview toggler

There was an issue with the control panel in mobile since rev.
7b6056a. In the enterprise webclient, by default, the search view
is hidden, and a search icon should be displayed on the top right
corner of the control panel so that the user can toggle the
searchview.

Before this rev., the icon was invisible at the first rendering of
a view, and only appeared once the view was reloaded.

The change in rev. 7b6056a that produced the issue is that the
control panel is now updated twice when a view is rendered (once
by the view itself with the buttons, searchview..., and once by
the ActionManager with the breadcrumbs). The control panel didn't
handle correctly that scenario.

A test case will been added in web_enterprise.
This commit is contained in:
Aaron Bohy
2018-03-08 12:41:59 +01:00
parent 5fa4cc0d34
commit 7fac801075
@@ -154,7 +154,9 @@ var ControlPanel = Widget.extend({
this._attach_content(new_cp_content);
// Update the searchview and switch buttons
this._update_search_view(status.searchview, status.search_view_hidden, status.groupable);
if (status.searchview || options.clear) {
this._update_search_view(status.searchview, status.search_view_hidden, status.groupable);
}
if (status.active_view_selector) {
this._update_switch_buttons(status.active_view_selector);
}