From: Alan Knowles Date: Wed, 30 Mar 2016 10:43:08 +0000 (+0800) Subject: Pman.Tab.AdminLogEvents.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=fadc549074b379289a871f024fb5c951bc0c1297 Pman.Tab.AdminLogEvents.bjs Pman.Tab.AdminLogEvents.js --- diff --git a/Pman.Tab.AdminLogEvents.bjs b/Pman.Tab.AdminLogEvents.bjs index 41231fd..ec7ea9e 100644 --- a/Pman.Tab.AdminLogEvents.bjs +++ b/Pman.Tab.AdminLogEvents.bjs @@ -140,7 +140,7 @@ }, { "listeners" : { - "click" : "function (_self, e)\n{\n \n var params = {\n 'sort' : 'event_when',\n 'dir' : 'DESC',\n 'start' : 0,\n 'limit' : 900,\n person_id : _this.personSel.getValue(), \n 'csvTitles[0]' : 'ID#', 'csvCols[0]' : 'id', \n 'csvTitles[1]' : 'When', 'csvCols[1]' : 'event_when', \n 'csvTitles[2]' : 'Staff', 'csvCols[2]' : 'person_id_name', \n 'csvTitles[3]' : 'Action', 'csvCols[3]' : 'action', \n 'csvTitles[4]' : 'Record ID', 'csvCols[4]' : 'on_id' ,\n 'csvTitles[5]' : 'Record Type', 'csvCols[5]' : 'on_table',\n 'csvTitles[6]' : 'Remarks', 'csvCols[6]' : 'remarks' \n }\n params._with_obj_summary = 1;\n params.person_id = _this.personSel.getValue();\n var act = _this.actionSel.getValue();\n if (act.length) {\n params.action = act;\n }\n var tbl = _this.affectSel.getValue();\n if (tbl.length) {\n params.on_table = tbl;\n }\n act = _this.dateFrom.getValue();\n if (act.format) {\n params['query[from]'] = act.format('Y-m-d');\n }\n act = _this.dateTo.getValue();\n if (act.format) {\n params['query[to]'] = act.format('Y-m-d');\n }\n params.limit = 9999;\n \n\n new Pman.download({\n url : baseURL + '/Roo/Events.php',\n params : params ,\n newWindow: true\n \n });\n}" + "click" : "function (_self, e)\n{\n \n var params = {\n 'sort' : 'event_when',\n 'dir' : 'DESC',\n 'start' : 0,\n 'limit' : 900,\n person_id : _this.personSel.getValue(), \n 'csvTitles[0]' : 'ID#', 'csvCols[0]' : 'id', \n 'csvTitles[1]' : 'When', 'csvCols[1]' : 'event_when', \n 'csvTitles[2]' : 'Staff', 'csvCols[2]' : 'person_id_name', \n 'csvTitles[3]' : 'Action', 'csvCols[3]' : 'action', \n 'csvTitles[4]' : 'Record ID', 'csvCols[4]' : 'on_id' ,\n 'csvTitles[5]' : 'Record Type', 'csvCols[5]' : 'on_table',\n 'csvTitles[6]' : 'Remarks', 'csvCols[6]' : 'remarks' \n };\n params._with_obj_summary = 1;\n params.person_id = _this.personSel.getValue();\n var act = _this.actionSel.getValue();\n if (act.length) {\n params.action = act;\n }\n var tbl = _this.affectSel.getValue();\n if (tbl.length) {\n params.on_table = tbl;\n }\n act = _this.dateFrom.getValue();\n if (act.format) {\n params['query[from]'] = act.format('Y-m-d');\n }\n act = _this.dateTo.getValue();\n if (act.format) {\n params['query[to]'] = act.format('Y-m-d');\n }\n params.limit = 9999;\n \n\n new Pman.download({\n url : baseURL + '/Roo/Events.php',\n params : params ,\n newWindow: true\n \n });\n}" }, "text" : "Download to Excel (with extra descriptions)", "xtype" : "Button", diff --git a/Pman.Tab.AdminLogEvents.js b/Pman.Tab.AdminLogEvents.js index f49ac29..2885143 100644 --- a/Pman.Tab.AdminLogEvents.js +++ b/Pman.Tab.AdminLogEvents.js @@ -195,7 +195,7 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({ 'csvTitles[4]' : 'Record ID', 'csvCols[4]' : 'on_id' , 'csvTitles[5]' : 'Record Type', 'csvCols[5]' : 'on_table', 'csvTitles[6]' : 'Remarks', 'csvCols[6]' : 'remarks' - } + }; params._with_obj_summary = 1; params.person_id = _this.personSel.getValue(); var act = _this.actionSel.getValue();