1 SplitPane {
2 name: "ordersSplitPane"
3 splitOrientation: left_to_right
4 splitProportions {
5 .75
6 }
7 regions {
8 {
9 viewer {
10 Form {
11 name: "ordersForm"
12 borders {
13 shadow [ thickness="7" ]
14 } [ thickness="7" ]
15 scriptURL:<<
16 function filterTable(str) {
17 if(str==null) {
18 ordersTable.unfilter();
19 filterLabel.value="All Orders";
20 filterLabel.foreground=window.getColor("black");
21 }
22 else {
23 ordersTable.filter(5,str,false)
24 filterLabel.value=str+" Orders";
25 filterLabel.foreground=window.getColor("#800000");
26 }
27 orderDetails.resetForm();
28 }
29 function updateDetails() {
30 orderDetails.resetForm();
31 }
32 >> [inline=true]
33 rows: "2"
34 widgets {
35 {
36 GroupBox {
37 borders {
38 none
39 }
40 bgColor: "defaultBackground+10,defaultBackground-10"
41 bounds {
42 x: "0"
43 y: "0"
44 }
45 contentPadding {
46 top: "2"
47 right: "2"
48 bottom: "2"
49 left: "2"
50 }
51 columns: "7"
52 widgets {
53 {
54 PushButton {
55 bounds {
56 x: "0"
57 y: "0"
58 }
59 popupMenu {
60 {
61 value: "All"
62 } [ onAction="filterTable(null)" ]
63 {
64 value: "Active"
65 } [ onAction="filterTable('Active')" ]
66 {
67 value: "Inactive"
68 } [ onAction="filterTable('Inactive')" ]
69 {
70 value: "Canceled"
71 } [ onAction="filterTable('Canceled')" ]
72 }
73 templateName: "viewsList"
74 }
75 }
76 {
77 Label {
78 bounds {
79 x: "1"
80 y: "0"
81 width: "5ch"
82 }
83 }
84 }
85 {
86 Label {
87 name: "filterLabel"
88 bounds {
89 x: "2"
90 y: "0"
91 }
92 templateName: "viewLabel"
93 value: "All Orders"
94 }
95 }
96 {
97 Label {
98 bounds {
99 x: "3"
100 y: "0"
101 width: "5ch"
102 }
103 }
104 }
105 }
106 }
107 }
108 {
109 TreeTable {
110 name: "ordersTable"
111 borders {
112 none
113 }
114 verticalAlign: full
115 horizontalAlign: full
116 bounds {
117 x: "0"
118 y: "1"
119 }
120 focusPainted: false
121 dataURL: "data/orders.txt" [ riSeparator=","]
122 templateName: "prototypeTable"
123 autoResizeMode: none
124 columnSpanningAllowed: true
125 quickFindSupport: search_bar
126 autoSizeRowsToFit: true
127 gridLineType: horizontal_lines
128 columnChooserEnabled: true
129 columns {
130 {
131 width: "18!"
132 hideable: false
133 }
134 {
135 title: "Order"
136 width: "17ch"
137 hideable: false
138 textWrapping: line
139 converterClass: "StringConverter"
140 verticalAlign: top
141 }
142 {
143 title: "Start date"
144 valueType: date_time_type
145 valueContext: "|MMM dd, yyyy HH:mm"
146 verticalAlign: top
147 width: "10ch"
148 }
149 {
150 title: "Stop date"
151 valueType: date_time_type
152 valueContext: "|MMM dd, yyyy HH:mm"
153 verticalAlign: top
154 width: "10ch"
155 }
156 {
157 title: "Provider"
158 verticalAlign: top
159 width: "10ch"
160 }
161 {
162 title: "Status"
163 verticalAlign: top
164 width: "6ch"
165 }
166 {
167 title: "Nurse"
168 width: "10ch"
169 verticalAlign: top
170 visible: false
171 }
172 {
173 title: "Clerk"
174 width: "10ch"
175 verticalAlign: top
176 visible: false
177 }
178 {
179 title: "Chart"
180 width: "10ch"
181 verticalAlign: top
182 visible: false
183 }
184 {
185 title: "Location"
186 width: "10ch"
187 verticalAlign: top
188 visible: false
189 }
190 }
191 expandAll: true
192 } [ onChange="updateDetails()" ]
193 }
194 }
195 }
196 }
197 }
198 {
199 viewer {
200 /**
201 * Define a form that will show the details of the selected row.
202 * The widget values are embedded references to columns in the selected
203 * row of the table. A call to resetForm() every time the selection in the table changes
204 * cause the values to reset based on the current selection
205 */
206 Form {
207 name: "orderDetails"
208 borders {
209 shadow [ thickness="7" ]
210 } [ thickness="7" ]
211 contentPadding {
212 top: "2"
213 right: "2"
214 bottom: "2"
215 left: "2"
216 }
217 rows: "11"
218 columns: "2"
219 widgets {
220 {
221 Label {
222 borders {
223 line
224 }
225 columnSpan: 2
226 horizontalAlign: full
227 font {
228 style: bold
229 }
230 fgColor: "TitledBorder.titleColor"
231 bgColor: "defaultBackground+10,defaultBackground-10"
232 bounds {
233 x: "0"
234 y: "0"
235 height: "1.25ln"
236 }
237 value: "Order Detail"
238 textHAlignment: center
239 }
240 }
241 {
242 TextArea {
243 name: "orderField"
244 borders {
245 shadow
246 line
247 }
248 columnSpan: 2
249 horizontalAlign: full
250 font {
251 style: bold
252 }
253 bgColor: "defaultBackground+10,defaultBackground"
254 bounds {
255 x: "0"
256 y: "1"
257 height: "10ln"
258 }
259 value: "{/ordersTable/%selectionValue[1]}"
260 editable: false
261 }
262 }
263 {
264 Label {
265 name: "service"
266 title: "Service"
267 templateName: "ordersValueField"
268 bounds {
269 x: "1"
270 y: "2"
271 }
272 value: "{/ordersTable/%selectionData[0]}"
273 }
274 }
275 {
276 Label {
277 name: "startDate"
278 title: "Start Date"
279 templateName: "ordersValueField"
280 bounds {
281 x: "1"
282 y: "3"
283 }
284 value: "{/ordersTable/%selectionValue[2]}"
285 }
286 }
287 {
288 Label {
289 name: "stopDate"
290 title: "Stop Date"
291 templateName: "ordersValueField"
292 bounds {
293 x: "1"
294 y: "4"
295 }
296 value: "{/ordersTable/%selectionValue[3]}"
297 }
298 }
299 {
300 Label {
301 name: "provider"
302 title: "Provider"
303 templateName: "ordersValueField"
304 bounds {
305 x: "1"
306 y: "5"
307 }
308 value: "{/ordersTable/%selectionValue[4]}"
309 }
310 }
311 {
312 Label {
313 name: "nurse"
314 title: "Nurse"
315 templateName: "ordersValueField"
316 bounds {
317 x: "1"
318 y: "6"
319 }
320 value: "{/ordersTable/%selectionValue[6]}"
321 }
322 }
323 {
324 Label {
325 name: "clerk"
326 title: "Clerk"
327 templateName: "ordersValueField"
328 bounds {
329 x: "1"
330 y: "7"
331 }
332 value: "{/ordersTable/%selectionValue[7]}"
333 }
334 }
335 {
336 Label {
337 name: "chart"
338 title: "Chart"
339 templateName: "ordersValueField"
340 bounds {
341 x: "1"
342 y: "8"
343 }
344 value: "{/ordersTable/%selectionValue[8]}"
345 }
346 }
347 {
348 Label {
349 name: "status"
350 title: "Status"
351 templateName: "ordersValueField"
352 bounds {
353 x: "1"
354 y: "9"
355 }
356 value: "{/ordersTable/%selectionValue[5]}"
357 }
358 }
359 {
360 Label {
361 name: "location"
362 title: "Location"
363 templateName: "ordersValueField"
364 bounds {
365 x: "1"
366 y: "10"
367 }
368 value: "{/ordersTable/%selectionValue[9]}"
369 }
370 }
371 }
372 }
373 }
374 }
375 }
376 }
377
378