Skip to content

Instantly share code, notes, and snippets.

@jotapepinheiro
Created April 29, 2012 02:50
Show Gist options
  • Save jotapepinheiro/2526253 to your computer and use it in GitHub Desktop.
Save jotapepinheiro/2526253 to your computer and use it in GitHub Desktop.
Ext.extend - ARQUIVO PADRAO
CategoriasLista = Ext.extend(Ext.Panel, {
title : 'Titulo'
,$depends : [pluginFormUx + 'statusbar/StatusBar']//CARREGA ARQUIVOS DINAMICAMENTE
,layout : 'fit'
,initComponent: function() {
var tbar = new Ext.Toolbar({
items:
[
{
xtype: 'button',
text: 'Clique',
handler: function (button, event) {
alert(this.method());
},
scope: this
}
]
});
var bbar = new Ext.ux.StatusBar({
defaultText: 'Default status',
id: 'basic-statusbar',
items: [{
xtype: 'button',
text: 'Clique',
handler: function (button, event) {
alert(this.method());
},
scope: this
}, '-', 'Plain Text', ' ', ' '
]
});
Ext.apply(this, {
tbar: tbar
,bbar: bbar
});
CategoriasLista.superclass.initComponent.apply(this, arguments);
}
,method: function () {
return 'Ok!';
}
,initEvents: function()
{
this.on(
{
//
});
CategoriasLista.superclass.initEvents.call(this);
}
,loadStore: function()
{
//this.store.load();
}
,onDestroy: function()
{
CategoriasLista.superclass.onDestroy.apply(this, arguments);
}
});
Ext.reg('CategoriasLista',CategoriasLista);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment