3 "name": "Pman.Tab.AdminOffice",
4 "parent": "Pman.Tab.AdminCompanies",
5 "title": "Pman.Tab.AdminOffice",
6 "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminOffice.bjs",
10 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
16 "tableName": "Office",
17 "title": "Offices / Departments / Sub-Companies",
24 "autoExpandColumn": "name",
27 "|render": "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
28 "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n _this.grid.footer.onClick('first');\n }); \n}\n"
34 "beforeload": "function (_self, o)\n{\n try {\n var sm = Pman.Tab.Companies.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 }"
36 "*prop": "dataSource",
39 "|sortInfo": "{ field : 'name', direction: 'ASC' }",
46 "|url": "baseURL + '/Roo/Office.php'",
51 "xtype": "JsonReader",
52 "totalProperty": "total",
56 "|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]"
62 "xtype": "PagingToolbar",
65 "displayMsg": "Displaying Office{0} - {1} of {2}",
66 "emptyMsg": "No Office found",
77 "cls": "x-btn-text-icon",
78 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
80 "|click": "function()\n{\n if (!_this.dialog) return;\n _this.dialog.show( { id : 0 } , function() {\n _this.grid.footer.onClick('first');\n }); \n}\n"
87 "cls": "x-btn-text-icon",
88 "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
90 "|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) return;\n _this.dialog.show(s[0].data, function() {\n _this.grid.footer.onClick('first');\n }); \n \n}\n"
96 "cls": "x-btn-text-icon",
97 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
100 "|click": "function()\n{\n Pman.genericDelete(_this, 'Office'); \n}\n "
102 "|xns": "Roo.Toolbar"
107 "xtype": "ColumnModel",
110 "dataIndex": "company_id",
111 "|renderer": "function(v) { return String.format('{0}', v); }",
113 "*prop": "colModel[]"
116 "xtype": "ColumnModel",
120 "|renderer": "function(v) { return String.format('{0}', v); }",
122 "*prop": "colModel[]"
125 "xtype": "ColumnModel",
128 "dataIndex": "address",
129 "|renderer": "function(v) { return String.format('{0}', v); }",
131 "*prop": "colModel[]"
134 "xtype": "ColumnModel",
137 "dataIndex": "phone",
138 "|renderer": "function(v) { return String.format('{0}', v); }",
140 "*prop": "colModel[]"
143 "xtype": "ColumnModel",
147 "|renderer": "function(v) { return String.format('{0}', v); }",
149 "*prop": "colModel[]"
152 "xtype": "ColumnModel",
155 "dataIndex": "email",
156 "|renderer": "function(v) { return String.format('{0}', v); }",
158 "*prop": "colModel[]"
161 "xtype": "ColumnModel",
165 "|renderer": "function(v) { return String.format('{0}', v); }",
167 "*prop": "colModel[]"