Pman.Tab.AdminLogDrill.bjs
authorAlan Knowles <alan@akbkhome.com>
Tue, 17 Jan 2012 07:13:47 +0000 (15:13 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 17 Jan 2012 07:13:47 +0000 (15:13 +0800)
Pman.Tab.AdminLogDrill.bjs
Pman.Tab.AdminLogDrill.js
Pman.Tab.AdminLogDrill.js

Pman.Tab.AdminLogDrill.bjs
Pman.Tab.AdminLogDrill.js

index b447d89..671eb26 100644 (file)
@@ -61,7 +61,7 @@
                                     "items": [
                                         {
                                             "listeners": {
-                                                "beforeload": "function (_self, o)\n{\n    if (! _this.dateFrom) {\n     return;\n    }\n    o.params = o.params || {};\n     \n    var act = _this.actionSel.getValue();\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel.getValue();\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n    \n    \n    \n    o.params['query[person_sum]'] = 1;\n    o.params._columns = 'person_id,person_id_name,person_id_email,qty';\n    o.params.limit = 999;\n \n}"
+                                                "beforeload": "function (_self, o)\n{\n    if (! _this.dateFrom) {\n     return;\n    }\n    o.params = o.params || {};\n     \n    var act = _this.actionSel ? _this.actionSel.getValue() : '';\n    if (act.length) {\n        o.params.action = act;\n    }\n    var tbl = _this.affectSel ? _this.affectSel.getValue() : '';\n    if (tbl.length) {\n        o.params.on_table = tbl;\n    }\n    act = _this.dateFrom.getValue();\n    if (act.format) {\n        o.params['query[from]'] = act.format('Y-m-d');\n    }\n    act = _this.dateTo.getValue();\n    if (act.format) {\n        o.params['query[to]'] = act.format('Y-m-d');\n    }\n    \n    \n    \n    o.params['query[person_sum]'] = 1;\n    o.params._columns = 'person_id,person_id_name,person_id_email,qty';\n    o.params.limit = 999;\n \n}"
                                             },
                                             "*prop": "dataSource",
                                             "remoteSort": true,
index 2f532e9..3230f2d 100644 (file)
@@ -87,11 +87,11 @@ Pman.Tab.AdminLogDrill = new Roo.util.Observable({
                                         }
                                         o.params = o.params || {};
                                          
-                                        var act = _this.actionSel.getValue();
+                                        var act = _this.actionSel ? _this.actionSel.getValue() : '';
                                         if (act.length) {
                                             o.params.action = act;
                                         }
-                                        var tbl = _this.affectSel.getValue();
+                                        var tbl = _this.affectSel ? _this.affectSel.getValue() : '';
                                         if (tbl.length) {
                                             o.params.on_table = tbl;
                                         }