Here’s a bunch for ExtJS...
http://arangluv.tistory.com/18
And here’s something that may get you started with your own xtypes:
Ext.onReady(function() { // Load the xtype (= "template") when ready
MODx.load({ xtype: 'versionx-page-home'}); // xtype should match the first parameter of Ext.reg
});
VersionX.page.Home = function(config) { // Config for page.Home
config = config || {};
Ext.applyIf(config,{
components: [{
xtype: 'versionx-panel-hometabs',
renderTo: 'versionx-panel-home-div' // Div that should be in your page
}]
});
VersionX.page.Home.superclass.constructor.call(this,config);
};
Ext.extend(VersionX.page.Home,MODx.Component); // Extend it from the MODx.Component class.
Ext.reg('versionx-page-home',VersionX.page.Home); // First parameter is the xtype to be referenced, second the config
VersionX.panel.Hometabs = function(config) {
config = config || {};
Ext.apply(config,{
border: false
,baseCls: 'modx-formpanel' // Basic class to use -> styles the whole thing.
,items: [{ // Multidimensional array of items in the panel.Hometabs config
html: '<h2>'+_('versionx.versionx')+'</h2>'
,border: false
,cls: 'modx-page-header' // Header class
},{
xtype: 'modx-tabs' // Use the MODx class template
,bodyStyle: 'padding: 10px'
,defaults: { border: false ,autoHeight: true }
,border: true
,stateful: true
,stateId: 'versionx-home-tabpanel'
,items: [{
title: _('versionx.overviewTitle')
,defaults: { autoHeight: true }
,items: [{
html: '<p>'+_('versionx.overviewDescription')+'</p>'
,border: false
,bodyStyle: 'padding: 10px'
},{
html: '<h3>'+_('versionx.devTitle')+'</h3>'+
'<p>'+_('versionx.devDescription')+'</p>'
,border: false
,bodyStyle: 'padding: 10px'
}]
},{
title: _('versionx.resourcesTitle')
,defaults: { autoHeight: true }
,items: [{
html: '<p>'+_('versionx.resourcesDescription')+'</p>'
,border: false
,bodyStyle: 'padding: 10px'
},{
xtype: 'versionx-grid-resources'
,preventRender: true
}]
},{
title: _('versionx.chunksTitle')+' and '+_('versionx.snippetsTitle')+' coming in 1.1'
,disabled: true
}
/*{
title: _('versionx.chunksTitle')
,defaults: { autoHeight: true }
,disabled: true
,items: [{
html: '<p>'+_('versionx.chunksDescription')+'</p>'
,border: false
,bodyStyle: 'padding: 10px'
}]
},{
title: _('versionx.snippetsTitle')
,defaults: { autoHeight: true }
,disabled: true
,items: [{
html: '<p>'+_('versionx.snippetsDescription')+'</p>'
,border: false
,bodyStyle: 'padding: 10px'
}]
}*/]
}]
});
VersionX.panel.Hometabs.superclass.constructor.call(this,config);
};
Ext.extend(VersionX.panel.Hometabs,MODx.Panel); // Extend it from the base MODx Panel
Ext.reg('versionx-panel-hometabs',VersionX.panel.Hometabs); // Register xtype (template)
I have hopes to be able of writing some documentation on "getting started" with modExt / ExtJS, but that wont be ready for a while.