[MERGE] mail followers form widget specific visibility rule

bzr revid: fme@openerp.com-20121121093416-c1gn658pwkca6ldp
This commit is contained in:
Fabien Meghazi 2012-11-21 10:34:16 +01:00
commit fb471068f2
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();