adding initial code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Sep 2006 19:08:43 +0000 (19:08 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Sep 2006 19:08:43 +0000 (19:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6167 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/reports/oils_rpt.css [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt.js [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt_builder.js [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt_builder.xhtml [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt_tree.js [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt_utils.js [new file with mode: 0644]
Open-ILS/web/reports/oils_rpt_vars.js [new file with mode: 0644]

diff --git a/Open-ILS/web/reports/oils_rpt.css b/Open-ILS/web/reports/oils_rpt.css
new file mode 100644 (file)
index 0000000..84e87c9
--- /dev/null
@@ -0,0 +1,107 @@
+body { font-size: 9pt; }
+.hide_me { display: none; visibility: hidden; }
+.welcome_box { position:absolute; top: 5px; right: 5px; }
+
+#oils_rpt_table {
+       width: 100%;
+       border-top: 2px solid #E0E0E0;
+       border-left: 2px solid #E0E0E0;
+       margin-top: 25px;
+       margin-left: 10px;
+       padding: 5px;
+}
+
+#oils_rpt_table td {
+       vertical-align: top;
+       padding: 3px;
+}
+
+#oils_rpt_tree_loading { 
+       width: 100%; 
+       text-align: center; 
+       background: #E0E0E0; 
+       margin-top: 40px;
+       padding: 5px;
+}
+
+.oils_rpt_info_item {
+       width: 270px;
+}
+
+.oils_rpt_info_title {
+       text-align: center;
+       font-weight: 600;
+       padding-bottom: 10px;
+}
+
+.oils_rpt_info_selector {
+       border: 1px solid blue; 
+       background: #E0F0E0; 
+       min-height: 130px;
+       max-height: 240px;
+       overflow: scroll;
+       font-size: 8pt;
+}
+
+.oils_rpt_info_div { 
+       text-align: center; 
+       width: 280px; 
+       padding-left: 10px; 
+       padding: 10px;
+       border-left: 2px solid #E0E0E0; 
+       border-bottom: 1px solid #E0E0E0; 
+       margin-right: 20px;
+}
+
+#oils_rpt_table_right_td { 
+       padding-right: 20px; 
+       padding-left: 20px; 
+}
+
+button {
+       color:#050;
+       font-family:'trebuchet ms',helvetica,sans-serif;
+       font-size:84%;
+       font-weight:bold;
+       background-color:#fed;
+       border:1px solid;
+       border-top-color:#696;
+       border-left-color:#696;
+       border-right-color:#363;
+       border-bottom-color:#363;
+       margin: 4px;
+}
+
+.floaty {
+       position: absolute;     
+       text-align: center;
+       z-index: 10;
+       background: #E0F0F0; 
+       border: 3px groove #0033EE;
+       padding: 10px;
+}
+
+
+#oils_rpt_editor_tab_table {
+       width: 100%;
+       background: #F0F0F0;
+       margin: 4px;
+       margin-bottom: 10px;
+       border: 1px solid #808080;
+       border-collapse: collapse;
+}
+
+#oils_rpt_editor_tab_table td {
+       border-left: 1px solid #808080;
+       border-right: 1px solid #808080;
+       padding: 2px;
+}
+
+
+#oils_rpt_column_editor_close_div {
+       margin-top: 5px;
+       padding-top: 5px;
+       border-top: 2px solid #E0E0E0;
+}
+
+
diff --git a/Open-ILS/web/reports/oils_rpt.js b/Open-ILS/web/reports/oils_rpt.js
new file mode 100644 (file)
index 0000000..5c6b692
--- /dev/null
@@ -0,0 +1,48 @@
+
+function oilsInitReports() {
+       oilsRpt = new oilsReport();
+       oilsRptDisplaySelector  = $('oils_rpt_display_selector');
+       oilsRptFilterSelector   = $('oils_rpt_filter_selector');
+
+       /* tell FF to capture mouse movements */
+       document.captureEvents(Event.MOUSEMOVE);
+       document.onmousemove = setMousePos;
+
+       var cgi = new CGI();
+       fetchUser(cgi.param('ses'));
+       $('oils_rpt_user').appendChild(text(USER.usrname()));
+       oilsRptDebugEnabled = cgi.param('dbg');
+
+       oilsDrawRptTree(
+               function() { 
+                       hideMe($('oils_rpt_tree_loading')); 
+                       unHideMe($('oils_rpt_table')); 
+               }
+       );
+
+}
+
+function oilsCleanupReports() {
+       if(oilsRptDebugWindow) oilsRptDebugWindow.close();
+}
+
+
+/* ---------------------------------------------------------------------
+       Define the report object
+       --------------------------------------------------------------------- */
+function oilsReport() {
+       this.select             = [];
+       this.from               = {};
+       this.where              = [];
+       this.params             = {};
+}
+
+oilsReport.prototype.toString = function() {
+       return formatJSON(js2JSON(this));
+}
+
+oilsReport.prototype.toHTMLString = function() {
+       return formatJSONHTML(js2JSON(this));
+}
+
+
diff --git a/Open-ILS/web/reports/oils_rpt_builder.js b/Open-ILS/web/reports/oils_rpt_builder.js
new file mode 100644 (file)
index 0000000..ae8817e
--- /dev/null
@@ -0,0 +1,151 @@
+function oilsRptSplitPath(path) {
+       var parts = path.split(/-/);
+       var column = parts.pop();
+       return [ parts.join('-'), column ];
+}
+
+function oilsRptMakeLabel(path) {
+       var parts = path.split(/-/);
+       var str = '';
+       for( var i = 0; i < parts.length; i++ ) {
+               if(i%2 == 0) {
+                       if( i == 0 )
+                               str += oilsIDL[parts[i]].label;
+               } else {
+                       var column = parts[i];
+                       var data = oilsIDL[parts[i-1]];
+                       var f = grep(data.fields, function(j){return (j.name == column); })[0];
+                       str += ":"+f.label;
+               }
+       }
+       return str;
+}
+
+
+/* adds an item to the display window */
+function oilsAddRptDisplayItem(val) {
+       if( ! oilsAddSelectorItem(oilsRptDisplaySelector, val) ) 
+               return;
+
+       /* add the selected columns to the report output */
+       var splitp = oilsRptSplitPath(val);
+       oilsRpt.select.push( {relation:splitp[0], column:splitp[1]} );
+       oilsRptDebug();
+}
+
+/* removes a specific item from the display window */
+function oilsDelDisplayItem(val) {
+       oilsDelSelectorItem(oilsRptDisplaySelector, val);
+}
+
+/* removes selected items from the display window */
+function oilsDelSelectedDisplayItems() {
+       var list = oilsDelSelectedItems(oilsRptDisplaySelector);
+
+       /* remove the de-selected columns from the report output */
+       oilsRpt.select = grep( oilsRpt.select, 
+               function(i) {
+                       for( var j = 0; j < list.length; j++ ) {
+                               var d = list[j];
+                               var arr = oilsRptSplitPath(d);
+                               _debug(arr);
+                               if( arr[0] == i.relation && arr[1] == i.column ) return false;
+                       }
+                       return true;
+               }
+       );
+       if(!oilsRpt.select) oilsRpt.select = [];
+       oilsRptDebug();
+}
+
+
+/* adds an item to the display window */
+function oilsAddRptFilterItem(val) {
+       oilsAddSelectorItem(oilsRptFilterSelector, val);
+}
+
+/* removes a specific item from the display window */
+function oilsDelFilterItem(val) {
+       oilsDelSelectorItem(oilsRptFilterSelector, val);
+}
+
+/* removes selected items from the display window */
+function oilsDelSelectedFilterItems() {
+       oilsDelSelectedItems(oilsRptFilterSelector);
+}
+
+
+/* adds an item to the display window */
+function oilsAddSelectorItem(sel, val) {
+       var name = oilsRptMakeLabel(val);
+       _debug("adding selector item "+name+' = ' +val);
+       for( var i = 0; i < sel.options.length; i++ ) {
+               var opt = sel.options[i];
+               if( opt.value == val ) return false;
+       }
+       insertSelectorVal( sel, -1, name, val );
+       return true;
+}
+
+/* removes a specific item from the display window */
+function oilsDelSelectorItem(sel, val) {
+       _debug("deleting selector item "+val);
+       var opts = sel.options;
+       for( var i = 0; i < opts.length; i++ ) {
+               var opt = opts[i];
+               if( opt.value == val )  {
+                       if( i == opts.length - 1 ) 
+                               opts[i] = null;
+                       else opts[i] = opts[i+1];
+                       return;
+               }
+       }
+}
+
+/* removes selected items from the display window */
+function oilsDelSelectedItems(sel) {
+       var list = getSelectedList(sel);
+       for( var i = 0; i < list.length; i++ ) 
+               oilsDelSelectorItem(sel, list[i]);
+       return list;
+}
+
+
+function oilsRptDrawDataWindow(path) {
+
+       var parts = path.split(/-/);
+       var col = parts.pop();
+       var cls = parts.pop();
+       var field = grep(oilsIDL[cls].fields, function(f){return (f.name==col);})[0];
+       _debug("setting update data window for column "+col+' on class '+cls);
+
+       var div = $('oils_rpt_column_editor');
+
+       unHideMe(div);
+       /* don't let them see it until the position is fully determined */
+       div.style.visibility='hidden'; 
+
+       oilsRptDrawTransformWindow(path, col, cls, field);
+
+       $('oils_rpt_column_editor_close_button').onclick = function(){hideMe(div);};
+       buildFloatingDiv(div, 600);
+       div.style.visibility='visible';
+
+       /* focus after all the shifting to make sure the div is at least visible */
+       $('oils_rpt_tform_label_input').focus();
+}
+
+
+function oilsRptDrawTransformWindow(path, col, cls, field) {
+       appendClear($('oils_rpt_tform_label'), text(oilsRptMakeLabel(path)));
+       $('oils_rpt_tform_label_input').value = oilsRptMakeLabel(path);
+
+       $('oils_rpt_tform_submit').onclick = 
+               function(){ oilsAddRptDisplayItem(path, $('oils_rpt_tform_label_input').value) };
+
+       $('oils_rpt_tform_label_input').focus();
+       $('oils_rpt_tform_label_input').select();
+}
+
+
+
diff --git a/Open-ILS/web/reports/oils_rpt_builder.xhtml b/Open-ILS/web/reports/oils_rpt_builder.xhtml
new file mode 100644 (file)
index 0000000..e5a0ed0
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version='1.0'?>
+
+<!DOCTYPE html PUBLIC 
+       "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+       <!ENTITY nbsp " ">
+]>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <head>
+               <title>Evergreen: Reports</title>
+               <script language='javascript' src='/opac/common/js/utils.js'> </script>
+               <script language='javascript' src='/opac/common/js//config.js'> </script> 
+               <script language='javascript' src='/opac/common/js/CGI.js'> </script>
+               <script language='javascript' src='/opac/common/js/Cookie.js'> </script>
+               <script language='javascript' src='/opac/common/js/JSON.js'> </script>
+               <script language='javascript' src='/opac/common/js/fmall.js'> </script>
+               <script language='javascript' src='/opac/common/js/fmgen.js'> </script>
+               <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
+               <script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
+               <script language='javascript' src='/opac/common/js/OrgTree.js'> </script>
+               <script language='javascript' src='/opac/common/js/org_utils.js'> </script>
+               <script language='javascript' src='/opac/common/js/init.js'> </script>
+               <script language='javascript' src='/opac/common/js/RemoteRequest.js'> </script>
+               <script language='javascript' src='slimtree.js'> </script>
+
+               <link rel="stylesheet" type="text/css" media="all" 
+                       href="/opac/common/js/jscalendar/calendar-brown.css" title="win2k-cold-1" />
+               <script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script>
+               <script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-en.js"></script>
+               <script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script>
+
+               <script type="text/javascript" src="adminlib.js"></script>
+               <script type="text/javascript" src="oils_rpt_vars.js"></script>
+               <script type="text/javascript" src="oils_rpt_utils.js"></script>
+               <script type="text/javascript" src="oils_rpt_builder.js"></script>
+               <script type="text/javascript" src="oils_rpt_tree.js"></script>
+               <script type="text/javascript" src="oils_rpt.js"></script>
+
+               <link rel="stylesheet" type="text/css" href="oils_rpt.css"> </link>
+
+       </head>
+
+       <body onload='oilsInitReports();' onunload='oilsCleanupReports();'>
+
+               <div class='welcome_box'>
+                       <span>You are logged in as </span><b><span id='oils_rpt_user'/></b>
+               </div>
+
+               <div id='oils_rpt_tree_loading'>
+                       Loading...
+               </div>
+
+               <table class='hide_me' id='oils_rpt_table'>
+                       <tbody>
+                               <tr>
+                                       <td id='oils_rpt_table_left_td' align='left'>
+                                               <div id='oils_rpt_tree_div'>
+                                               </div>
+                                       </td>
+                                       <td id='oils_rpt_table_right_td' align='right'>
+                                               <div class='oils_rpt_info_div'>
+                                                       <div class='oils_rpt_info_item oils_rpt_info_title'>Report Display Items</div>
+                                                       <select id='oils_rpt_display_selector' class='oils_rpt_info_item oils_rpt_info_selector' multiple='multiple'/>
+                                                       <button onclick='oilsDelSelectedDisplayItems();'><u>X</u> Remove Selected Values</button>
+                                               </div>
+                                               <div class='oils_rpt_info_div'>
+                                                       <div class='oils_rpt_info_item oils_rpt_info_title'>Report Filters</div>
+                                                       <select id='oils_rpt_filter_selector' class='oils_rpt_info_item oils_rpt_info_selector' multiple='multiple'/>
+                                                       <button onclick='oilsDelSelectedFilterItems();'><u>X</u> Remove Selected Filters</button>
+                                               </div>
+                                       </td>   
+                               </tr>
+                       </tbody>
+               </table>
+               <span class='hide_me' id='oils_rpt_tree_label'>Report Types</span>
+
+
+               <div id='oils_rpt_column_editor' class='floaty hide_me'>
+
+                       <table id='oils_rpt_editor_tab_table'><tbody><tr>
+                               <td width='33%'><a id='oils_rpt_tform_tab'>Display Items and Transforms</a></td>
+                               <td width='33%'><a id='oils_rpt_tform_tab'>Filters</a></td>
+                               <td width='33%'><a id='oils_rpt_tform_tab'>Aggregate Filters</a></td>
+                       </tr></tbody></table>
+
+                       <div id='oils_rpt_tform_div'>
+                               <b style='padding-right: 10px;' id='oils_rpt_tform_label'/>&nbsp;&nbsp;&nbsp;<input id='oils_rpt_tform_label_input'/>
+                               <br/><br/>
+                               <button id='oils_rpt_tform_submit'>Add Item</button>
+                       </div>
+                       <div id='oils_rpt_column_editor_close_div'>
+                               <button id='oils_rpt_column_editor_close_button'>Close Window</button>
+                       </div>
+               </div>
+
+       </body>
+</html>
+
+
diff --git a/Open-ILS/web/reports/oils_rpt_tree.js b/Open-ILS/web/reports/oils_rpt_tree.js
new file mode 100644 (file)
index 0000000..bd6c083
--- /dev/null
@@ -0,0 +1,171 @@
+var oilsIDLCache = {};
+
+/* fetchs and draws the report tree */
+function oilsDrawRptTree(callback) {
+       oilsLoadRptTree(callback);
+}
+
+/* fetches the IDL XML */
+function oilsLoadRptTree(callback) {
+       var r = new XMLHttpRequest();
+       r.open('GET', OILS_IDL_URL, true);
+       r.onreadystatechange = function() {
+               if( r.readyState == 4 ) {
+                       oilsParseRptTree(r.responseXML, callback);
+               }
+       }
+       r.send(null);
+}
+
+
+/* turns the IDL into a js object */
+function oilsParseRptTree(IDL, callback) {
+       var classes = IDL.getElementsByTagName('class');
+       oilsIDL = {};
+
+       for( var i = 0; i < classes.length; i++ ) {
+               var node = classes[i];
+               var id = node.getAttribute('id');
+
+               var obj = { 
+                       fields  : oilsRptParseFields(node),
+                       table           : node.getAttribute('oils_persist:tablename'),
+                       name            : node.getAttribute('id'),
+                       core            : node.getAttribute('reporter:core'),
+                       label           : node.getAttribute('reporter:label')
+               };
+
+               if( obj.core == 'true' ) obj.core = true;
+               else obj.core = false;
+               obj.label = (obj.label) ? obj.label : obj.name;
+
+               oilsIDL[id] = obj;
+       }
+
+       oilsRenderRptTree(callback);
+}
+
+/* parses the links and fields portion of the IDL */
+function oilsRptParseFields( node ) {
+       var data = [];
+
+       var fields = node.getElementsByTagName('fields')[0];
+       fields = fields.getElementsByTagName('field');
+
+       var links = node.getElementsByTagName('links')[0];
+       if( links )
+               links = links.getElementsByTagName('link');
+       else links = [];
+
+       for( var i = 0; i < fields.length; i++ ) {
+
+               var field = fields[i];
+               var name = field.getAttribute('name');
+
+               var obj = {
+                       field : fields[i],
+                       name    : name,
+                       label : field.getAttribute('reporter:label'),
+                       type    : 'field'
+               }
+
+               var link = null;
+               for( var l = 0; l < links.length; l++ ) {
+                       if( links[l].getAttribute('field') == name ) {
+                               link = links[l];
+                               break;
+                       }
+               }
+
+               if( link ) {
+                       obj.type = 'link';
+                       obj.reltype = link.getAttribute('reltype');
+                       obj.key = link.getAttribute('key');
+                       obj['class'] = link.getAttribute('class');
+               } else {
+                       if( fields[i].getAttribute('oils_persist:virtual') == 'true' ) 
+                               continue;
+               }
+
+               obj.label = (obj.label) ? obj.label : obj.name;
+               data.push(obj);
+       }
+
+       /* sort by field name */
+       data = data.sort(
+               function(a,b) {
+                       if( a.name > b.name ) return 1;
+                       if( a.name < b.name ) return -1;
+                       return 0;
+               }
+       );
+
+       return data;
+}
+
+
+/* shoves the IDL into a UI tree */
+function oilsRenderRptTree(callback) {
+
+       oilsRptTree = new SlimTree( $('oils_rpt_tree_div'), 'oilsRptTree' );
+       var treeId = oilsNextId();
+       oilsRptTree.addNode( treeId, -1, nodeText('oils_rpt_tree_label'));
+       for( var i in oilsIDL ) {
+               var data = oilsIDL[i];
+               if( !data.core ) continue;
+               var subTreeId   = oilsNextId();
+               oilsRptTree.addNode( subTreeId, treeId, data.label );
+               oilsRenderSubTree( data, subTreeId, 'Display Data', '' );
+       }
+       if( callback ) callback();
+}
+
+
+function oilsRenderSubTree( data, subTreeId, rootName, path ) {
+
+       _debug("rendering subtree with full path "+path);
+
+       for( var f = 0; f < data.fields.length; f++ ) {
+
+               var field = data.fields[f];
+               var  dataId = oilsNextId();
+
+               var fval = data.name+'-'+field.name;
+               var fullpath = (path) ? path + '-' + fval : fval;
+
+               /* for now */
+               //var action = 'javascript:oilsAddRptDisplayItem("'+fullpath+'")';
+               var action = 'javascript:oilsRptDrawDataWindow("'+fullpath+'")';
+
+               if( field.type == 'link' )
+                       action = 'javascript:oilsAddLinkTree("' +
+                               dataId+'","'+field['class']+'","'+fullpath+'");';
+
+               oilsRptTree.addNode( dataId, subTreeId, field.label, action );
+       }
+}
+
+
+
+var oilsLinkTreeCache = {};
+function oilsAddLinkTree( parentId, classname, fullpath ) {
+       _debug("adding link with class="+classname+' : full path '+fullpath);
+       if( ! oilsLinkTreeCache[parentId] ) 
+               oilsLinkTreeCache[parentId] = [];
+
+       if( grep ( oilsLinkTreeCache[parentId], 
+               function(i) { return (i == classname); } ) ) {
+                       oilsRptTree.toggle(parentId);
+                       return;
+       }
+
+       oilsLinkTreeCache[parentId].push(classname);
+       var data = grep( oilsIDL, function(i) { return ( i.name == classname ); })[0];
+       var sid = oilsRenderSubTree( data, parentId, '', fullpath );
+       oilsRptTree.open(parentId);
+}
+
+
+
+
+
diff --git a/Open-ILS/web/reports/oils_rpt_utils.js b/Open-ILS/web/reports/oils_rpt_utils.js
new file mode 100644 (file)
index 0000000..0a45e3d
--- /dev/null
@@ -0,0 +1,86 @@
+var oilsRptID = 0;
+function oilsNextId() {
+       return 'oils_'+ (oilsRptID++);
+}
+
+function nodeText(id) {
+       if($(id))
+               return $(id).innerHTML;
+       return "";
+}
+
+function print_tabs(t) {
+       var r = '';
+       for (var j = 0; j < t; j++ ) { r = r + "  "; }
+       return r;
+}
+
+
+function oilsRptDebug() {
+       _debug("\n-------------------------------------\n");
+       _debug(oilsRpt.toString());
+       _debug("\n-------------------------------------\n");
+       if(!oilsRptDebugEnabled) return;
+       //oilsRptDebugWindow;
+}
+
+/* pretty print JSON */
+function formatJSON(s) {
+       var r = ''; var t = 0;
+       for (var i in s) {
+               if (s[i] == '{' || s[i] == '[' ) {
+                       r = r + s[i] + "\n" + print_tabs(++t);
+               } else if (s[i] == '}' || s[i] == ']') {
+                       t--; r = r + "\n" + print_tabs(t) + s[i];
+               } else if (s[i] == ',') {
+                       r = r + s[i] + "\n" + print_tabs(t);
+               } else {
+                       r = r + s[i];
+               }
+       }
+       return r;
+}
+
+
+function print_tabs_html(t) {
+       var r = '';
+       for (var j = 0; j < t; j++ ) { r = r + "&nbsp;&nbsp;"; }
+       return r;
+}
+
+function formatJSONHTML(s) {
+       var r = ''; var t = 0;
+       for (var i in s) {
+               if (s[i] == '{' || s[i] == '[') {
+                       r = r + s[i] + "<br/>" + print_tabs_html(++t);
+               } else if (s[i] == '}' || s[i] == ']') {
+                       t--; r = r + "<br/>" + print_tabs_html(t) + s[i];
+               } else if (s[i] == ',') {
+                       r = r + s[i];
+                       r = r + "<br/>" + print_tabs_html(t);
+               } else {
+                       r = r + s[i];
+               }
+       }
+       return r;
+}
+
+function setMousePos(e) {
+       oilsMouseX = e.pageX
+       oilsMouseY = e.pageY
+       oilsPageXMid = parseInt(window.innerHeight / 2);
+       oilsPageYMid = parseInt(window.innerWidth / 2);
+}  
+
+function buildFloatingDiv(div, width) {
+       var left = parseInt((window.innerWidth / 2) - (width/2));
+       var top = oilsMouseY;
+       var dbot = oilsMouseY + div.clientHeight;
+       if( dbot > window.innerHeight ) {
+               top = oilsMouseY - div.clientHeight - 10;
+       }
+       div.setAttribute('style', 'left:'+left+'px; top:'+top+'px; width:'+width+'px');
+}
+
+
+
diff --git a/Open-ILS/web/reports/oils_rpt_vars.js b/Open-ILS/web/reports/oils_rpt_vars.js
new file mode 100644 (file)
index 0000000..7e58594
--- /dev/null
@@ -0,0 +1,29 @@
+
+/* JS object version of the IDL */
+var oilsIDL;
+
+/* the currently building report */
+var oilsRpt;
+
+/* UI tree  */
+var oilsRptTree;
+
+/* URL to retrieve the IDL from */
+var OILS_IDL_URL = "/reports/fm_IDL.xml";
+
+/* multi-select which shows the user 
+       what data they want to see in the report */
+var oilsRptDisplaySelector;
+
+var oilsRptFilterSelector;
+
+/* display the currently building report object in an external window */
+var oilsRptDebugWindow;
+
+/* if true, show the debugging window */
+var oilsRptDebugEnabled = false;
+
+var oilsMouseX;
+var oilsMouseY;
+var oilsPageXMid;
+var oilsPageYMid;