I'm trying to build a cmp in revo 2.3. I'm getting some odd results. The panel renders fine and everything appears to come together until I add the grid. Then the custom script does not render and there are no errors displaying in firebug. I'm at a loss. I've even stripped the grid down to the very basics.
My Controller:
class DoodleHomeManagerController extends modExtraManagerController {
public $doodle;
public function initialize() {
$this->doodle= new Doodle($this->modx);
$this->addJavascript($this->doodle->config['jsUrl'].'mgr/doodle.js');
$this->addHtml('<script type="text/javascript">
Ext.onReady(function() {
Doodle.config= '.$this->modx->toJSON($this->doodle->config).';
});
</script>');
return parent::initialize();
}
public function getLanguageTopics() {
return array('doodle:default');
}
public function checkPermissions() { return true; }
public function getPageTitle() {
return $this->modx->lexicon('doodle.simple_cart');
}
public function loadCustomCssJs() {
$this->addJavascript($this->doodle->config['jsUrl'].'mgr/widgets/home/test.grid.js');
$this->addJavascript($this->doodle->config['jsUrl'].'mgr/widgets/home/home.panel.js');
$this->addJavascript($this->doodle->config['jsUrl'].'mgr/sections/home.js');
}
public function getTemplateFile() {
return 'home.tpl';
}
}
My home panel (works fine if I comment out the grid:
// JavaScript Document
Doodle.panel.Home = function(config) {
config = config || {};
Ext.apply(config,{
border: false
,baseCls: 'modx-formpanel'
,cls: 'container'
,items: [{
html: '<h2>'+_('doodle')+'</h2>'
,border: false
,cls: 'modx-page-header'
},{
xtype: 'modx-tabs'
,defaults: { border: false ,autoHeight: true }
,border: true
,items: [{
title: _('doodle.test')
,defaults: { autoHeight: true }
,items: [{
html: '<p>'+_('doodle.test.desc')+'</p>'
,border: false
,bodyCssClass: 'panel-desc'
},{
xtype: 'doodle-grid-test'
,cls: 'main-wrapper'
,preventRender: true
}]
}]
}]
});
Doodle.panel.Home.superclass.constructor.call(this,config);
};
Ext.extend(Doodle.panel.Home,MODx.Panel);
Ext.reg('doodle-panel-home',Doodle.panel.Home);
My stripped down grid:
Doodle.grid.Test = function(config) {
config = config || {};
Ext.applyIf(config, {
fields: ['id','menu']
,columns: [{
header: _('id')
,dataIndex: 'id'
,sortable: true
,width: 100
}]
});
Doodle.grid.Test.superclass.constructor.call(this, config);
};
Ext.extend(Doodle.grid.Test, MODx.grid.Grid);
Ext.reg('doodle-grid-test', Doodle.grid.Test);
What am I doing wrong