{ "id": "roo-file-256", "name": "Pman.Tab.AdminNotifyRecur", "parent": "Pman.Tab.AdminWatchNotify", "title": "Pman.Tab.AdminNotifyRecur", "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotifyRecur.bjs", "items": [ { "listeners": { "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "core_notify_recur", "title": "Recurrent 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).data, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n" }, "*prop": "grid", "autoExpandColumn": "person_id_name", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "|xns": "Roo", "xtype": "Toolbar", "*prop": "toolbar", "items": [ { "listeners": { "select": "function (combo, record, index)\n{\n (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}", "render": "function (_self)\n{\n _this.personCombo = _self;\n}" }, "allowBlank": true, "displayField": "person_id_name", "editable": true, "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", "valueField": "person_id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params._distinct='person_id';\n o.params._columns='person_id,person_id_name,person_id_email';\n o.params['!person_id_name'] = '';\n \n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'person_id_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/core_notify_recur.php'", "|xns": "Roo.data" }, { "*prop": "reader", "xtype": "JsonReader", "|xns": "Roo.data", "id": "id", "root": "data", "totalProperty": "total", "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]" } ] } ] } ] }, { "listeners": { "beforeload": "function (_self, options)\n{\n if (!_this.personCombo) {\n return false;\n }\n var p = _this.personCombo.getValue();\n if (p*1) { \n options.params.person_id = p;\n }\n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'person_id_name', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|url": "baseURL + '/Roo/core_notify_recur.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_id',\n 'type': 'int'\n },\n {\n 'name': 'dtstart',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'dtend',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'max_applied_dt',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'updated_dt',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'last_applied_dt',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'tz',\n 'type': 'string'\n },\n {\n 'name': 'freq',\n 'type': 'string'\n },\n {\n 'name': 'freq_day',\n 'type': 'string'\n },\n {\n 'name': 'freq_hour',\n 'type': 'string'\n },\n {\n 'name': 'onid',\n 'type': 'int'\n },\n {\n 'name': 'ontable',\n 'type': 'string'\n },\n {\n 'name': 'last_event_id',\n 'type': 'int'\n },\n {\n 'name': 'method',\n 'type': 'string'\n }\n]" } ] }, { "*prop": "footer", "xtype": "PagingToolbar", "pageSize": 25, "displayInfo": true, "displayMsg": "Displaying core_notify_recur{0} - {1} of {2}", "emptyMsg": "No core_notify_recur found", "|xns": "Roo" }, { "*prop": "colModel[]", "dataIndex": "person_id_name", "header": "Person", "width": 75, "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": "Dtstart", "width": 75, "dataIndex": "dtstart", "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }", "|xns": "Roo.grid", "*prop": "colModel[]" }, { "xtype": "ColumnModel", "header": "Dtend", "width": 75, "dataIndex": "dtend", "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }", "|xns": "Roo.grid", "*prop": "colModel[]" }, { "*prop": "colModel[]", "dataIndex": "last_applied_dt", "header": "Last Notification created", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "tz", "header": "Tz", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "freq", "header": "Freq", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "freq_day", "header": "Freq day", "width": 200, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "xtype": "ColumnModel", "header": "Freq hour", "width": 200, "dataIndex": "freq_hour", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid", "*prop": "colModel[]" }, { "*prop": "colModel[]", "dataIndex": "onid", "header": "Affects", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v,x,r) { return String.format('{1}:{0}', v,r.data.ontable); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "method", "header": "Method", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" } ] } ] } ], "permname": "", "modOrder": "800" }