Viewing File plugins/simplereporting/simplereporting.js of 0.00.1a
|
1: /* ------------------------------------------------------------- 2: This file is part of FreeDESK 3: 4: FreeDESK is (C) Copyright 2012 David Cutting 5: 6: FreeDESK is free software: you can redistribute it and/or modify 7: it under the terms of the GNU General Public License as published by 8: the Free Software Foundation, either version 3 of the License, or 9: (at your option) any later version. 10: 11: FreeDESK is distributed in the hope that it will be useful, 12: but WITHOUT ANY WARRANTY; without even the implied warranty of 13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14: GNU General Public License for more details. 15: 16: You should have received a copy of the GNU General Public License 17: along with FreeDESK. If not, see www.gnu.org/licenses 18: 19: For more information see www.purplepixie.org/freedesk/ 20: -------------------------------------------------------------- */ 21: 22: function SimpleReporting() 23: { 24: this.runReport = function(formid) 25: { 26: if (formid == undefined) 27: var formid = "simplereport"; 28: 29: var sYear = document.forms[formid]["sYear"].value; 30: var sMonth = document.forms[formid]["sMonth"].value; 31: var sDay = document.forms[formid]["sDay"].value; 32: 33: var fYear = document.forms[formid]["fYear"].value; 34: var fMonth = document.forms[formid]["fMonth"].value; 35: var fDay = document.forms[formid]["fDay"].value; 36: 37: var opts = "sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay; 38: opts += "&fYear="+fYear+"&fMonth="+fMonth+"&fDay="+fDay; 39: 40: opts += "&runreport=1"; 41: 42: DESK.loadSubpage("simplereporting",opts); 43: } 44: } 45: 46: var simpleReporting = new SimpleReporting(); 47: