I’m going a bit crazy here, been trying for hours and no result...
I have a tbar button set to open a MODx.Window but when I click the button I get no window.
Code (additional functions removed):
LandRover.tree.HomeRun = function(config) {
config = config || {};
Ext.applyIf(config,{
rootVisible: false
,rootName: _('homerun.builders')
,root_id: 'n_root_0'
,title: _('homerun.builders')
,ddAppendOnly: true
,expandFirst: true
,enableDrag: true
,enableDrop: true
,url: LandRover.config.connectorUrl
,action: 'mgr/homes/getNodes'
,primaryKey: 'id'
,useDefaultToolbar: true
,tbar: [{
text: _('new')+' '+_('homerun.home')
,handler: { xtype: 'landrover-window-home-create' ,blankValues: true }
}]
});
LandRover.tree.HomeRun.superclass.constructor.call(this,config);
};
Ext.extend(LandRover.tree.HomeRun,MODx.tree.Tree);
Ext.reg('landrover-tree-homerun',LandRover.tree.HomeRun);
LandRover.window.CreateHome = function(config) {
config = config || {};
Ext.applyIf(config,{
title: _('homerun.home_new')
,url: LandRover.config.connectorUrl
,baseParams: {
action: 'mgr/homes/create'
}
,fields: [{
xtype: 'textfield'
,fieldLabel: _('homerun.home_name')
,name: 'name'
,width: 200
}]
});
LandRover.window.CreateHome.superclass.constructor.call(this,config);
};
Ext.extend(LandRover.window.CreateHome,MODx.Window);
Ext.reg('landrover-window-home-create',LandRover.window.CreateHome);
The problem is with the
LandRover.window.CreateHome function and the ’landrover-window-home-create’ xtype.
I get this error message from Firebug:
this.handler is not a function
ERROR: onFunctionCall ERROR invalid context
The infuriating thing is I paste this function (and tbar settings) into a different CMP and it works perfectly
Any ideas would be really appreciated!!