Sep 09, 2015, 8:10 PM
[CLOSED] TextField overrides
Hi,
Could you please advise how to convert to v3.x the following v1.7 overrides:
Could you please advise how to convert to v3.x the following v1.7 overrides:
// http://forums.ext.net/showthread.php?26600-CLOSED-Setting-background-for-required-input-fields
Ext.form.TextField.prototype.initComponent = Ext.form.TextField.prototype.initComponent.createSequence(function () {
if (!this.allowBlank) {
if (this.cls) {
this.cls += " allowBlank-false";
} else {
this.cls = "allowBlank-false";
}
}
});
// Function to toggle AllowBlank property dynamically
Ext.override(Ext.form.TextField, {
setAllowBlank: function (allowBlank) {
this.allowBlank = allowBlank;
if (!allowBlank) {
this.el.addClass("allowBlank-false");
}
else {
this.el.removeClass("allowBlank-false");
}
}
});
Last edited by Daniil; Sep 10, 2015 at 1:22 PM.
Reason: [CLOSED]