[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.
This commit is contained in:
Géry Debongnie 2014-08-28 11:49:17 +02:00
parent 2fdc9581fc
commit 6b38b26f65
1 changed files with 5 additions and 1 deletions

View File

@ -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);
});
}