+ ],
+ "listeners" : {
+ "|beforeload" : [
+ "function (_self, o){",
+ " o.params = o.params || {};",
+ " o.params._distinct='person_id';",
+ " o.params._columns='person_id,person_id_name,person_id_email';",
+ " o.params['!person_id_name'] = '';",
+ " ",
+ " // set more here",
+ "}",
+ ""
+ ]
+ },
+ "remoteSort" : true,
+ "xtype" : "Store"
+ }
+ ],
+ "listWidth" : 400,
+ "listeners" : {
+ "render" : [
+ "function (_self)",
+ "{",
+ " _this.personCombo = _self;",
+ "}"
+ ],
+ "select" : [
+ "function (combo, record, index)",
+ "{",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "loadingText" : "Searching...",
+ "minChars" : 2,
+ "pageSize" : 20,
+ "qtip" : "Select person",
+ "queryParam" : "query[person_id_name]",
+ "selectOnFocus" : true,
+ "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
+ "triggerAction" : "all",
+ "valueField" : "person_id",
+ "width" : 200,
+ "xtype" : "ComboBox"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "xtype" : "Separator"
+ },
+ {
+ "$ xns" : "Roo.form",
+ "allowBlank" : true,
+ "displayField" : "display_name",
+ "editable" : true,
+ "emptyText" : "Select notify type",
+ "forceSelection" : true,
+ "items" : [
+ {
+ "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
+ "$ xns" : "Roo.data",
+ "* prop" : "store",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/Roo/core_enum.php'",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy",
+ "method" : "GET",
+ "xtype" : "HttpProxy"
+ },
+ {
+ "$ fields" : "[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"display_name\",\"type\":\"string\"}]",
+ "$ xns" : "Roo.data",
+ "* prop" : "reader",
+ "id" : "id",
+ "root" : "data",
+ "totalProperty" : "total",
+ "xtype" : "JsonReader"
+ }
+ ],
+ "listeners" : {
+ "|beforeload" : [
+ "function (_self, o){",
+ " o.params = o.params || {};",
+ " o.params.etype = 'Core.NotifyType';",
+ " o.params.active = 1;",
+ "}",
+ ""
+ ]
+ },
+ "remoteSort" : true,
+ "xtype" : "Store"
+ }
+ ],
+ "listWidth" : 400,
+ "listeners" : {
+ "render" : [
+ "function (_self)",
+ "{",
+ " _this.typeCombo = _self;",
+ "}"
+ ],
+ "select" : [
+ "function (combo, record, index)",
+ "{",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "loadingText" : "Searching...",
+ "minChars" : 2,
+ "pageSize" : 20,
+ "qtip" : "Select type",
+ "queryParam" : "query[name]",
+ "selectOnFocus" : true,
+ "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>",
+ "triggerAction" : "all",
+ "valueField" : "name",
+ "width" : 200,
+ "xtype" : "ComboBox"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "xtype" : "Separator"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "text" : "From",
+ "xtype" : "TextItem"
+ },
+ {
+ "$ xns" : "Roo.form",
+ "format" : "d/M/Y",
+ "listeners" : {
+ "render" : [
+ "function (_self)\r",
+ "{\r",
+ " _this.fromDateSel = _self;\r",
+ " //_self.setValue( new Date() );\r",
+ "}"
+ ],
+ "select" : [
+ "function (combo, date)",
+ "{",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "width" : 100,
+ "xtype" : "DateField"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "xtype" : "Separator"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "text" : "To",
+ "xtype" : "TextItem"
+ },
+ {
+ "$ xns" : "Roo.form",
+ "format" : "d/M/Y",
+ "listeners" : {
+ "render" : [
+ "function (_self)\r",
+ "{\r",
+ " _this.toDateSel = _self;\r",
+ " //_self.setValue( new Date() );\r",
+ "}"
+ ],
+ "select" : [
+ "function (combo, date)",
+ "{",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "width" : 100,
+ "xtype" : "DateField"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "xtype" : "Fill"
+ },
+ {
+ "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+ "$ xns" : "Roo.Toolbar",
+ "cls" : "x-btn-text-icon",
+ "listeners" : {
+ "|click" : [
+ "function()",
+ "{",
+ " Pman.genericDelete(_this, 'core_notify'); ",
+ "}",
+ " "
+ ]
+ },
+ "text" : "Delete",
+ "xtype" : "Button"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "enableToggle" : true,
+ "listeners" : {
+ "render" : [
+ "function (_self)",
+ "{",
+ " _this.toggleBtn = _self;",
+ "}"
+ ],
+ "toggle" : [
+ "function (_self, pressed)",
+ "{",
+ " this.setText(pressed ? \"Hide Completed\" : \"Show Completed\");",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "text" : "Show Completed",
+ "xtype" : "Button"
+ }
+ ],
+ "xtype" : "Toolbar"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('{0}', v ); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "id",
+ "header" : "id#",
+ "sortable" : true,
+ "width" : 50,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : [
+ "function(v,x,r) ",
+ "{ ",
+ " var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;",
+ " return String.format('<span qtip=\"{0}\">{1}</span>', v, vv ); ",
+ "}"
+ ],
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "evtype",
+ "header" : "Method",
+ "sortable" : true,
+ "width" : 70,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "act_when",
+ "header" : "Act when",
+ "sortable" : true,
+ "width" : 130,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : [
+ "function(v,x,r) {",
+ " if (r.data.event_id *1 == 0) {",
+ " return '';",
+ " }",
+ " 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" : 130,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "ontable",
+ "header" : "Ontable",
+ "width" : 150,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : [
+ "function(v,x,r) {",
+ "",
+ " var pt = r.data.person_table.toLowerCase() ;",
+ " var pt = pt.length ? pt : 'person';",
+ " var ecol = pt + '_id_email' ;",
+ " var ncol = pt + '_id_name' ;",
+ " return String.format('{0} <u><{1}></u>', r.data[ncol], r.data[ecol]); ",
+ " }"
+ ],
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "person_id_name",
+ "header" : "Who to notify",
+ "width" : 100,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : [
+ "function(v,x,r) {",
+ " return String.format(",
+ " '{0} : {1} {2}', ",
+ " r.data.trigger_event_id_on_table, ",
+ " r.data.trigger_event_id_on_id, ",
+ " r.data.trigger_event_id_remarks",
+ " ); ",
+ " }"
+ ],
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "trigger_event_id",
+ "header" : "Triggered by",
+ "width" : 100,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('{0}', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "msgid",
+ "header" : "Msgid",
+ "width" : 50,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('<span qtip=\"{0}\">{0}</span>', v); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "colModel[]",
+ "dataIndex" : "event_id_remarks",
+ "header" : "Event",
+ "width" : 300,
+ "xtype" : "ColumnModel"
+ }
+ ],
+ "listeners" : {
+ "|render" : [
+ "function() ",
+ "{",
+ " _this.grid = this; ",
+ " //_this.dialog = Pman.Dialog.FILL_IN",
+ " if (_this.panel.active) {",
+ " this.footer.onClick('first');",
+ " }",
+ "}"
+ ]
+ },
+ "loadMask" : true,
+ "xtype" : "Grid"