X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=Pman.Tab.AdminOffice.bjs;h=d6ad503703403f9c9efe4c9ff0c304f7a662ab66;hp=eab7d55ca989c6e52111adab56376817b23ee32c;hb=HEAD;hpb=1668a9d03dd0b388af68c088ac21d1f05a3e27e2 diff --git a/Pman.Tab.AdminOffice.bjs b/Pman.Tab.AdminOffice.bjs index eab7d55..d6ad503 100644 --- a/Pman.Tab.AdminOffice.bjs +++ b/Pman.Tab.AdminOffice.bjs @@ -54,9 +54,9 @@ "* prop" : "dataSource", "items" : [ { - "$ url" : "baseURL + '/Roo/Office.php'", - "xtype" : "HttpProxy", + "$ url" : "baseURL + '/Roo/core_office.php'", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -87,7 +87,7 @@ "items" : [ { "listeners" : { - "|click" : "function()\n{\n if (!_this.dialog) {\n return;\n }\n var cdata = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected().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", @@ -129,8 +129,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Phone", + "width" : 100, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -138,8 +138,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Fax", + "width" : 100, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -147,8 +147,8 @@ }, { "xtype" : "ColumnModel", - "width" : 200, "header" : "Email", + "width" : 200, "$ renderer" : "function (v) {\n return (v.length && v.indexOf('@') > 0 ) ? \n String.format('{0}',v) : v;\n \n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -156,8 +156,8 @@ }, { "xtype" : "ColumnModel", - "width" : 300, "header" : "Address", + "width" : 300, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]",