Mar 02, 2012, 11:07 AM
[CLOSED] Override Button Method
Hi,
I'm trying to make visible buttons when it has been focused, my idea is to set x-btn-over class because it highlight.
I've this piece of code:
I'm trying to make visible buttons when it has been focused, my idea is to set x-btn-over class because it highlight.
I've this piece of code:
buttonListenersOverride: function () {
Ext.Button.override({
onBlur: function (e) {
this.el.removeClass('x-btn-focus');
this.el.removeClass('x-btn-over');
},
onFocus: function (e) {
if (!this.disabled) {
this.el.addClass('x-btn-focus');
this.el.addClass('x-btn-over');
}
}
});
}
And I call this method like this (I tried ithout Ext.onReady too):Ext.onReady(function () {
buttonListenersOverride();
});
What's wrong? Or it would be any workaround for my problem?
Last edited by Daniil; Mar 05, 2012 at 8:26 AM.
Reason: [CLOSED]