diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b93274afa4a..23f5782300c 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1084,7 +1084,7 @@ } .openerp .oe-view-manager-header { height: 90px; - overflow: hidden; + overflow: visible; border-bottom: 1px solid black; display: none; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 92b5211e256..e39f04f7559 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -936,7 +936,7 @@ $sheet-padding: 16px // ViewManager common {{{ .oe-view-manager-header height: 90px - overflow: hidden + overflow: visible border-bottom: 1px solid black display: none .oe-right-toolbar diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index e28b1185357..c07a82620a9 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -440,7 +440,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea if (view_manager) { this.view_manager = view_manager; view_manager.on('switch_mode', this, function (e) { - self.drawer.toggle(e === 'graph'); + self.drawer.toggle(false); }); } return $.when(p, this.ready); diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js index a892f348511..dd4ba800245 100644 --- a/addons/web_graph/static/src/js/graph_view.js +++ b/addons/web_graph/static/src/js/graph_view.js @@ -31,10 +31,16 @@ instance.web_graph.GraphView = instance.web.View.extend({ get_domain: function () {}, get_groupby: function () {}, }; - + this.$buttons = options.$buttons; this.view_loaded = $.Deferred(); }, + start: function() { + var $buttons = instance.web.qweb.render("graph-view-buttons"); + this.$buttons.html($buttons); + return this._super(); + }, + view_loading: function (fields_view_get) { var self = this, arch = fields_view_get.arch; @@ -47,6 +53,7 @@ instance.web_graph.GraphView = instance.web.View.extend({ row_groupby: [], col_groupby: [], graph_view: this, + $buttons: this.$buttons }; _.each(arch.children, function (field) { diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js index 97a5ad66d4e..fc1ed4a9296 100644 --- a/addons/web_graph/static/src/js/graph_widget.js +++ b/addons/web_graph/static/src/js/graph_widget.js @@ -26,6 +26,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ this.graph_view = options.graph_view || null; this.pivot_options = options; this.title = options.title || 'Data'; + this.$buttons = options.$buttons; }, start: function() { @@ -33,6 +34,25 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({ this.table = $('