X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=Pman.Tab.AdminCompanies.bjs;h=8b1cca5b740fc0d01ee65c94301876b120b0730a;hp=2a0293013283d91c05286bc3e3ec1e28567845a4;hb=HEAD;hpb=ec36f4e56e5761626230c2dd54828a06d44c5f44 diff --git a/Pman.Tab.AdminCompanies.bjs b/Pman.Tab.AdminCompanies.bjs index 2a02930..3293cb7 100644 --- a/Pman.Tab.AdminCompanies.bjs +++ b/Pman.Tab.AdminCompanies.bjs @@ -2,7 +2,7 @@ "name" : "Pman.Tab.AdminCompanies", "parent" : "Pman.Tab.Admin", "title" : "Pman.Tab.AdminCompanies", - "path" : "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminCompanies.bjs", + "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminCompanies.bjs", "permname" : "Admin.Companies", "modOrder" : "030", "strings" : { @@ -25,11 +25,13 @@ "items" : [ { "region" : "center", - "xtype" : "NestedLayoutPanel", "title" : "Companies", + "xtype" : "NestedLayoutPanel", "$ xns" : "Roo", + "Boolean background" : true, "items" : [ { + "Object listeners" : "", "xtype" : "BorderLayout", "$ xns" : "Roo", "* prop" : "layout", @@ -51,9 +53,9 @@ "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, - "region" : "center", "fitToframe" : true, "background" : true, + "region" : "center", "title" : "Companies", "xtype" : "GridPanel", "fitContainer" : true, @@ -74,7 +76,7 @@ "items" : [ { "listeners" : { - "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n try {\n o.params['query[name]'] = _this.searchBox.getValue();\n } catch(e) { return false; }\n}", + "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n try {\n o.params['search[name]'] = _this.searchBox.getValue();\n } catch(e) { return false; }\n}", "load" : "function (_self, records, options)\n{\n try {\n Pman.Tab.AdminOffice.grid.footer.onClick('refresh');\n } catch (e) {}\n}" }, "xtype" : "Store", @@ -87,9 +89,9 @@ "listeners" : { "load" : "function (This, o, arg)\n{\n \n}" }, - "$ url" : "baseURL + '/Roo/Companies.php'", - "xtype" : "HttpProxy", + "$ url" : "baseURL + '/Roo/core_company'", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -151,7 +153,7 @@ }, { "listeners" : { - "|click" : "function()\n{\n var s = _this.grid.getSelectionModel().getSelections();\n if (!s.length || (s.length > 1)) {\n Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n return;\n }\n \n _this.dialog.show(s[0].data, function() {\n _this.grid.footer.onClick('first');\n }); \n \n}\n" + "|click" : "function()\n{\n var s = _this.grid.getSelectionModel().getSelections();\n \n if (!s.length || (s.length > 1)) {\n Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n return;\n }\n \n Pman.Dialog.AdminCompanyMerge.show(s[0].data, function() {\n _this.grid.footer.onClick('first');\n }); \n \n}\n" }, "text" : "Merge", "xtype" : "Button", @@ -185,7 +187,7 @@ }, { "listeners" : { - "|click" : "function()\n{\n Pman.genericDelete(_this, 'Companies'); \n}\n " + "|click" : "function()\n{\n Pman.genericDelete(_this, 'core_company'); \n}\n " }, "text" : "Delete", "xtype" : "Button", @@ -203,7 +205,7 @@ "$ renderer" : "function (v,x ,r) {\n //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);\n return v;\n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", - "dataIndex" : "comptype" + "dataIndex" : "comptype_id_display_name" }, { "xtype" : "ColumnModel", @@ -227,8 +229,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Tel", "width" : 100, + "header" : "Tel", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -236,8 +238,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Fax", "width" : 100, + "header" : "Fax", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -265,8 +267,8 @@ }, { "xtype" : "ColumnModel", - "width" : 200, "header" : "Remarks", + "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]",