options.params.person_id = p;
}
+ var from = _this.fromDateSel.getValue();
+
+ if(from){
+ options.params.from = from.format('Y-m-d');
+ }
+
+ var to = _this.toDateSel.getValue();
+
+ if(to){
+ options.params.to = to.format('Y-m-d');
+ }
}
},
items : [
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...",
]
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ xtype : 'Separator',
+ xns : Roo.Toolbar
+ },
+ {
+ store : {
+ proxy : {
+ '|xns' : 'Roo.data',
+ url : baseURL + '/Roo/core_enum.php',
+ xtype : 'HttpProxy',
+ method : 'GET',
+ xns : Roo.data
+ },
+ reader : {
+ '|xns' : 'Roo.data',
+ id : 'id',
+ root : 'data',
+ xtype : 'JsonReader',
+ xns : Roo.data,
+ fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
+ totalProperty : 'total'
+ },
+ '|xns' : 'Roo.data',
+ xtype : 'Store',
+ remoteSort : true,
+ sortInfo : { direction : 'ASC', field: 'id' },
+ xns : Roo.data,
+ listeners : {
+ beforeload : function (_self, o){
+ o.params = o.params || {};
+ o.params.etype = 'Core.NotifyType';
+ o.params.active = 1;
+ }
+ },
+ items : [
+
+ ]
+
+ },
+ '|xns' : 'Roo.form',
+ 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...",
+ listeners : {
+ render : function (_self)
+ {
+ _this.typeCombo = _self;
+ },
+ select : function (combo, record, index)
+ {
+ _this.grid.footer.onClick('first');
+ }
+ },
+ items : [
+
+ ]
+
},
{
'|xns' : 'Roo.Toolbar',
},
{
'|xns' : 'Roo.Toolbar',
- text : From,
+ text : "From",
xtype : 'TextItem',
xns : Roo.Toolbar
},
'|xns' : 'Roo.form',
format : 'd/M/Y',
xtype : 'DateField',
- allowBlank : false,
width : 100,
xns : Roo.form,
listeners : {
render : function (_self)\r
{\r
_this.fromDateSel = _self;\r
- _self.setValue( new Date() );\r
+ //_self.setValue( new Date() );\r
+ },
+ select : function (combo, date)
+ {
+ _this.grid.footer.onClick('first');
+ }
+ }
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ xtype : 'Separator',
+ xns : Roo.Toolbar
+ },
+ {
+ '|xns' : 'Roo.Toolbar',
+ text : "To",
+ xtype : 'TextItem',
+ xns : Roo.Toolbar
+ },
+ {
+ '|xns' : 'Roo.form',
+ format : 'd/M/Y',
+ xtype : 'DateField',
+ width : 100,
+ xns : Roo.form,
+ listeners : {
+ render : function (_self)\r
+ {\r
+ _this.toDateSel = _self;\r
+ //_self.setValue( new Date() );\r
},
select : function (combo, date)
{