{
xtype: 'Button',
xns: Roo.Toolbar,
- text : "Add",
- cls : 'x-btn-text-icon',
- icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
listeners : {
click : function()
{
if (!_this.dialog) return;
- _this.dialog.show( { id : 0 } , function() {
+
+ var cdata = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected().data;
+ _dialog.show( {
+ id : 0 ,
+ company_name : cdata.name,
+ company_id : cdata.id,
+ address : cdata.address,
+ phone : cdata.tel,
+ fax : cdata.fax,
+ email : cdata.email
+ } , function() {
_this.grid.footer.onClick('first');
});
}
- }
+ },
+ cls : 'x-btn-text-icon',
+ text : "Add",
+ icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
},
{
xtype: 'Button',