diff --git a/mail_base/README.rst b/mail_base/README.rst index 6029868..9e89d30 100644 --- a/mail_base/README.rst +++ b/mail_base/README.rst @@ -3,6 +3,7 @@ Mail Base * makes built-in mail js features extendable. * handle ``search_default_*`` parameters in context. +* fixes toggling left bar Usage ----- diff --git a/mail_base/static/src/js/base.js b/mail_base/static/src/js/base.js index 68bce6b..5a43826 100644 --- a/mail_base/static/src/js/base.js +++ b/mail_base/static/src/js/base.js @@ -77,8 +77,21 @@ ChatAction.include({ var self = this; return $.when(result).done(function() { + $('.oe_leftbar').toggle(false); self.searchview.do_search(); }); + }, + destroy: function() { + var result = this._super.apply(this, arguments); + $('.oe_leftbar .oe_secondary_menu').each(function(){ + if ($(this).css('display') == 'block'){ + if ($(this).children().length > 0) { + $('.oe_leftbar').toggle(true); + } + return false; + } + }); + return result; } });