2 "name" : "Pman.Tab.AdminOffice",
3 "parent" : "Pman.Tab.AdminCompanies",
4 "title" : "Pman.Tab.AdminOffice",
5 "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminOffice.bjs",
9 "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
10 "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
11 "14820f8c54725a56438e99f6bd57dfa3" : "Displaying Office{0} - {1} of {2}",
12 "7dce122004969d56ae2e0245cb754d35" : "Edit",
13 "7407f706267593de473324b2c07ef2fc" : "Offices / Departments / Sub-Companies",
14 "217574e21514de41ec31aaf5ddadb2c3" : "No Office found",
15 "bcc254b55c4a1babdf1dcb82c207506b" : "Phone",
16 "a8fa7984f57a42bb41143f3d7665bd36" : "Name / Department / Sub Comp.",
17 "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
18 "dd7bf230fde8d4836917806aff6a6b27" : "Address",
19 "9810aa2b9f44401be4bf73188ef2b67d" : "Fax"
24 "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
29 "title" : "Offices / Departments / Sub-Companies",
30 "xtype" : "GridPanel",
31 "fitContainer" : true,
33 "tableName" : "Office",
37 "|rowdblclick" : "function (_self, rowIndex, e)\n{\n if (!_this.dialog) { \n return; \n }\n _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n",
38 "|render" : "function() \n{\n _this.grid = this; \n _this.dialog =Pman.Dialog.Office;\n if (_this.panel.active) {\n this.footer.onClick('first');\n } \n}"
40 "autoExpandColumn" : "name",
48 "beforeload" : "function (_self, o)\n{\n try {\n var sm = Pman.Tab.AdminCompanies.grid.getSelectionModel();\n sm = sm.getSelected();\n if (!sm || !sm.data.id) {\n // mask??\n return false;\n }\n \n o.params.company_id = sm.data.id ;\n } catch (e) {\n return false;\n }\n \n \n }"
52 "$ sortInfo" : "{ field : 'name', direction: 'ASC' }",
54 "* prop" : "dataSource",
57 "$ url" : "baseURL + '/Roo/Office.php'",
58 "xtype" : "HttpProxy",
66 "xtype" : "JsonReader",
68 "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'company_id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'address',\n 'type': 'string'\n },\n {\n 'name': 'phone',\n 'type': 'string'\n },\n {\n 'name': 'fax',\n 'type': 'string'\n },\n {\n 'name': 'email',\n 'type': 'string'\n },\n {\n 'name': 'role',\n 'type': 'string'\n },\n {\n 'name': 'company_id_code',\n 'type': 'string'\n },\n {\n 'name': 'company_id_name',\n 'type': 'string'\n },\n {\n 'name': 'company_id_remarks',\n 'type': 'string'\n },\n {\n 'name': 'company_id_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'company_id_address',\n 'type': 'string'\n },\n {\n 'name': 'company_id_tel',\n 'type': 'string'\n },\n {\n 'name': 'company_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'company_id_email',\n 'type': 'string'\n },\n {\n 'name': 'company_id_id',\n 'type': 'int'\n },\n {\n 'name': 'company_id_isOwner',\n 'type': 'int'\n },\n {\n 'name': 'company_id_logo_id',\n 'type': 'int'\n },\n {\n 'name': 'company_id_background_color',\n 'type': 'string'\n },\n {\n 'name': 'company_id_comptype',\n 'type': 'string'\n },\n {\n 'name': 'company_id_url',\n 'type': 'string'\n },\n {\n 'name': 'company_id_main_office_id',\n 'type': 'int'\n },\n {\n 'name': 'company_id_created_by',\n 'type': 'int'\n },\n {\n 'name': 'company_id_created_dt',\n 'type': 'date'\n },\n {\n 'name': 'company_id_updated_by',\n 'type': 'int'\n },\n {\n 'name': 'company_id_updated_dt',\n 'type': 'date'\n },\n {\n 'name': 'company_id_passwd',\n 'type': 'string'\n },\n {\n 'name': 'company_id_dispatch_port',\n 'type': 'string'\n },\n {\n 'name': 'company_id_province',\n 'type': 'string'\n },\n {\n 'name': 'company_id_country',\n 'type': 'string'\n }\n]",
70 "totalProperty" : "total"
76 "xtype" : "PagingToolbar",
77 "emptyMsg" : "No Office found",
80 "displayMsg" : "Displaying Office{0} - {1} of {2}",
90 "|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}"
94 "cls" : "x-btn-text-icon",
95 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
96 "$ xns" : "Roo.Toolbar"
100 "|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 if (!_this.dialog) {\n return;\n }\n s[0].data.company_name = Pman.Tab.AdminCompanies.grid.getSelectionModel().getSelected().data.name;\n _this.dialog.show(s[0].data, function() {\n _this.grid.footer.onClick('first');\n }); \n \n}\n"
104 "cls" : "x-btn-text-icon",
105 "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
106 "$ xns" : "Roo.Toolbar"
110 "|click" : "function()\n{\n Pman.genericDelete(_this, 'Office'); \n}\n "
114 "cls" : "x-btn-text-icon",
115 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
116 "$ xns" : "Roo.Toolbar"
121 "xtype" : "ColumnModel",
123 "header" : "Name / Department / Sub Comp.",
125 "$ renderer" : "function(v) { return String.format('{0}', v); }",
126 "$ xns" : "Roo.grid",
127 "* prop" : "colModel[]",
131 "xtype" : "ColumnModel",
134 "$ renderer" : "function(v) { return String.format('{0}', v); }",
135 "$ xns" : "Roo.grid",
136 "* prop" : "colModel[]",
137 "dataIndex" : "phone"
140 "xtype" : "ColumnModel",
143 "$ renderer" : "function(v) { return String.format('{0}', v); }",
144 "$ xns" : "Roo.grid",
145 "* prop" : "colModel[]",
149 "xtype" : "ColumnModel",
152 "$ renderer" : "function (v) {\n return (v.length && v.indexOf('@') > 0 ) ? \n String.format('<a href=\"mailto:{0}\">{0}</a>',v) : v;\n \n}",
153 "$ xns" : "Roo.grid",
154 "* prop" : "colModel[]",
155 "dataIndex" : "email"
158 "xtype" : "ColumnModel",
160 "header" : "Address",
161 "$ renderer" : "function(v) { return String.format('{0}', v); }",
162 "$ xns" : "Roo.grid",
163 "* prop" : "colModel[]",
164 "dataIndex" : "address"