Pman.Tab.AdminNotify.bjs
authorEdward <edward@roojs.com>
Wed, 11 Feb 2015 06:28:28 +0000 (14:28 +0800)
committerEdward <edward@roojs.com>
Wed, 11 Feb 2015 06:28:28 +0000 (14:28 +0800)
Pman.Tab.AdminNotify.js

Pman.Tab.AdminNotify.bjs
Pman.Tab.AdminNotify.js

index 876a644..49edfea 100644 (file)
@@ -31,7 +31,7 @@
                     "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}"
                             },
                             "xtype" : "Store",
                             "remoteSort" : true,
index 41976fb..73700cc 100644 (file)
@@ -201,6 +201,17 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                                   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 : [