From: Edward Date: Wed, 11 Feb 2015 06:28:28 +0000 (+0800) Subject: Pman.Tab.AdminNotify.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=00e339541d5be7204128104eec37cd8183cf5314 Pman.Tab.AdminNotify.bjs Pman.Tab.AdminNotify.js --- diff --git a/Pman.Tab.AdminNotify.bjs b/Pman.Tab.AdminNotify.bjs index 876a644..49edfea 100644 --- a/Pman.Tab.AdminNotify.bjs +++ b/Pman.Tab.AdminNotify.bjs @@ -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, diff --git a/Pman.Tab.AdminNotify.js b/Pman.Tab.AdminNotify.js index 41976fb..73700cc 100644 --- a/Pman.Tab.AdminNotify.js +++ b/Pman.Tab.AdminNotify.js @@ -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 : [