[fix] small problem with visibility and reinitialize mixin
bzr revid: nicolas.vanhoren@openerp.com-20120605161610-vaokz5p7pz706lqj
This commit is contained in:
parent
240943961e
commit
fdd78a5dcf
|
@ -1382,15 +1382,15 @@ instance.web.form.InvisibilityChangerMixin = {
|
||||||
_.bind(check, this)();
|
_.bind(check, this)();
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
var check_visibility = function() {
|
this.on("change:effective_invisible", this, this._check_visibility);
|
||||||
if (this.get("effective_invisible")) {
|
this._check_visibility();
|
||||||
this.$element.hide();
|
},
|
||||||
} else {
|
_check_visibility: function() {
|
||||||
this.$element.show();
|
if (this.get("effective_invisible")) {
|
||||||
}
|
this.$element.hide();
|
||||||
};
|
} else {
|
||||||
this.on("change:effective_invisible", this, check_visibility);
|
this.$element.show();
|
||||||
_.bind(check_visibility, this)();
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1737,6 +1737,8 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(_.extend({
|
||||||
this.on("change:required", this, this._set_required);
|
this.on("change:required", this, this._set_required);
|
||||||
this._set_required();
|
this._set_required();
|
||||||
}
|
}
|
||||||
|
this._check_visibility();
|
||||||
|
this._check_css_flags();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Private. Do not use.
|
* Private. Do not use.
|
||||||
|
|
Loading…
Reference in New Issue