]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/reports/xul/base.xul
first cut at the xul template interface
[Evergreen.git] / Open-ILS / web / reports / xul / base.xul
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
3 <?xml-stylesheet href="reporter.css" type="text/css"?>
4 <?xml-stylesheet href="calendar/calendar-brown.css" type="text/css" ?>
5
6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xhtml="http://www.w3.org/1999/xhtml" onload="loadIDL()">
7
8 <script src="jsan/JSAN.js" type="application/x-javascript; e4x=1"/>
9 <script>JSAN.use('DOM.Utils')</script>
10
11 <script src="/opac/common/js/JSON.js" type="application/x-javascript; e4x=1"/>
12 <script src="/opac/common/js/md5.js" type="application/x-javascript; e4x=1"/>
13 <script src="utilities.js" type="application/x-javascript; e4x=1"/>
14 <script src="xulbuilder.js" type="application/x-javascript; e4x=1"/>
15 <script src="source-setup.js" type="application/x-javascript; e4x=1"/>
16 <script src="source-browse.js" type="application/x-javascript; e4x=1"/>
17 <script src="template-config.js" type="application/x-javascript; e4x=1"/>
18 <script src="transforms.js" type="application/x-javascript; e4x=1"/>
19 <script src="operators.js" type="application/x-javascript; e4x=1"/>
20
21 <script type="application/x-javascript; e4x=1" src="/opac/common/js/calendar/calendar.js"/>
22 <script type="application/x-javascript; e4x=1" src="/opac/common/js/calendar/lang/calendar-en.js"/>
23 <script type="application/x-javascript; e4x=1" src="/opac/common/js/calendar/calendar-setup.js"/>
24
25 <groupbox flex="1">
26         <caption label="Database Source Browser"/>
27         <hbox flex="1">
28                 <hbox flex="1">
29                         <vbox flex="1">
30                                 <menulist label="Sources" popup="source-menu"/>
31                                 <tree
32                                         id="idl-browse-tree"
33                                         flex="2"
34                                         onclick="sourceTreeHandler(event)"
35                                         ondblclick="sourceTreeHandlerDblClick(event)"
36                                 >
37                                         <treecols>
38                                                 <treecol primary="true" label="Source Name" flex="1"/>
39                                         </treecols>
40                                         <treechildren id="sources-treetop" alternatingbackground="true" />
41                                 </tree>
42                         </vbox>
43                 </hbox>
44
45                 <splitter id="rtp-browse-splitter" collapse="before" persist="state hidden"><grippy/></splitter>
46
47                 <hbox flex="2">
48                         <vbox flex="1">
49                                 <hbox>
50                                         <label control="path-label" value="Source Specifier:"/>
51                                         <textbox id="path-label" flex="1"/>
52                                 </hbox>
53                                 <hbox flex="1">
54                                         <hbox flex="3">
55                                                 <vbox flex="1">
56                                                         <tree
57                                                                 id="class-view"
58                                                                 flex="3"
59                                                                 onclick="detailTreeHandler()"
60                                                                 ondblclick="addReportAtoms()"
61                                                                 enableColumnDrag="true"
62                                                         >
63                                                                 <treecols>
64                                                                         <treecol label="Field Name" flex="1"/>
65                                                                         <treecol label="Data Type" flex="0"/>
66                                                                 </treecols>
67                                                                 <treechildren id="class-treetop" alternatingbackground="true" />
68                                                         </tree>
69                                                 </vbox>
70                                         </hbox>
71
72                                         <splitter><grippy/></splitter>
73
74                                         <hbox flex="2">
75                                                 <vbox flex="1">
76                                                         <tree
77                                                                 id="trans-view"
78                                                                 flex="1"
79                                                                 seltype="single"
80                                                                 onclick="transformSelectHandler()"
81                                                                 ondblclick="addReportAtoms()"
82                                                                 enableColumnDrag="true"
83                                                         >
84                                                                 <treecols>
85                                                                         <treecol label="Field Transform" flex="1"/>
86                                                                         <treecol label="Params" flex="0" hidden="true"/>
87                                                                         <treecol label="Applicable Datatypes" flex="1" hidden="true"/>
88                                                                         <treecol label="Output Type" flex="1" />
89                                                                 </treecols>
90                                                                 <treechildren id="trans-treetop" alternatingbackground="true" />
91                                                         </tree>
92                                                 </vbox>
93                                         </hbox>
94                                 </hbox>
95                                 <hbox>
96                                         <spacer flex="1"/>
97                                         <button label="Add Selected Fields" id="source-add" oncommand="addReportAtoms()"/>
98                                 </hbox>
99                         </vbox>
100                 </hbox>
101         </hbox>
102 </groupbox>
103
104 <splitter style="margin:3px" id="rtp-browse-build-splitter" collapse="before" persist="state hidden"><grippy/></splitter>
105
106
107 <groupbox flex="1" orient="horizontal">
108         <caption label="Template Configuration"/>
109
110         <hbox flex="1">
111                 <vbox flex="1">
112                         <hbox>
113                         <vbox>
114                                 <label control="template-name" value="Name:" style="height:2em"/>
115                                 <label control="template-description" value="Description:"/>
116                         </vbox>
117                         <vbox flex="1">
118                                 <textbox id="template-name" flex="1"/>
119                                 <textbox id="template-description" multiline="true" flex="1" style="max-height:3em"/>
120                         </vbox>
121                         <vbox pack="end">
122                                 <button onclick="save_template();" label="Save"/>
123                         </vbox>
124                         </hbox>
125
126                         <hbox flex="1">
127                                 <tabbox flex="2" id="used-source-fields-tabbox">
128                                         <tabs>
129                                                 <tab
130                                                         id="dis_tab"
131                                                         label="Displayed Fields"
132                                                         onclick="transformSelectHandler(true);"
133                                                 />
134                                                 <tab
135                                                         id="filter_tab"
136                                                         label="Base Filters"
137                                                         onclick="transformSelectHandler(true);"
138                                                 />
139                                                 <tab
140                                                         id="aggfilter_tab"
141                                                         label="Aggregate Filters"
142                                                         disabled="true"
143                                                         onclick="transformSelectHandler(true);"
144                                                 />
145                                                 <!--
146                                                 <tab
147                                                         id="order_tab"
148                                                         label="Field Order"
149                                                         onclick="transformSelectHandler(true);"
150                                                 />
151                                                 -->
152                                         </tabs>
153
154                                         <tabpanels flex="1">
155                                                 <tabpanel id="dis_tabpanel" orient="vertical">
156                                                         <vbox flex="1">
157                                                                 <hbox flex="1">
158                                                                         <tree
159                                                                                 id="dis-col-view"
160                                                                                 flex="1"
161                                                                                 seltype="single"
162                                                                                 ondblclick="alterColumnLabel()"
163                                                                                 onselect="populateTransformContext()"
164                                                                                 enableColumnDrag="true"
165                                                                         >
166                                                                                 <treecols>
167                                                                                         <treecol label="Display Name" flex="3"/>
168                                                                                         <treecol label="Field Name" hidden="true" flex="1"/>
169                                                                                         <treecol label="Data Type" flex="1"/>
170                                                                                         <treecol label="Field Transform" flex="1"/>
171                                                                                         <treecol label="Field Transform Type" hidden="true" flex="1"/>
172                                                                                 </treecols>
173                                                                                 <treechildren id="dis-col-treetop" alternatingbackground="true" />
174                                                                         </tree>
175                                                                 </hbox>
176                                                                 <hbox pack="center">
177                                                                         <button label="Alter Display Header" oncommand="alterColumnLabel()"/>
178                                                                         <button type="menu" label="Change Transform">
179                                                                                 <menupopup id='dis_tab_trans_menu'/>
180                                                                         </button>
181                                                                         <spacer flex="1"/>
182                                                                         <button label="Move Up" oncommand="changeDisplayOrder('u')"/>
183                                                                         <button label="Move Down" oncommand="changeDisplayOrder('d')"/>
184                                                                         <spacer flex="1"/>
185                                                                         <button label="Remove Selected Fields" oncommand="removeReportAtom()"/>
186                                                                 </hbox>
187                                                         </vbox>
188                                                 </tabpanel>
189
190                                                 <tabpanel id="filter_tabpanel" orient="vertical">
191                                                         <vbox flex="1">
192                                                                 <hbox flex="1">
193                                                                         <tree
194                                                                                 id="filter-col-view"
195                                                                                 flex="1"
196                                                                                 seltype="single"
197                                                                                 onselect="populateTransformContext();populateOperatorContext();changeTemplateFilterValue();"
198                                                                                 enableColumnDrag="true"
199                                                                         >
200                                                                                 <treecols>
201                                                                                         <treecol label="Filter Field" flex="2"/>
202                                                                                         <treecol label="Field Name" hidden="true" flex="1"/>
203                                                                                         <treecol label="Data Type" hidden="true" flex="1"/>
204                                                                                         <treecol label="Field Transform" flex="1"/>
205                                                                                         <treecol label="Field Transform Type" hidden="true" flex="1"/>
206                                                                                         <treecol label="Operator" flex="1"/>
207                                                                                         <treecol label="Value" flex="1"/>
208                                                                                 </treecols>
209                                                                                 <treechildren id="filter-col-treetop" alternatingbackground="true" />
210                                                                         </tree>
211                                                                 </hbox>
212                                                                 <hbox pack="center">
213                                                                         <button type="menu" label="Change Transform">
214                                                                                 <menupopup id='filter_tab_trans_menu'/>
215                                                                         </button>
216                                                                         <button type="menu" label="Change Operator">
217                                                                                 <menupopup id='filter_tab_op_menu'/>
218                                                                         </button>
219                                                                         <button label="Change value" command="filter_tab_value_action"/>
220                                                                         <button label="Remove value" oncommand="removeTemplateFilterValue()"/>
221                                                                         <spacer flex="1"/>
222                                                                         <button label="Remove Selected Fields" oncommand="removeReportAtom()"/>
223                                                                 </hbox>
224                                                         </vbox>
225                                                 </tabpanel>
226
227                                                 <tabpanel id="aggfilter_tabpanel" orient="vertical">
228                                                         <vbox flex="1">
229                                                                 <hbox flex="1">
230                                                                         <tree
231                                                                                 id="aggfilter-col-view"
232                                                                                 flex="1"
233                                                                                 seltype="single"
234                                                                                 onselect="populateTransformContext();populateOperatorContext();changeTemplateFilterValue();"
235                                                                                 enableColumnDrag="true"
236                                                                         >
237                                                                                 <treecols>
238                                                                                         <treecol label="Filter Field" flex="2"/>
239                                                                                         <treecol label="Field Name" hidden="true" flex="1"/>
240                                                                                         <treecol label="Data Type" hidden="true" flex="1"/>
241                                                                                         <treecol label="Field Transform" flex="1"/>
242                                                                                         <treecol label="Field Transform Type" hidden="true" flex="1"/>
243                                                                                         <treecol label="Operator" flex="1"/>
244                                                                                         <treecol label="Value" flex="1"/>
245                                                                                 </treecols>
246                                                                                 <treechildren id="aggfilter-col-treetop" alternatingbackground="true" />
247                                                                         </tree>
248                                                                 </hbox>
249                                                                 <hbox pack="center">
250                                                                         <button type="menu" label="Change Transform">
251                                                                                 <menupopup id='aggfilter_tab_trans_menu'/>
252                                                                         </button>
253                                                                         <button type="menu" label="Change Operator">
254                                                                                 <menupopup id='aggfilter_tab_op_menu'/>
255                                                                         </button>
256                                                                         <button label="Change value" command="aggfilter_tab_value_action"/>
257                                                                         <button label="Remove value" oncommand="removeTemplateFilterValue()"/>
258                                                                         <spacer flex="1"/>
259                                                                         <button label="Remove Selected Fields" oncommand="removeReportAtom()"/>
260                                                                 </hbox>
261                                                         </vbox>
262                                                 </tabpanel>
263                                         </tabpanels>
264                                 </tabbox>
265                         </hbox>
266                 </vbox>
267         </hbox>
268
269         <splitter id="rtp-build-splitter" collapse="after" persist="state hidden"><grippy/></splitter>
270
271         <hbox flex="3">
272                 <tree
273                         id="used-sources"
274                         flex="1"
275                         onclick="renderSources(true)"
276                         ondblclick="changeTemplateFilterValue()"
277                         enableColumnDrag="true"
278                 >
279                         <treecols>
280                                 <treecol label="Source Specifier" flex="2"/>
281                                 <treecol label="Table Name" flex="1" hidden="true"/>
282                                 <treecol label="SQL Alias" flex="1" hidden="true"/>
283                                 <treecol label="Relationship" flex="1" hidden="true"/>
284                         </treecols>
285                         <treechildren id="used-sources-treetop" alternatingbackground="true" />
286                 </tree>
287         </hbox>
288
289 </groupbox>
290
291 <commandset>
292         <command id='filter_tab_value_action'/>
293         <command id='aggfilter_tab_value_action'/>
294 </commandset>
295
296 <popupset>
297         <popup id="source-menu" position="after_start"/>
298         <popup
299                 id="calendar-widget"
300                 position="before_start"
301         />
302 </popupset>
303
304 </window>
305