,items: [{
title: 'Tariffs'
,defaults: { autoHeight: true }
,items: [{
html: '<p>'+_('tariffs.management_desc')+'</p><br />'
,border: false
},{
xtype: 'tariffs-grid-tariffs'
,preventRender: true
}]
},{
title: 'Properties'
,defaults: { autoHeight: true }
,items: [{
html: '<p>'+_('tariffs.property_management_desc')+'</p><br />'
,border: false
},{
xtype: 'tariffs-grid-properties'
,preventRender: true
}]
}]
Tariffs.grid.Properties = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'tariffs-grid-properties'
,url: Tariffs.config.connector_url
,baseParams: { action: 'mgr/property/getList' }
,save_action: 'mgr/property/updateFromGrid'
,fields: ['id','name','address','town','postcode']
,paging: true
,autosave: true
,remoteSort: true
,anchor: '97%'
,columns: [{
header: _('id')
,dataIndex: 'id'
,sortable: false
,width: 2
},{
header: _('tariffs.property_name')
,dataIndex: 'name'
,sortable: true
,width: 30
,editor: { xtype: 'textfield' }
},{
header: _('tariffs.property_address')
,dataIndex: 'address'
,sortable: true
,width: 30
,editor: { xtype: 'textfield' }
},{
header: _('tariffs.property_town')
,dataIndex: 'town'
,sortable: false
,width: 30
,editor: { xtype: 'textfield' }
},{
header: _('tariffs.property_postcode')
,dataIndex: 'postcode'
,sortable: false
,width: 10
,editor: { xtype: 'textfield' }
}]
});
Tariffs.grid.Properties.superclass.constructor.call(this,config)
};
Ext.reg('tariffs-grid-properties',Tariffs.grid.Properties);
Tariffs.panel.Home.superclass.constructor.call(this,config);
Uncaught TypeError: Cannot read property 'constructor' of undefined

Tariffs.panel.Home = function(config) {
config = config || {};
Ext.apply(config,{
border: false
,baseCls: 'modx-formpanel'
,items: [{
html: '<h2>'+_('tariffs.management')+'</h2>'
,border: false
,cls: 'modx-page-header'
},{
xtype: 'modx-tabs'
,bodyStyle: 'padding: 10px'
,defaults: { border: false ,autoHeight: true }
,border: true
,activeItem: 0
,hideMode: 'offsets'
,items: [{
title: 'Tariffs'
,items: [{
html: '<p>'+_('tariffs.management_desc')+'</p><br />'
,border: false
},{
xtype: 'tariffs-grid-tariffs'
,preventRender: true
}]
},{
title: 'Properties'
,items: [{
html: '<p>'+_('tariffs.property_management_desc')+'</p><br />'
,border: false
},{
xtype: 'tariffs-grid-properties'
,preventRender: true
}]
}]
}]
});
Tariffs.panel.Home.superclass.constructor.call(this,config);
};
Ext.extend(Tariffs.panel.Home,MODx.Panel);
Ext.reg('tariffs-panel-home',Tariffs.panel.Home);
Tariffs.grid.Properties = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'tariffs-grid-properties'
,url: Tariffs.config.connector_url
,baseParams: { action: 'mgr/property/getList' }
,save_action: 'mgr/property/updateFromGrid'
,fields: ['id','name','address','town','postcode']
,paging: true
,autosave: true
,remoteSort: true
,anchor: '97%'
,columns: [{
header: _('id')
,dataIndex: 'id'
,sortable: false
,width: 2
},{
header: _('tariffs.property')
,dataIndex: 'name'
,sortable: true
,width: 30
,editor: { xtype: 'textfield' }
},{
header: _('tariffs.address')
,dataIndex: 'address'
,sortable: true
,width: 30
,editor: { xtype: 'textfield' }
},{
header: _('tariffs.town')
,dataIndex: 'town'
,sortable: false
,width: 30
,editor: { xtype: 'textfield' }
},{
header: _('tariffs.postcode')
,dataIndex: 'postcode'
,sortable: false
,width: 10
,editor: { xtype: 'textfield' }
}]
});
Tariffs.grid.Properties.superclass.constructor.call(this,config);
};
Ext.extend(Tariffs.grid.Properties,MODx.grid.Grid);
Ext.reg('tariffs-grid-properties',Tariffs.grid.Properties);