{ "id": "roo-file-220", "name": "Pman.Dialog.AdminWatch", "parent": "", "title": "", "path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminWatch.bjs", "items": [ { "closable": false, "collapsible": false, "height": 230, "modal": true, "resizable": false, "title": "Edit / Create core_watch", "width": 500, "xtype": "LayoutDialog", "|xns": "Roo", "items": [ { "|xns": "Roo", "xtype": "LayoutRegion", "*prop": "center" }, { "region": "center", "xtype": "ContentPanel", "|xns": "Roo", "items": [ { "listeners": { "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n if (_this.data.id) {\n this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n }\n return;\n }\n if (action.type == 'load') {\n return;\n }\n if (action.type =='submit') {\n \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", "|rendered": "function (form)\n{\n _this.form= form;\n}\n" }, "method": "POST", "style": "margin:10px;", "xtype": "Form", "|url": "baseURL + '/Roo/core_watch.php'", "|xns": "Roo.form", "items": [ { "listeners": { "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}", "|render": "function (_self)\n{\n _this.affectSel = _self;\n}" }, "allowBlank": true, "displayField": "on_table", "editable": false, "emptyText": "Select Table", "fieldLabel": "Table", "forceSelection": true, "listWidth": 300, "loadingText": "Searching...", "minChars": 2, "name": "ontable", "pageSize": 20, "qtip": "Select Action", "queryParam": "query[on_table]", "selectOnFocus": true, "tpl": "
{on_table}
", "triggerAction": "all", "typeAhead": true, "valueField": "action", "width": 150, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|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 ((typeof(Pman.Login) != 'undefined') && 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}" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'on_table' , direction : 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Events.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|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]" } ] } ] }, { "fieldLabel": "ID", "name": "onid", "width": 75, "xtype": "NumberField", "|xns": "Roo.form" }, { "allowBlank": "false", "displayField": "name", "editable": "false", "emptyText": "Select Person", "fieldLabel": "Notify Who", "forceSelection": true, "hiddenName": "person_id", "listWidth": 500, "loadingText": "Searching...", "minChars": 2, "name": "person_id_name", "pageSize": 20, "qtip": "Select Person", "queryParam": "query[name]", "selectOnFocus": true, "tpl": "
{name} ({company_id_name}) <{email}>
", "triggerAction": "all", "typeAhead": true, "valueField": "id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/core_person'" }, { "*prop": "reader", "xtype": "JsonReader", "|xns": "Roo.data", "id": "id", "root": "data", "totalProperty": "total", "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]" } ] } ] }, { "listeners": { "|select": "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}", "|render": "function (_self)\n{\n _this.actionSel = _self;\n}" }, "allowBlank": true, "displayField": "action", "editable": true, "fieldLabel": "Match Event", "forceSelection": false, "listWidth": 300, "loadingText": "Searching...", "minChars": 2, "name": "event", "pageSize": 20, "qtip": "Select Action", "queryParam": "query[action]", "selectOnFocus": true, "tpl": "
{action}
", "triggerAction": "all", "typeAhead": true, "valueField": "action", "width": 150, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|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 (typeof(Pman.Login) !='undefined' && 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}" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'action' , direction : 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Events.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|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]" } ] } ] }, { "allowBlank": true, "displayField": "val", "editable": true, "fieldLabel": "Action", "forceSelection": false, "listWidth": 200, "name": "medium", "triggerAction": "all", "valueField": "val", "width": 200, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "*prop": "store", "xtype": "SimpleStore", "|data": "[ [ 'email' ], [ 'APPROVAL' ], ['ENDOFDAYMAIL'] ]", "|fields": "[ 'val' ]", "|xns": "Roo.data" } ] }, { "fieldLabel": "Active?", "name": "active", "xtype": "Checkbox", "|xns": "Roo.form" }, { "name": "id", "|xns": "Roo.form", "xtype": "Hidden" } ] } ] }, { "listeners": { "click": "function (_self, e)\n{\n _this.dialog.hide();\n}" }, "*prop": "buttons[]", "text": "Cancel", "xtype": "Button", "|xns": "Roo" }, { "listeners": { "click": "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}" }, "*prop": "buttons[]", "text": "Save", "xtype": "Button", "|xns": "Roo" } ] } ], "permname": "", "modOrder": "001" }