diff options
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/css/base.css | 2 | ||||
| -rw-r--r-- | addons/web/static/src/css/base.sass | 4 | ||||
| -rw-r--r-- | addons/web/static/src/js/search.js | 14 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 2 |
4 files changed, 12 insertions, 10 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 53be627f486..7a9250a60fc 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1655,7 +1655,7 @@ .openerp .oe_searchview_drawer form button { margin: 0 0 8px -3px; } -.openerp .oe_searchview_drawer .oe_searchview_custom form { +.openerp .oe_searchview_drawer .oe_searchview_savefilter form { display: none; } .openerp .oe_searchview_drawer .oe_searchview_custom li { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 1cea0a006f7..8c78cf6165c 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1292,6 +1292,7 @@ $sheet-padding: 16px .oe_searchview_drawer_container overflow: auto .oe_searchview_drawer + display:none width: 100% cursor: default display: none @@ -1356,9 +1357,10 @@ $sheet-padding: 16px line-height: 18px button margin: 0 0 8px -3px // Managed margin-left according bootstrap3 - .oe_searchview_custom + .oe_searchview_savefilter form display: none + .oe_searchview_custom li cursor: pointer position: relative diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 25c78c36bbf..1e2e91a860d 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -826,10 +826,14 @@ instance.web.SearchViewDrawer = instance.web.Widget.extend({ }, start: function() { + var self = this; var filters_ready = this.searchview.fields_view_get .then(this.proxy('prepare_filters')); - return $.when(this._super(), filters_ready) - .then(this.proxy('notify_searchview')); + return $.when(this._super(), filters_ready).then(function () { + self.$el.show(); + var defaults = arguments[1][0]; + self.ready.resolve.apply(null, defaults); + }); }, prepare_filters: function (data) { this.make_widgets( @@ -852,10 +856,6 @@ instance.web.SearchViewDrawer = instance.web.Widget.extend({ return $.when(defaults_fetched, add_custom_reports, add_filters, add_rest); }, - notify_searchview: function () { - var defaults = arguments[1][0]; - this.ready.resolve.apply(null, defaults); - }, /** * Sets up thingie where all the mess is put? */ @@ -1807,7 +1807,7 @@ instance.web.search.CustomReports = instance.web.search.Input.extend({ $filter.remove(); delete self.$filters[key]; delete self.filters[key]; - if (!self.filters.length) { + if (!Object.keys(self.filters).length) { self.hide(); } }); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 9207ecdbdd2..a8563818b82 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1732,7 +1732,7 @@ </dl> </div> - <div t-name="SearchView.SaveFilter" class="oe_searchview_custom"> + <div t-name="SearchView.SaveFilter" class="oe_searchview_savefilter"> <h4>Save current filter</h4> <form class="oe_form"> <p class="oe_form_required"><input id="oe_searchview_custom_input" placeholder="Filter name"/></p> |
