Pman.Tab.AdminOffice.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 12 May 2011 08:27:09 +0000 (16:27 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 12 May 2011 08:27:09 +0000 (16:27 +0800)
Pman.Tab.AdminOffice.js

index 27dd89b..f60855e 100644 (file)
@@ -247,18 +247,28 @@ Pman.Tab.AdminOffice = new Roo.util.Observable({
                         {
                             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',