]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/reports/oils_rpt.js
adding initial code
[working/Evergreen.git] / Open-ILS / web / reports / oils_rpt.js
1
2 function oilsInitReports() {
3         oilsRpt = new oilsReport();
4         oilsRptDisplaySelector  = $('oils_rpt_display_selector');
5         oilsRptFilterSelector   = $('oils_rpt_filter_selector');
6
7         /* tell FF to capture mouse movements */
8         document.captureEvents(Event.MOUSEMOVE);
9         document.onmousemove = setMousePos;
10
11         var cgi = new CGI();
12         fetchUser(cgi.param('ses'));
13         $('oils_rpt_user').appendChild(text(USER.usrname()));
14         oilsRptDebugEnabled = cgi.param('dbg');
15
16         oilsDrawRptTree(
17                 function() { 
18                         hideMe($('oils_rpt_tree_loading')); 
19                         unHideMe($('oils_rpt_table')); 
20                 }
21         );
22
23 }
24
25 function oilsCleanupReports() {
26         if(oilsRptDebugWindow) oilsRptDebugWindow.close();
27 }
28
29
30 /* ---------------------------------------------------------------------
31         Define the report object
32         --------------------------------------------------------------------- */
33 function oilsReport() {
34         this.select             = [];
35         this.from               = {};
36         this.where              = [];
37         this.params             = {};
38 }
39
40 oilsReport.prototype.toString = function() {
41         return formatJSON(js2JSON(this));
42 }
43
44 oilsReport.prototype.toHTMLString = function() {
45         return formatJSONHTML(js2JSON(this));
46 }
47
48