[FIX] mail followers: invisible attribute and mode create

bzr revid: chm@openerp.com-20121120162434-g5wfgwndozrcstld
This commit is contained in:
Christophe Matthieu 2012-11-20 17:24:34 +01:00
parent bd7090d0d1
commit 53d35debfd
1 changed files with 6 additions and 6 deletions

View File

@ -36,22 +36,22 @@ openerp_mail_followers = function(session, mail) {
start: function() {
// use actual_mode property on view to know if the view is in create mode anymore
this.view.on("change:actual_mode", this, this._check_visibility);
this._check_visibility();
this.view.on("change:actual_mode", this, this.on_check_visibility_mode);
this.on_check_visibility_mode();
this.reinit();
this.bind_events();
this._super();
},
on_check_visibility_mode: function () {
this.set({"force_invisible": this.view.get("actual_mode") == "create"});
},
set_value: function(_value) {
this.value = _value;
this._super(_value);
},
_check_visibility: function() {
this.$el.toggle(this.view.get("actual_mode") !== "create");
},
reinit: function() {
this.message_is_follower == undefined;
this.display_buttons();