3 "name": "Pman.Dialog.AdminWatch",
6 "path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminWatch.bjs",
13 "title": "Edit / Create core_watch",
15 "xtype": "LayoutDialog",
20 "xtype": "LayoutRegion",
25 "xtype": "ContentPanel",
32 "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n",
33 "|rendered": "function (form)\n{\n _this.form= form;\n}\n"
36 "style": "margin:10px;",
37 "|url": "baseURL + '/Roo/core_watch.php'",
41 "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}",
42 "|render": "function (_self)\n{\n _this.affectSel = _self;\n}"
45 "displayField": "on_table",
47 "emptyText": "Select Table",
48 "fieldLabel": "Table",
49 "forceSelection": true,
51 "loadingText": "Searching...",
55 "qtip": "Select Action",
56 "queryParam": "query[on_table]",
57 "selectOnFocus": true,
58 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>",
59 "triggerAction": "all",
61 "valueField": "action",
68 "|beforeload": "function (_self, o)\n{\n o.params = o.params || {};\n // staff can see all logs, other companies can only see their own.\n if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n o.params.company_id = Pman.Login.authUser.company_id;\n }\n o.params._distinct = 'on_table';\n o.params._columns ='on_table';\n}"
73 "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }",
80 "|url": "baseURL + '/Roo/Events.php'",
85 "xtype": "JsonReader",
86 "totalProperty": "total",
90 "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'person_name',\n 'type': 'string'\n },\n {\n 'name': 'event_when',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'action',\n 'type': 'string'\n },\n {\n 'name': 'ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'on_id',\n 'type': 'int'\n },\n {\n 'name': 'on_table',\n 'type': 'string'\n },\n {\n 'name': 'person_id',\n 'type': 'int'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\n },\n {\n 'name': 'person_id_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_office_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_name',\n 'type': 'string'\n },\n {\n 'name': 'person_id_phone',\n 'type': 'string'\n },\n {\n 'name': 'person_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'person_id_email',\n 'type': 'string'\n },\n {\n 'name': 'person_id_company_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_role',\n 'type': 'string'\n },\n {\n 'name': 'person_id_active',\n 'type': 'int'\n },\n {\n 'name': 'person_id_remarks',\n 'type': 'string'\n },\n {\n 'name': 'person_id_passwd',\n 'type': 'string'\n },\n {\n 'name': 'person_id_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_lang',\n 'type': 'string'\n },\n {\n 'name': 'person_id_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'person_id_action_type',\n 'type': 'string'\n },\n {\n 'name': 'person_id_project_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'person_id_deleted_dt',\n 'type': 'date'\n }\n]"
100 "xtype": "NumberField",
104 "allowBlank": "false",
105 "displayField": "name",
107 "emptyText": "Select Person",
108 "fieldLabel": "Notify Who",
109 "forceSelection": true,
110 "hiddenName": "person_id",
112 "loadingText": "Searching...",
114 "name": "person_id_name",
116 "qtip": "Select Person",
117 "queryParam": "query[name]",
118 "selectOnFocus": true,
119 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
120 "triggerAction": "all",
132 "|sortInfo": "{ direction : 'ASC', field: 'id' }",
134 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
139 "xtype": "HttpProxy",
142 "|url": "baseURL + '/Roo/Person.php'"
146 "xtype": "JsonReader",
150 "totalProperty": "total",
151 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
158 "fieldLabel": "Event",
166 "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}",
167 "|render": "function (_self)\n{\n _this.actionSel = _self;\n}"
170 "displayField": "action",
172 "emptyText": "Select Action",
173 "forceSelection": true,
175 "loadingText": "Searching...",
179 "qtip": "Select Action",
180 "queryParam": "query[action]",
181 "selectOnFocus": true,
182 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{action}</b> </div>",
183 "triggerAction": "all",
185 "valueField": "action",
192 "|beforeload": "function (_self, o)\n{\n o.params = o.params || {};\n // staff can see all logs, other companies can only see their own.\n if (Pman.Login.authUser.company_id_comptype != 'OWNER') {\n o.params.company_id = Pman.Login.authUser.company_id;\n }\n o.params._distinct = 'action';\n o.params._columns ='action';\n}"
197 "|sortInfo": "{ field : 'action' , direction : 'ASC' }",
203 "xtype": "HttpProxy",
204 "|url": "baseURL + '/Roo/Events.php'",
209 "xtype": "JsonReader",
210 "totalProperty": "total",
214 "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'person_name',\n 'type': 'string'\n },\n {\n 'name': 'event_when',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'action',\n 'type': 'string'\n },\n {\n 'name': 'ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'on_id',\n 'type': 'int'\n },\n {\n 'name': 'on_table',\n 'type': 'string'\n },\n {\n 'name': 'person_id',\n 'type': 'int'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\n },\n {\n 'name': 'person_id_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_office_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_name',\n 'type': 'string'\n },\n {\n 'name': 'person_id_phone',\n 'type': 'string'\n },\n {\n 'name': 'person_id_fax',\n 'type': 'string'\n },\n {\n 'name': 'person_id_email',\n 'type': 'string'\n },\n {\n 'name': 'person_id_company_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_role',\n 'type': 'string'\n },\n {\n 'name': 'person_id_active',\n 'type': 'int'\n },\n {\n 'name': 'person_id_remarks',\n 'type': 'string'\n },\n {\n 'name': 'person_id_passwd',\n 'type': 'string'\n },\n {\n 'name': 'person_id_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_lang',\n 'type': 'string'\n },\n {\n 'name': 'person_id_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'person_id_action_type',\n 'type': 'string'\n },\n {\n 'name': 'person_id_project_id',\n 'type': 'int'\n },\n {\n 'name': 'person_id_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'person_id_deleted_dt',\n 'type': 'date'\n }\n]"
221 "fieldLabel": "Action",
224 "xtype": "TextField",
228 "fieldLabel": "Active",
245 "click": "function (_self, e)\n{\n _this.dialog.hide();\n}"
247 "*prop": "buttons[]",
254 "click": "function (_self, e)\n{\n // do some checks?\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
256 "*prop": "buttons[]",