bf3594ed9d29d47591951347babe7f1dce209245
[Evergreen.git] / Open-ILS / web / reports / oils_rpt_vars.js
1 /* dom nodes with IDs are inserted into DOM as DOM[id] */
2 var DOM = {};
3
4 /* JS object version of the IDL */
5 var oilsIDL;
6
7 /* the currently building report */
8 var oilsRpt;
9
10 /* UI tree  */
11 var oilsRptTree;
12
13 var oilsRptCurrentOrg;
14 var oilsRptMyOrgs;
15
16 var oilsRptCookie;
17
18 var oilsRptTemplateFolderTree;
19 var oilsRptReportFolderTree;
20 var oilsRptOutputFolderTree;
21 var oilsRptSharedTemplateFolderTree;
22 var oilsRptSharedReportFolderTree;
23 var oilsRptSharedOutputFolderTree;
24
25 var oilsRptOutputLimit = 10;
26 var oilsRptOutputLimit2 = 10;
27
28 var OILS_RPT_INVALID_DATA = 'oils_rpt_invalid_input';
29
30 /* URL to retrieve the IDL from */
31 var OILS_IDL_URL = "/reports/fm_IDL.xml";
32
33 var OILS_IDL_OUTPUT_URL = '/reporter/'
34 var OILS_IDL_OUTPUT_FILE = 'report-data.html';
35
36 /* multi-select which shows the user 
37         what data they want to see in the report */
38 var oilsRptDisplaySelector;
39
40 var oilsRptFilterSelector;
41
42 var oilsRptHavingSelector;
43
44 //var oilsRptOrderBySelector;
45
46 /* display the currently building report object in an external window */
47 var oilsRptDebugWindow;
48
49 /* if true, show the debugging window */
50 var oilsRptDebugEnabled = false;
51
52 var oilsMouseX;
53 var oilsMouseY;
54 var oilsPageXMid;
55 var oilsPageYMid;
56
57 var oilsIDLReportsNS = 'http://open-ils.org/spec/opensrf/IDL/reporter/v1';
58 var oilsIDLPersistNS = 'http://open-ils.org/spec/opensrf/IDL/persistence/v1';
59
60 /* the current transform manager for the builder transform window */
61 var oilsRptCurrentTform;
62
63 /* the current transform manager for the builder filter window */
64 var oilsRptCurrentFilterTform;
65 var oilsRptCurrentAggFilterTform;
66
67 /* the current operation manager for the filter window */
68 var oilsRptCurrentFilterOpManager;
69 var oilsRptCurrentAggFilterOpManager;
70
71 var OILS_RPT_FETCH_FOLDERS                      = 'open-ils.reporter:open-ils.reporter.folder.visible.retrieve';
72 var OILS_RPT_FETCH_FOLDER_DATA  = 'open-ils.reporter:open-ils.reporter.folder_data.retrieve';
73 var OILS_RPT_FETCH_TEMPLATE             = 'open-ils.reporter:open-ils.reporter.template.retrieve';
74 var OILS_RPT_UPDATE_FOLDER                      = 'open-ils.reporter:open-ils.reporter.folder.update';
75 var OILS_RPT_DELETE_FOLDER                      = 'open-ils.reporter:open-ils.reporter.folder.delete';
76 var OILS_RPT_CREATE_FOLDER                      = 'open-ils.reporter:open-ils.reporter.folder.create';
77 var OILS_RPT_FETCH_ORG_FULL_PATH = 'open-ils.reporter:open-ils.reporter.org_unit.full_path';
78 var OILS_RPT_FETCH_ORG_TREE             = 'open-ils.actor:open-ils.actor.org_tree.retrieve';
79 var OILS_RPT_DELETE_TEMPLATE            = 'open-ils.reporter:open-ils.reporter.template.delete.cascade';
80 var OILS_RPT_DELETE_REPORT                      = 'open-ils.reporter:open-ils.reporter.report.delete.cascade';
81 var OILS_RPT_DELETE_SCHEDULE            = 'open-ils.reporter:open-ils.reporter.schedule.delete';
82 var OILS_RPT_TEMPLATE_HAS_RPTS  = 'open-ils.reporter:open-ils.reporter.template_has_reports';
83 var OILS_RPT_REPORT_HAS_OUTS            = 'open-ils.reporter:open-ils.reporter.report_has_output';
84 var OILS_RPT_CREATE_REPORT                      = 'open-ils.reporter:open-ils.reporter.report.create';
85 var OILS_RPT_CREATE_TEMPLATE            = 'open-ils.reporter:open-ils.reporter.template.create';
86 var OILS_RPT_CREATE_SCHEDULE            = 'open-ils.reporter:open-ils.reporter.schedule.create';
87 var OILS_RPT_UPDATE_REPORT                      = 'open-ils.reporter:open-ils.reporter.report.update';
88 var OILS_RPT_UPDATE_TEMPLATE            = 'open-ils.reporter:open-ils.reporter.template.update';
89 var OILS_RPT_UPDATE_SCHEDULE            = 'open-ils.reporter:open-ils.reporter.schedule.update';
90 var OILS_RPT_FETCH_OUTPUT                       = 'open-ils.reporter:open-ils.reporter.schedule.retrieve_by_folder';
91 var OILS_RPT_FETCH_REPORT                       = 'open-ils.reporter:open-ils.reporter.report.retrieve';
92 var OILS_RPT_FETCH_TEMPLATE             = 'open-ils.reporter:open-ils.reporter.template.retrieve';
93 var OILS_RPT_MAGIC_FETCH                        = 'open-ils.reporter:open-ils.reporter.magic_fetch';
94 var OILS_RPT_REPORT_EXISTS      = 'open-ils.reporter:open-ils.reporter.report.exists';
95 var OILS_RPT_TEMPLATE_EXISTS      = 'open-ils.reporter:open-ils.reporter.template.exists';
96
97 var oilsRptCurrentFolderManager;
98
99 //var oilsRptFolderWindowCache = {};
100
101 var oilsRptObjectCache = {};
102
103 var OILS_RPT_DTYPE_STRING = 'string';
104 var OILS_RPT_DTYPE_INT = 'int';
105 var OILS_RPT_DTYPE_FLOAT = 'float';
106 var OILS_RPT_DTYPE_TIMESTAMP = 'timestamp';