"items" : [
{
"listeners" : {
- "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n options.params._evtype_align = 1;\n \n if (!_this.toggleBtn.pressed) {\n options.params['event_id'] = 0;\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 \n}"
+ "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n options.params._evtype_align = 1;\n \n if (!_this.toggleBtn.pressed) {\n options.params['event_id'] = 0;\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 \n var from = _this.fromDateSel.getValue();\n \n if(from){\n options.params.from = from.format('Y-m-d');\n }\n \n var to = _this.toDateSel.getValue();\n \n if(to){\n options.params.to = to.format('Y-m-d');\n }\n \n var type = _this.typeCombo.getValue();\n \n if(type.length){\n o.params.evtype = type;\n }\n}"
},
"xtype" : "Store",
"remoteSort" : true,
"pageSize" : 20,
"displayField" : "person_id_name",
"emptyText" : "Select person",
- "hiddenName" : "id",
"minChars" : 2,
"valueField" : "person_id",
"xtype" : "ComboBox",
"allowBlank" : true,
"editable" : true,
- "width" : 300,
+ "width" : 200,
"$ xns" : "Roo.form",
- "name" : "name",
- "qtip" : "Select core_notify",
+ "qtip" : "Select person",
"queryParam" : "query[person_id_name]",
"tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
"loadingText" : "Searching...",
"xtype" : "Separator",
"$ xns" : "Roo.Toolbar"
},
+ {
+ "listeners" : {
+ "render" : "function (_self)\n{\n _this.typeCombo = _self;\n}",
+ "select" : "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}"
+ },
+ "listWidth" : 400,
+ "triggerAction" : "all",
+ "forceSelection" : true,
+ "selectOnFocus" : true,
+ "pageSize" : 20,
+ "displayField" : "display_name",
+ "emptyText" : "Select notify type",
+ "minChars" : 2,
+ "valueField" : "name",
+ "xtype" : "ComboBox",
+ "allowBlank" : true,
+ "editable" : true,
+ "width" : 200,
+ "$ xns" : "Roo.form",
+ "qtip" : "Select type",
+ "queryParam" : "query[name]",
+ "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>",
+ "loadingText" : "Searching...",
+ "items" : [
+ {
+ "listeners" : {
+ "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n o.params.etype = 'Core.NotifyType';\n o.params.active = 1;\n}\n"
+ },
+ "xtype" : "Store",
+ "remoteSort" : true,
+ "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
+ "$ xns" : "Roo.data",
+ "* prop" : "store",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/Roo/core_enum.php'",
+ "xtype" : "HttpProxy",
+ "method" : "GET",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
+ },
+ {
+ "id" : "id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ xns" : "Roo.data",
+ "$ fields" : "[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"display_name\",\"type\":\"string\"}]",
+ "* prop" : "reader",
+ "totalProperty" : "total"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "xtype" : "Separator",
+ "$ xns" : "Roo.Toolbar"
+ },
{
"text" : "From",
"xtype" : "TextItem",
},
{
"listeners" : {
- "render" : "function (_self)\r\n{\r\n _this.fromDateSel = _self;\r\n _self.setValue( new Date() );\r\n}",
+ "render" : "function (_self)\r\n{\r\n _this.fromDateSel = _self;\r\n //_self.setValue( new Date() );\r\n}",
+ "select" : "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}"
+ },
+ "format" : "d/M/Y",
+ "xtype" : "DateField",
+ "width" : 100,
+ "$ xns" : "Roo.form"
+ },
+ {
+ "xtype" : "Separator",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "text" : "To",
+ "xtype" : "TextItem",
+ "$ xns" : "Roo.Toolbar"
+ },
+ {
+ "listeners" : {
+ "render" : "function (_self)\r\n{\r\n _this.toDateSel = _self;\r\n //_self.setValue( new Date() );\r\n}",
"select" : "function (combo, date)\n{\n _this.grid.footer.onClick('first');\n}"
},
"format" : "d/M/Y",
"xtype" : "DateField",
- "allowBlank" : false,
"width" : 100,
"$ xns" : "Roo.form"
},