From 2b587c54ff02e79ca4e074355f77209f9ee8456d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 19 Oct 2016 10:21:36 +0800 Subject: [PATCH] Pman.Tab.AdminOffice.bjs Pman.Tab.AdminOffice.js --- Pman.Tab.AdminOffice.bjs | 2 +- Pman.Tab.AdminOffice.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pman.Tab.AdminOffice.bjs b/Pman.Tab.AdminOffice.bjs index 1001765..846f65e 100644 --- a/Pman.Tab.AdminOffice.bjs +++ b/Pman.Tab.AdminOffice.bjs @@ -87,7 +87,7 @@ "items" : [ { "listeners" : { - "|click" : "function()\n{\n if (!_this.dialog) {\n return;\n }\n var sd = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected();\n if (!sd) {\n Roo.MessageBox.alert(\"Error\", \"Select an company to add an office to\");\n return;\n }\n var cdata = sd .data;\n _dialog.show( { \n id : 0 ,\n company_name : cdata.name,\n company_id : cdata.id,\n address : cdata.address,\n phone : cdata.tel,\n fax : cdata.fax,\n email : cdata.email\n } , function() {\n _this.grid.footer.onClick('first');\n });\n}" + "|click" : "function()\n{\n if (!_this.dialog) {\n return;\n }\n var sd = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected();\n if (!sd) {\n Roo.MessageBox.alert(\"Error\", \"Select an company to add an office to\");\n return;\n }\n var cdata = sd.data;\n _this.dialog.show( { \n id : 0 ,\n company_name : cdata.name,\n company_id : cdata.id,\n address : cdata.address,\n phone : cdata.tel,\n fax : cdata.fax,\n email : cdata.email\n } , function() {\n _this.grid.footer.onClick('first');\n });\n}" }, "text" : "Add", "xtype" : "Button", diff --git a/Pman.Tab.AdminOffice.js b/Pman.Tab.AdminOffice.js index 76942eb..59d9971 100644 --- a/Pman.Tab.AdminOffice.js +++ b/Pman.Tab.AdminOffice.js @@ -104,8 +104,8 @@ Pman.Tab.AdminOffice = new Roo.XComponent({ Roo.MessageBox.alert("Error", "Select an company to add an office to"); return; } - var cdata = sd .data; - _dialog.show( { + var cdata = sd.data; + _this.dialog.show( { id : 0 , company_name : cdata.name, company_id : cdata.id, -- 2.39.2