{ "id": "roo-file-157", "name": "Pman.Tab.AdminNotify", "parent": "Pman.Tab.AdminWatchNotify", "title": "Pman.Tab.AdminNotify", "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotify.bjs", "items": [ { "listeners": { "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n \n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "core_notify", "title": "Current Notifications", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|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}", "|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" }, "*prop": "grid", "autoExpandColumn": "person_id_name", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, options)\n{\n if (!_this.toggleBtn.pressed) {\n options.params['event_id'] = 0;\n }\n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'act_when', direction: 'DESC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|url": "baseURL + '/Roo/core_notify.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': 'act_when',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'onid',\n 'type': 'int'\n },\n {\n 'name': 'ontable',\n 'type': 'string'\n },\n {\n 'name': 'person_id',\n 'type': 'int'\n },\n {\n 'name': 'msgid',\n 'type': 'string'\n },\n {\n 'name': 'sent',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'event_id',\n 'type': 'int'\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 {\n 'name': 'event_id_id',\n 'type': 'int'\n },\n {\n 'name': 'event_id_person_name',\n 'type': 'string'\n },\n {\n 'name': 'event_id_event_when',\n 'type': 'date'\n },\n {\n 'name': 'event_id_action',\n 'type': 'string'\n },\n {\n 'name': 'event_id_ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'event_id_on_id',\n 'type': 'int'\n },\n {\n 'name': 'event_id_on_table',\n 'type': 'string'\n },\n {\n 'name': 'event_id_person_id',\n 'type': 'int'\n },\n {\n 'name': 'event_id_remarks',\n 'type': 'string'\n }\n]" } ] }, { "*prop": "footer", "xtype": "PagingToolbar", "pageSize": 25, "displayInfo": true, "displayMsg": "Displaying core_notify{0} - {1} of {2}", "emptyMsg": "No core_notify found", "|xns": "Roo" }, { "*prop": "toolbar", "xtype": "Toolbar", "|xns": "Roo", "items": [ { "allowBlank": false, "displayField": "person_id_name", "editable": false, "emptyText": "Select person", "forceSelection": true, "hiddenName": "id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "name", "pageSize": 20, "qtip": "Select core_notify", "queryParam": "query[person_id_name]", "selectOnFocus": true, "tpl": "
{person_id_name} {person_id_email}
", "triggerAction": "all", "typeAhead": true, "valueField": "person_id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "*prop": "store", "xtype": "Store", "|xns": "Roo.data", "remoteSort": true, "|sortInfo": "{ direction : 'ASC', field: 'id' }", "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/core_notify.php'" }, { "*prop": "reader", "xtype": "JsonReader", "|xns": "Roo.data", "id": "id", "root": "data", "totalProperty": "total", "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]" } ] } ] }, { "|xns": "Roo.Toolbar", "xtype": "Fill" }, { "listeners": { "render": "function (_self)\n{\n _this.toggleBtn = _self;\n}", "toggle": "function (_self, pressed)\n{\n this.setText(pressed ? \"Hide Completed\" : \"Show Completed\");\n _this.grid.footer.onClick('first');\n}" }, "enableToggle": true, "text": "Show Completed", "xtype": "Button", "|xns": "Roo.Toolbar" } ] }, { "*prop": "colModel[]", "dataIndex": "id", "header": "id#", "sortable": true, "width": 50, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "evtype", "header": "Method", "sortable": true, "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "act_when", "header": "Act when", "sortable": true, "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "sent", "header": "Sent", "sortable": true, "width": 100, "xtype": "ColumnModel", "|renderer": "function(v,x,r) {\n if (r.data.event_id *1 == 0) {\n return '';\n }\n return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');\n }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "ontable", "header": "Ontable", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "person_id_name", "header": "Who to notify", "width": 200, "xtype": "ColumnModel", "|renderer": "function(v,x,r) {\n return String.format('{0} <{1}>', v, r.data.person_id_email); \n }", "|xns": "Roo.grid" }, { "xtype": "ColumnModel", "header": "Msgid", "width": 200, "dataIndex": "msgid", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid", "*prop": "colModel[]" }, { "*prop": "colModel[]", "dataIndex": "event_id_remarks", "header": "Event", "width": 300, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" } ] } ] } ], "permname": "", "modOrder": "001" }