diff options
| author | Géry Debongnie <ged@odoo.com> | 2014-05-26 14:51:47 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2014-05-26 14:51:47 +0200 |
| commit | 5e367d958cdebdf4c2659c2d7fe0823cdf363bb6 (patch) | |
| tree | 02427518ce332315ce9ba7ff7b6da08510d8a3be /addons/web/static | |
| parent | 14d4cd4ad481843c7d1d233591172ad2119b4737 (diff) | |
[FIX] adjust view top when header height changes
the header height is not fixed, it can change when the breadcrumbs
start a new line, or when there is only one view type (for ex, in most
reporting views). So, the top value of the view_manager_body has to be
adjusted accordingly.
Diffstat (limited to 'addons/web/static')
| -rw-r--r-- | addons/web/static/src/css/base.css | 2 | ||||
| -rw-r--r-- | addons/web/static/src/css/base.sass | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/search.js | 14 |
3 files changed, 14 insertions, 4 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index ab156b283b9..53be627f486 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1150,7 +1150,7 @@ .openerp .oe_application > div > .oe_view_manager > .oe_view_manager_body { position: absolute; overflow: auto; - top: 91px; + top: 66px; bottom: 0; left: 0; right: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index e2305826cb6..1cea0a006f7 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -964,7 +964,7 @@ $sheet-padding: 16px > .oe_view_manager_body position: absolute overflow: auto - top: 91px + top: 66px bottom: 0 left: 0 right: 0 diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 6c07a2f0c86..25c78c36bbf 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -435,8 +435,18 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea view_manager.on('switch_mode', this, function (e) { self.drawer.toggle(e === 'graph'); }); - } - return $.when(p, this.ready); + } + $(window).resize(this.adjust_top.bind(this)); + return $.when(p, this.ready).then(this.adjust_top.bind(this)); + }, + + adjust_top: function () { + // hack to adjust the top of the view manager body to the actual header height + var parent = this.getParent(); + if (parent) { + var h = parent.$(".oe_view_manager_header").height() + 1; + parent.$(".oe_view_manager_body").css('top', h + 'px'); + } }, set_drawer: function (drawer) { |
