-
- 1 Posts
Hey, i am developing an extra as having a text and image. i have implemented text add, updated and delete functioning via ccshows.grid.js and other helping files. But i am unable to handle the image filed in the grid. please help me to sort this image field to work like CURD. i want to add listen event to "xtype: 'modx-combo-browser'" which will upload/preview the image and n update it should get inserted to db. As i am new to ExtJs
Mycode in grid as:
CCShows.window.UpdateCCShow = function(config) {
config = config || {};
Ext.applyIf(config,{
title: _('ccshows.ccshow_update')
,url: CCShows.config.connectorUrl
,baseParams: {
action: 'mgr/ccshow/update'
}
,fields: [{
xtype: 'hidden'
,name: 'id'
},{
xtype: 'textfield'
,fieldLabel: _('ccshows.name')
,name: 'name'
,anchor: '100%'
},{
xtype: 'textarea'
,fieldLabel: _('ccshows.description')
,name: 'description'
,anchor: '100%'
},{
xtype: 'modx-combo-browser'
,fieldLabel: _('ccshows.image')
,name: 'image'
},{
xtype: 'modx-combo-browser'
,fieldLabel: _('ccshows.bannerimage')
,name: 'bannerimage'
}]
});
CCShows.window.UpdateCCShow.superclass.constructor.call(this,config);
};
Ext.extend(CCShows.window.UpdateCCShow,MODx.Window);
Ext.reg('ccshows-window-ccshow-update',CCShows.window.UpdateCCShow);
Try adding the below setting after your url setting and before the baseParams.
This should then give you the standard modx file manager window.
Cheers
Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
Visit
CharlesMx.com for latest news and status updates.