Browse Source

Merge pull request #9 from x620/9.0-res_partner_mails_count

[FIX] Hiding the left panel if there is no menu
pull/23/head
Ivan Yelizariev 9 years ago
parent
commit
7119ce2391
  1. 1
      mail_base/README.rst
  2. 13
      mail_base/static/src/js/base.js

1
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
-----

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

Loading…
Cancel
Save