3 "name": "Pman.Tab.AdminCompanies",
4 "parent": "Pman.Tab.Admin",
5 "title": "Pman.Tab.AdminCompanies",
6 "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminCompanies.bjs",
11 "xtype": "NestedLayoutPanel",
16 "xtype": "BorderLayout",
21 "xtype": "LayoutRegion",
26 "xtype": "LayoutRegion",
31 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
37 "tableName": "Companies",
44 "|render": "function() \n{\n _this.grid = this; \n _this.dialog = Pman.Dialog.Companies;\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
45 "|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",
46 "rowclick": "function (_self, rowIndex, e)\n{\n try { Pman.Tab.AdminOffice.paging.onClick('refresh'); } catch(e) {}\n}"
49 "autoExpandColumn": "name",
56 "load": "function (_self, records, options)\n{\n try {\n Pman.Tab.AdminOffice.grid.footer.onClick('refresh');\n } catch (e) {}\n}",
57 "beforeload": "function (_self, o)\n{\n o.params = o.params || {};\n o.params['query[name]'] = _this.searchBox.getValue();\n}"
59 "*prop": "dataSource",
62 "|sortInfo": "{ field : 'name', direction: 'ASC' }",
67 "load": "function (This, o, arg)\n{\n \n}"
72 "|url": "baseURL + '/Roo/Companies.php'",
77 "xtype": "JsonReader",
78 "totalProperty": "total",
82 "|fields": "[\n {\n 'name': 'code',\n 'type': 'string'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\n },\n {\n 'name': 'owner_id',\n 'type': 'int'\n },\n {\n 'name': 'address',\n 'type': 'string'\n },\n {\n 'name': 'tel',\n 'type': 'string'\n },\n {\n 'name': 'fax',\n 'type': 'string'\n },\n {\n 'name': 'email',\n 'type': 'string'\n },\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'isOwner',\n 'type': 'int'\n },\n {\n 'name': 'logo_id',\n 'type': 'int'\n },\n {\n 'name': 'background_color',\n 'type': 'string'\n },\n {\n 'name': 'comptype',\n 'type': 'string'\n },\n {\n 'name': 'url',\n 'type': 'string'\n },\n {\n 'name': 'main_office_id',\n 'type': 'int'\n },\n {\n 'name': 'created_by',\n 'type': 'int'\n },\n {\n 'name': 'created_dt',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'updated_by',\n 'type': 'int'\n },\n {\n 'name': 'updated_dt',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'passwd',\n 'type': 'string'\n },\n {\n 'name': 'dispatch_port',\n 'type': 'string'\n },\n {\n 'name': 'province',\n 'type': 'string'\n },\n {\n 'name': 'country',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_id',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_filename',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_ontable',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_onid',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_mimetype',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_width',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_height',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_filesize',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_displayorder',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_language',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_parent_image_id',\n 'type': 'int'\n },\n {\n 'name': 'logo_id_created',\n 'type': 'date'\n },\n {\n 'name': 'logo_id_imgtype',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_linkurl',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_descript',\n 'type': 'string'\n },\n {\n 'name': 'logo_id_title',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_id',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_office_id',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_name',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_phone',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_email',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_company_id',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_role',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_active',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_remarks',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_passwd',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_lang',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_action_type',\n 'type': 'string'\n },\n {\n 'name': 'owner_id_project_id',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'owner_id_deleted_dt',\n 'type': 'date'\n },\n {\n 'name': 'main_office_id_id',\n 'type': 'int'\n },\n {\n 'name': 'main_office_id_company_id',\n 'type': 'int'\n },\n {\n 'name': 'main_office_id_name',\n 'type': 'string'\n },\n {\n 'name': 'main_office_id_address',\n 'type': 'string'\n },\n {\n 'name': 'main_office_id_phone',\n 'type': 'string'\n },\n {\n 'name': 'main_office_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'main_office_id_email',\n 'type': 'string'\n },\n {\n 'name': 'main_office_id_role',\n 'type': 'string'\n }\n]"
88 "xtype": "PagingToolbar",
91 "displayMsg": "Displaying Companies{0} - {1} of {2}",
92 "emptyMsg": "No Companies found",
102 "show": "function (_self)\n{\n_this.searchBox = _self;\n}"
104 "xtype": "TextField",
109 "|click": "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}"
113 "|icon": "rootURL + '/Pman/templates/images/search.gif'",
114 "|xns": "Roo.Toolbar"
118 "|click": "function (_self, e)\n{\n _this.searchBox.setValue('');\n _this.grid.footer.onClick('first');\n}"
122 "|icon": "rootURL + '/Pman/templates/images/edit-clear.gif'",
123 "|xns": "Roo.Toolbar"
126 "|xns": "Roo.Toolbar",
132 "cls": "x-btn-text-icon",
133 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
135 "|click": "function()\n{\n if (!_this.dialog) return;\n _this.dialog.show( { id : 0 } , function() {\n _this.grid.footer.onClick('first');\n }); \n}\n"
137 "|xns": "Roo.Toolbar"
141 "|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"
143 "cls": "x-btn-text-icon",
146 "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
147 "|xns": "Roo.Toolbar"
151 "cls": "x-btn-text-icon",
152 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
155 "|click": "function()\n{\n Pman.genericDelete(_this, 'Companies'); \n}\n "
157 "|xns": "Roo.Toolbar"
162 "*prop": "colModel[]",
163 "dataIndex": "comptype",
167 "xtype": "ColumnModel",
168 "|renderer": "function (v,x ,r) {\n return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);\n}",
172 "*prop": "colModel[]",
177 "xtype": "ColumnModel",
178 "|renderer": "function(v) { return String.format('{0}', v); }",
182 "*prop": "colModel[]",
187 "xtype": "ColumnModel",
188 "|renderer": "function(v,x,r) {\n return String.format(r.data.isOwner ? '<B>{0}</B>' : '{0}',v); \n}",
192 "*prop": "colModel[]",
196 "xtype": "ColumnModel",
197 "|renderer": "function(v) { return String.format('{0}', v); }",
201 "*prop": "colModel[]",
205 "xtype": "ColumnModel",
206 "|renderer": "function(v) { return String.format('{0}', v); }",
210 "*prop": "colModel[]",
211 "dataIndex": "email",
215 "xtype": "ColumnModel",
216 "|renderer": " function (v) {\n return (v.length && v.indexOf('@') > 0 ) ? \n String.format('<a href=\"mailto:{0}\">{0}</a>',v) : v;\n \n }",
220 "*prop": "colModel[]",
221 "dataIndex": "address",
225 "xtype": "ColumnModel",
226 "|renderer": "function(v) { return String.format('{0}', v); }",
230 "xtype": "ColumnModel",
233 "dataIndex": "remarks",
234 "|renderer": "function(v) { return String.format('{0}', v); }",
236 "*prop": "colModel[]"