Feb 14, 2013, 4:06 PM
Helpful Panel javascript overrides for 2.x
The following javascript methods were deprecated in 2.x. IMO, they shouldn't be since they are such good convenient methods. So here's a quick way to get them back.
Admin: feel free to move this to Examples and Extras if that's more appropriate
Admin: feel free to move this to Examples and Extras if that's more appropriate
Ext.panel.Panel.override({
getTool: function (type) {
return this.down('tool[type=' + type + ']');
},
getBottomToolbar: function () {
return this.getDockedItems('toolbar[dock="bottom"]')[0];
},
getTopToolbar: function () {
return this.getDockedItems('toolbar[dock="top"]')[0];
}
});