From: Géry Debongnie Date: Thu, 28 Aug 2014 09:49:17 +0000 (+0200) Subject: [IMP] adjust web client height with announcement bar X-Git-Tag: 8.0.0~220 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=6b38b26f6586db2c7e772605fc50016c8129be5e;p=odoo%2Fodoo.git [IMP] adjust web client height with announcement bar when the user is not registered, the announcement bar messed up the layout by adding a third scrollbar. This commit fixes the issue by ajusting the height if necessary. The timeout is necessary to prevent a scrollbar from appearing when the animation is running. --- diff --git a/addons/mail/static/src/js/announcement.js b/addons/mail/static/src/js/announcement.js index 95d4dc6..60c0fde 100644 --- a/addons/mail/static/src/js/announcement.js +++ b/addons/mail/static/src/js/announcement.js @@ -31,12 +31,16 @@ openerp_announcement = function(instance) { var close = function() { var ttl = 7*24*60*60; self.session.set_cookie('ab', 'c', ttl); - $bar.slideUp('slow'); + $bar.slideUp(); + setTimeout(function () { + $('.openerp_webclient_container').css('height', 'calc(100% - 34px)'); + }, 400); }; $bar.find('.close').on('click', close); self.trigger('ab_loaded', $bar); }); + $('.openerp_webclient_container').css('height', 'calc(100% - 64px)'); $('head').append($css); }); }