LP#1694577 Reports template searching and paging
[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 var oilsRptOutputOffset = 0;
28
29 var OILS_RPT_INVALID_DATA = 'oils_rpt_invalid_input';
30
31 /* URL to retrieve the IDL from */
32 var OILS_IDL_URL = "/reports/fm_IDL.xml";
33
34 var OILS_IDL_OUTPUT_URL = '/reporter/'
35 var OILS_IDL_OUTPUT_FILE = 'report-data.html';
36
37 /* multi-select which shows the user 
38         what data they want to see in the report */
39 var oilsRptDisplaySelector;
40
41 var oilsRptFilterSelector;
42
43 var oilsRptHavingSelector;
44
45 //var oilsRptOrderBySelector;
46
47 /* display the currently building report object in an external window */
48 var oilsRptDebugWindow;
49
50 /* if true, show the debugging window */
51 var oilsRptDebugEnabled = false;
52
53 var oilsMouseX;
54 var oilsMouseY;
55 var oilsPageXMid;
56 var oilsPageYMid;
57
58 var oilsIDLReportsNS = 'http://open-ils.org/spec/opensrf/IDL/reporter/v1';
59 var oilsIDLPersistNS = 'http://open-ils.org/spec/opensrf/IDL/persistence/v1';
60
61 /* the current transform manager for the builder transform window */
62 var oilsRptCurrentTform;
63
64 /* the current transform manager for the builder filter window */
65 var oilsRptCurrentFilterTform;
66 var oilsRptCurrentAggFilterTform;
67
68 /* the current operation manager for the filter window */
69 var oilsRptCurrentFilterOpManager;
70 var oilsRptCurrentAggFilterOpManager;
71
72 var OILS_RPT_FETCH_FOLDERS                      = 'open-ils.reporter:open-ils.reporter.folder.visible.retrieve';
73 var OILS_RPT_FETCH_FOLDER_DATA  = 'open-ils.reporter:open-ils.reporter.folder_data.retrieve';
74 var OILS_RPT_FETCH_TEMPLATE             = 'open-ils.reporter:open-ils.reporter.template.retrieve';
75 var OILS_RPT_UPDATE_FOLDER                      = 'open-ils.reporter:open-ils.reporter.folder.update';
76 var OILS_RPT_DELETE_FOLDER                      = 'open-ils.reporter:open-ils.reporter.folder.delete';
77 var OILS_RPT_CREATE_FOLDER                      = 'open-ils.reporter:open-ils.reporter.folder.create';
78 var OILS_RPT_FETCH_ORG_FULL_PATH = 'open-ils.reporter:open-ils.reporter.org_unit.full_path';
79 var OILS_RPT_FETCH_ORG_TREE             = 'open-ils.actor:open-ils.actor.org_tree.retrieve';
80 var OILS_RPT_DELETE_TEMPLATE            = 'open-ils.reporter:open-ils.reporter.template.delete.cascade';
81 var OILS_RPT_DELETE_REPORT                      = 'open-ils.reporter:open-ils.reporter.report.delete.cascade';
82 var OILS_RPT_DELETE_SCHEDULE            = 'open-ils.reporter:open-ils.reporter.schedule.delete';
83 var OILS_RPT_TEMPLATE_HAS_RPTS  = 'open-ils.reporter:open-ils.reporter.template_has_reports';
84 var OILS_RPT_REPORT_HAS_OUTS            = 'open-ils.reporter:open-ils.reporter.report_has_output';
85 var OILS_RPT_CREATE_REPORT                      = 'open-ils.reporter:open-ils.reporter.report.create';
86 var OILS_RPT_CREATE_TEMPLATE            = 'open-ils.reporter:open-ils.reporter.template.create';
87 var OILS_RPT_CREATE_SCHEDULE            = 'open-ils.reporter:open-ils.reporter.schedule.create';
88 var OILS_RPT_UPDATE_REPORT                      = 'open-ils.reporter:open-ils.reporter.report.update';
89 var OILS_RPT_UPDATE_TEMPLATE            = 'open-ils.reporter:open-ils.reporter.template.update';
90 var OILS_RPT_UPDATE_SCHEDULE            = 'open-ils.reporter:open-ils.reporter.schedule.update';
91 var OILS_RPT_FETCH_OUTPUT                       = 'open-ils.reporter:open-ils.reporter.schedule.retrieve_by_folder';
92 var OILS_RPT_FETCH_REPORT                       = 'open-ils.reporter:open-ils.reporter.report.retrieve';
93 var OILS_RPT_FETCH_TEMPLATE             = 'open-ils.reporter:open-ils.reporter.template.retrieve';
94 var OILS_RPT_MAGIC_FETCH                        = 'open-ils.reporter:open-ils.reporter.magic_fetch';
95 var OILS_RPT_REPORT_EXISTS      = 'open-ils.reporter:open-ils.reporter.report.exists';
96 var OILS_RPT_TEMPLATE_EXISTS      = 'open-ils.reporter:open-ils.reporter.template.exists';
97
98 var oilsRptCurrentFolderManager;
99
100 //var oilsRptFolderWindowCache = {};
101
102 var oilsRptObjectCache = {};
103
104 var OILS_RPT_DTYPE_STRING = 'string';
105 var OILS_RPT_DTYPE_INT = 'int';
106 var OILS_RPT_DTYPE_FLOAT = 'float';
107 var OILS_RPT_DTYPE_TIMESTAMP = 'timestamp';