1 | <%@ page |
---|
2 | pageEncoding="UTF-8" |
---|
3 | session="false" |
---|
4 | import="net.sf.basedb.core.User" |
---|
5 | import="net.sf.basedb.core.DbControl" |
---|
6 | import="net.sf.basedb.core.SessionControl" |
---|
7 | import="net.sf.basedb.core.Application" |
---|
8 | import="net.sf.basedb.clients.web.Base" |
---|
9 | import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
---|
10 | %> |
---|
11 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
12 | <%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
---|
13 | <% |
---|
14 | final SessionControl sc = Base.getExistingSessionControl(request, true); |
---|
15 | final String ID = sc.getId(); |
---|
16 | final float scale = Base.getScale(sc); |
---|
17 | final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.labenv"); |
---|
18 | DbControl dc = null; |
---|
19 | try |
---|
20 | { |
---|
21 | dc = sc.newDbControl(); |
---|
22 | final User user = User.getById(dc, sc.getLoggedInUserId()); |
---|
23 | %> |
---|
24 | <base:page type="default" > |
---|
25 | <base:head scripts="ajax.js" styles="path.css"> |
---|
26 | <link rel="stylesheet" type="text/css" href="../css/reggie.css"> |
---|
27 | <script language="JavaScript" src="../reggie.js" type="text/javascript" charset="UTF-8"></script> |
---|
28 | <script language="JavaScript" src="boxplot.js" type="text/javascript" charset="UTF-8"></script> |
---|
29 | |
---|
30 | |
---|
31 | <script language="JavaScript"> |
---|
32 | var currentStep = 1; |
---|
33 | var debug = false; |
---|
34 | /* |
---|
35 | var numCols; |
---|
36 | var unknownSite = 0; |
---|
37 | var unknownCreation; |
---|
38 | var numPatientsNoSamples = 0; |
---|
39 | var debug01 = null; |
---|
40 | */ |
---|
41 | |
---|
42 | window.onload = function() |
---|
43 | { |
---|
44 | // Create lab sensor menu from configuration data |
---|
45 | createSensorMenu(); |
---|
46 | }; |
---|
47 | |
---|
48 | function createSensorMenu() |
---|
49 | { |
---|
50 | // Get lab sensor configurations dynamically from server data |
---|
51 | var frm = document.forms['labenv']; |
---|
52 | var labSensorConfigList = getLabSensorConfigList(); |
---|
53 | if (labSensorConfigList != null) |
---|
54 | { |
---|
55 | // Construct lab sensor menu from JSON data |
---|
56 | var sensorSelect = document.getElementById('sensorSelectId'); |
---|
57 | for (var i=0; i < labSensorConfigList.length; i++) |
---|
58 | { |
---|
59 | // Get URL and name for lab sensor number 'i' |
---|
60 | var labSensorConfig = labSensorConfigList[i]; |
---|
61 | var sensorUrl = labSensorConfig['url']; |
---|
62 | var sensorName = labSensorConfig['name']; |
---|
63 | // Create and add new option element to select menu |
---|
64 | var optionEl = document.createElement('option'); |
---|
65 | optionEl.setAttribute('value',sensorUrl); |
---|
66 | optionEl.innerHTML = sensorName; |
---|
67 | sensorSelect.appendChild(optionEl); |
---|
68 | } |
---|
69 | } |
---|
70 | } |
---|
71 | |
---|
72 | function getLabSensorConfigList() |
---|
73 | { |
---|
74 | // Get lab sensor configurations JSON object with AJAX |
---|
75 | var frm = document.forms['labenv']; |
---|
76 | var request = Ajax.getXmlHttpRequest(); |
---|
77 | var url = '../../labenv.jar/LabEnvironment.servlet?ID=<%=ID%>&cmd=GetLabSensorConfigList'; |
---|
78 | request.open("GET", url, false); |
---|
79 | request.send(null); |
---|
80 | |
---|
81 | //if (debug) Main.debug(request.responseText); |
---|
82 | //Main.debug(request.responseText); |
---|
83 | |
---|
84 | var response = JSON.parse(request.responseText); |
---|
85 | if (response.status != 'ok') |
---|
86 | { |
---|
87 | setFatalError(response.message); |
---|
88 | return false; |
---|
89 | } |
---|
90 | |
---|
91 | // Get sensor configurations information from the AJAX response |
---|
92 | var labSensorConfigList = response.labSensorConfigList; |
---|
93 | |
---|
94 | return labSensorConfigList; |
---|
95 | } |
---|
96 | |
---|
97 | function fromDateTimeOnChange() |
---|
98 | { |
---|
99 | var frm = document.forms['labenv']; |
---|
100 | var todaysDate = new Date(); |
---|
101 | fromDateIsValid = false; |
---|
102 | setInputStatus('fromdate', '', ''); |
---|
103 | |
---|
104 | var fromDate = frm.fromdate.value; |
---|
105 | var fromTime = frm.fromtime.value; |
---|
106 | |
---|
107 | if (fromDate != '' || fromTime != '') |
---|
108 | { |
---|
109 | // Auto-fill the date if it's only given with 4(MMdd) or 6(yyMMdd) digits. |
---|
110 | fromDate = autoFillDate(fromDate); |
---|
111 | frm.fromdate.value = fromDate; |
---|
112 | |
---|
113 | fromTime = autoFillTime(fromTime); |
---|
114 | frm.fromtime.value = fromTime; |
---|
115 | |
---|
116 | if (!Dates.isDate(fromDate, 'yyyyMMdd')) |
---|
117 | { |
---|
118 | setInputStatus('fromdate', 'Not a valid date', 'invalid'); |
---|
119 | return; |
---|
120 | } |
---|
121 | |
---|
122 | if (!Dates.isDate(fromDate + ' ' + fromTime, 'yyyyMMdd HHmm')) |
---|
123 | { |
---|
124 | if (fromDate != '') setInputStatus('fromdate', 'Not a valid time (if time unknown, also leave date field blank)', 'invalid'); |
---|
125 | return; |
---|
126 | } |
---|
127 | setInputStatus('fromdate', '', 'valid'); |
---|
128 | } |
---|
129 | fromDateIsValid = true; |
---|
130 | toDateTimeOnChange(); |
---|
131 | } |
---|
132 | |
---|
133 | function toDateTimeOnChange() |
---|
134 | { |
---|
135 | var frm = document.forms['labenv']; |
---|
136 | var todaysDate = new Date(); |
---|
137 | toDateIsValid = false; |
---|
138 | setInputStatus('todate', '', ''); |
---|
139 | |
---|
140 | var toDate = frm.todate.value; |
---|
141 | var toTime = frm.totime.value; |
---|
142 | |
---|
143 | if (toDate != '' || toTime != '') |
---|
144 | { |
---|
145 | // Auto-fill the date if it's only given with 4(MMdd) or 6(yyMMdd) digits. |
---|
146 | toDate = autoFillDate(toDate); |
---|
147 | frm.todate.value = toDate; |
---|
148 | |
---|
149 | toTime = autoFillTime(toTime); |
---|
150 | frm.totime.value = toTime; |
---|
151 | |
---|
152 | if (!Dates.isDate(toDate, 'yyyyMMdd')) |
---|
153 | { |
---|
154 | setInputStatus('todate', 'Not a valid date', 'invalid'); |
---|
155 | return; |
---|
156 | } |
---|
157 | |
---|
158 | if (!Dates.isDate(toDate + ' ' + toTime, 'yyyyMMdd HHmm')) |
---|
159 | { |
---|
160 | if (toDate != '') setInputStatus('todate', 'Not a valid time (if time unknown, also leave date field blank)', 'invalid'); |
---|
161 | return; |
---|
162 | } |
---|
163 | setInputStatus('todate', '', 'valid'); |
---|
164 | } |
---|
165 | toDateIsValid = true; |
---|
166 | } |
---|
167 | |
---|
168 | var intervalIsValid = true; |
---|
169 | |
---|
170 | function goNext() |
---|
171 | { |
---|
172 | if (currentStep == 1) |
---|
173 | { |
---|
174 | gotoStep2(); |
---|
175 | } |
---|
176 | } |
---|
177 | /* |
---|
178 | function getSites() |
---|
179 | { |
---|
180 | // Get sites JSON object with AJAX |
---|
181 | var frm = document.forms['labenv']; |
---|
182 | var request = Ajax.getXmlHttpRequest(); |
---|
183 | var url = '../LabEnvironment.servlet?ID=<%=ID%>&cmd=getsites'; |
---|
184 | request.open("GET", url, false); |
---|
185 | request.send(null); |
---|
186 | |
---|
187 | if (debug) Main.debug(request.responseText); |
---|
188 | |
---|
189 | var response = JSON.parse(request.responseText); |
---|
190 | if (response.status != 'ok') |
---|
191 | { |
---|
192 | setFatalError(response.message); |
---|
193 | return false; |
---|
194 | } |
---|
195 | |
---|
196 | // Get site information from the AJAX response |
---|
197 | var sitesList = response.sitesList; |
---|
198 | |
---|
199 | return sitesList; |
---|
200 | } |
---|
201 | */ |
---|
202 | |
---|
203 | function gotoStep2() |
---|
204 | { |
---|
205 | var frm = document.forms['labenv']; |
---|
206 | frm.reporttype.disabled = true; |
---|
207 | // Hide report period input fields |
---|
208 | document.getElementById("reportPeriodSubSection01").style.display = 'none'; |
---|
209 | document.getElementById("reportPeriodSubSection02").style.display = 'none'; |
---|
210 | document.getElementById("reportPeriodSubSection04").style.display = 'none'; |
---|
211 | // Hide view type pop-up menu |
---|
212 | document.getElementById("viewTypeSubSection01").style.display = 'none'; |
---|
213 | document.getElementById("viewTypeSubSection02").style.display = 'none'; |
---|
214 | document.getElementById("viewTypeSubSection04").style.display = 'none'; |
---|
215 | /* |
---|
216 | // Hide chart site pop-up menu |
---|
217 | document.getElementById("chartSiteSubSection01").style.display = 'none'; |
---|
218 | document.getElementById("chartSiteSubSection02").style.display = 'none'; |
---|
219 | document.getElementById("chartSiteSubSection04").style.display = 'none'; |
---|
220 | */ |
---|
221 | // Hide day-time filter input fields |
---|
222 | document.getElementById("dayTimeFilterSubSection01").style.display = 'none'; |
---|
223 | document.getElementById("dayTimeFilterSubSection02").style.display = 'none'; |
---|
224 | document.getElementById("dayTimeFilterSubSection04").style.display = 'none'; |
---|
225 | // Hide weekday filter pop-up menu |
---|
226 | document.getElementById("weekDayFilterSubSection01").style.display = 'none'; |
---|
227 | document.getElementById("weekDayFilterSubSection02").style.display = 'none'; |
---|
228 | document.getElementById("weekDayFilterSubSection04").style.display = 'none'; |
---|
229 | // Hide chart variant pop-up menu |
---|
230 | document.getElementById("chartVariantSubSection01").style.display = 'none'; |
---|
231 | document.getElementById("chartVariantSubSection02").style.display = 'none'; |
---|
232 | document.getElementById("chartVariantSubSection04").style.display = 'none'; |
---|
233 | if (frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentdailydistribution' |
---|
234 | || frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentweeklydistribution') |
---|
235 | { |
---|
236 | // Show report period input fields |
---|
237 | document.getElementById("reportPeriodSubSection01").style.display = 'block'; |
---|
238 | document.getElementById("reportPeriodSubSection02").style.display = 'block'; |
---|
239 | document.getElementById("reportPeriodSubSection04").style.display = 'block'; |
---|
240 | document.getElementById("reportPeriodSubSection01Header").innerHTML="From"; |
---|
241 | document.getElementById("reportPeriodSubSection04HelpText").innerHTML="Start date+time (YYYYMMDD, HHMM) Blank fields give data from start."; |
---|
242 | // Show view type pop-up menu |
---|
243 | document.getElementById("viewTypeSubSection01").style.display = 'block'; |
---|
244 | document.getElementById("viewTypeSubSection02").style.display = 'block'; |
---|
245 | document.getElementById("viewTypeSubSection04").style.display = 'block'; |
---|
246 | } |
---|
247 | if (frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentdailydistribution' |
---|
248 | || frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentweeklydistribution') |
---|
249 | { |
---|
250 | // Show weekday filter pop-up menu |
---|
251 | document.getElementById("weekDayFilterSubSection01").style.display = 'block'; |
---|
252 | document.getElementById("weekDayFilterSubSection02").style.display = 'block'; |
---|
253 | document.getElementById("weekDayFilterSubSection04").style.display = 'block'; |
---|
254 | } |
---|
255 | if (frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentweeklydistribution') |
---|
256 | { |
---|
257 | // Show day-time filter input fields |
---|
258 | document.getElementById("dayTimeFilterSubSection01").style.display = 'block'; |
---|
259 | document.getElementById("dayTimeFilterSubSection02").style.display = 'block'; |
---|
260 | document.getElementById("dayTimeFilterSubSection04").style.display = 'block'; |
---|
261 | } |
---|
262 | if (frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentdailydistribution' |
---|
263 | || frm.reporttype[frm.reporttype.selectedIndex].value == 'labenvironmentweeklydistribution') |
---|
264 | { |
---|
265 | // Show chart data pop-up menu |
---|
266 | document.getElementById("chartVariantSubSection01").style.display = 'block'; |
---|
267 | document.getElementById("chartVariantSubSection02").style.display = 'block'; |
---|
268 | document.getElementById("chartVariantSubSection04").style.display = 'block'; |
---|
269 | } |
---|
270 | Main.show('parameterSection'); |
---|
271 | |
---|
272 | Main.show('gocreate'); |
---|
273 | Main.hide('gonext'); |
---|
274 | frm.fromdate.focus(); |
---|
275 | currentStep = 2; |
---|
276 | } |
---|
277 | |
---|
278 | function dateOnChange() |
---|
279 | { |
---|
280 | var frm = document.forms['labenv']; |
---|
281 | var fdate; |
---|
282 | var tdate; |
---|
283 | |
---|
284 | intervalIsValid = false; |
---|
285 | setInputStatus('displayInterval','','valid'); |
---|
286 | if (frm.fromdate.value != null && frm.fromdate.value != '') |
---|
287 | { |
---|
288 | frm.fromdate.value = autoFillDate(frm.fromdate.value); |
---|
289 | if (!Dates.isDate(frm.fromdate.value, 'yyyyMMdd')) |
---|
290 | { |
---|
291 | setInputStatus('displayInterval','Not a valid from-date', 'invalid'); |
---|
292 | return; |
---|
293 | } |
---|
294 | else |
---|
295 | { |
---|
296 | fdate = frm.fromdate.value; |
---|
297 | fdate = new Date(fdate.substr(0,4), parseInt(fdate.substr(4,2), 10)-1, fdate.substr(6,2)); |
---|
298 | } |
---|
299 | } |
---|
300 | |
---|
301 | if (frm.todate.value != null && frm.todate.value != '') |
---|
302 | { |
---|
303 | frm.todate.value = autoFillDate(frm.todate.value); |
---|
304 | if (!Dates.isDate(frm.todate.value, 'yyyyMMdd')) |
---|
305 | { |
---|
306 | setInputStatus('displayInterval', 'Not a valid to-date', 'invalid'); |
---|
307 | return; |
---|
308 | } |
---|
309 | else |
---|
310 | { |
---|
311 | tdate = frm.todate.value; |
---|
312 | tdate = new Date(tdate.substr(0,4), parseInt(tdate.substr(4,2), 10)-1, tdate.substr(6,2)); |
---|
313 | } |
---|
314 | } |
---|
315 | |
---|
316 | if (tdate != null && fdate != null) |
---|
317 | { |
---|
318 | if (fdate > tdate) |
---|
319 | { |
---|
320 | setInputStatus('displayInterval', 'Invalid period', 'invalid') |
---|
321 | return; |
---|
322 | } |
---|
323 | } |
---|
324 | intervalIsValid = true; |
---|
325 | } |
---|
326 | |
---|
327 | function goCreate() |
---|
328 | { |
---|
329 | //alert("goCreate(): Start"); |
---|
330 | if (!intervalIsValid) return; |
---|
331 | var frm = document.forms['labenv']; |
---|
332 | var reportType = frm.reporttype[frm.reporttype.selectedIndex].value; |
---|
333 | frm.fromdate.disabled = true; |
---|
334 | frm.fromtime.disabled = true; |
---|
335 | frm.todate.disabled = true; |
---|
336 | frm.totime.disabled = true; |
---|
337 | if (reportType == 'labenvironmentdailydistribution' || reportType == 'labenvironmentweeklydistribution') |
---|
338 | { |
---|
339 | frm.weekdayfilter.disabled = true; |
---|
340 | } |
---|
341 | if (reportType == 'labenvironmentweeklydistribution') |
---|
342 | { |
---|
343 | frm.filterfromtime.disabled = true; |
---|
344 | frm.filtertotime.disabled = true; |
---|
345 | } |
---|
346 | /* |
---|
347 | var chartSite = frm.chartvariant[frm.chartsite.selectedIndex].value; |
---|
348 | */ |
---|
349 | var chartVariant = frm.chartvariant[frm.chartvariant.selectedIndex].value; |
---|
350 | if (reportType == 'labenvironmentdailydistribution' || reportType == 'labenvironmentweeklydistribution') |
---|
351 | { |
---|
352 | /* |
---|
353 | frm.viewtype.disabled = true; |
---|
354 | frm.chartsite.disabled = true; |
---|
355 | */ |
---|
356 | frm.chartvariant.disabled = true; |
---|
357 | } |
---|
358 | Main.hide('gocreate'); |
---|
359 | Main.show('reportSection'); |
---|
360 | var url = '../LabEnvironmentStatistics.servlet?ID=<%=ID%>&cmd='+reportType; |
---|
361 | |
---|
362 | if (frm.fromdate.value != null) url += '&fdate='+frm.fromdate.value; |
---|
363 | if (frm.fromtime.value != null) url += '&ftime='+frm.fromtime.value; |
---|
364 | if (frm.todate.value != null) url += '&tdate='+frm.todate.value; |
---|
365 | if (frm.totime.value != null) url += '&ttime='+frm.totime.value; |
---|
366 | if (reportType == 'labenvironmentdailydistribution' || reportType == 'labenvironmentweeklydistribution') |
---|
367 | { |
---|
368 | if (frm.weekdayfilter.value != null) url += '&weekdayfilter='+frm.weekdayfilter.value; |
---|
369 | } |
---|
370 | if (reportType == 'labenvironmentweeklydistribution') |
---|
371 | { |
---|
372 | if (frm.filterfromtime.value != null) url += '&filterfromtime='+frm.filterfromtime.value; |
---|
373 | if (frm.filtertotime.value != null) url += '&filtertotime='+frm.filtertotime.value; |
---|
374 | } |
---|
375 | if (reportType == 'labenvironmentdailydistribution' || reportType == 'labenvironmentweeklydistribution') |
---|
376 | { |
---|
377 | if (frm.chartvariant.value != null) url += '&cvariant='+frm.chartvariant.value; |
---|
378 | } |
---|
379 | |
---|
380 | |
---|
381 | var request = Ajax.getXmlHttpRequest(); |
---|
382 | request.open("GET", url, true); |
---|
383 | Ajax.setReadyStateHandler(request, onPlotGenerated); |
---|
384 | request.send(null); |
---|
385 | } |
---|
386 | |
---|
387 | function onPlotGenerated(request) |
---|
388 | { |
---|
389 | var frm = document.forms['labenv']; |
---|
390 | var reportType = frm.reporttype[frm.reporttype.selectedIndex].value; |
---|
391 | //alert("onPlotGenerated(): reportType = " + reportType); |
---|
392 | if (debug) Main.debug(Main.encodeTags(request.responseText)); |
---|
393 | var response = JSON.parse(request.responseText); |
---|
394 | if (response.status != 'ok') |
---|
395 | { |
---|
396 | setFatalError(response.message); |
---|
397 | return false; |
---|
398 | } |
---|
399 | var report = response.report; |
---|
400 | var permissionDeniedForPatientName = report.permissionDeniedForPatientName; |
---|
401 | var reportTable; |
---|
402 | var cellElement = document.getElementById('reportdiv'); |
---|
403 | |
---|
404 | if (report != null) |
---|
405 | { |
---|
406 | //if ('labenvironmentdailydistribution' == reportType) |
---|
407 | if (reportType == 'labenvironmentdailydistribution' || reportType == 'labenvironmentweeklydistribution') |
---|
408 | { |
---|
409 | //alert("onPlotGenerated(): Inside plot block for labenvironmentdailydistribution"); |
---|
410 | var draw_area_wdt = 700; |
---|
411 | var draw_area_hgt = 550; |
---|
412 | var draw_scale_factor = 2; |
---|
413 | var jsonStatisticsPlotArray = report.plotStatistics; |
---|
414 | // Draw plots |
---|
415 | setInnerHTML('reportdiv', ''); |
---|
416 | for (var plotIndex in jsonStatisticsPlotArray) |
---|
417 | { |
---|
418 | // |
---|
419 | // Get plot JSON data container with extra info and plot data |
---|
420 | var plotJsonDataContainer = jsonStatisticsPlotArray[plotIndex]; |
---|
421 | // Get plot JSON extra info and plot data |
---|
422 | var plotChartVariant = plotJsonDataContainer['chartVariant']; |
---|
423 | var plotViewType = plotJsonDataContainer['viewType']; |
---|
424 | var plotOptionalHeadline = plotJsonDataContainer['optionalHeadline']; |
---|
425 | var boxPlotJsonData = plotJsonDataContainer['plotData']; |
---|
426 | // Create plot from plot JSON data |
---|
427 | if (plotOptionalHeadline != null && plotOptionalHeadline != '') |
---|
428 | { |
---|
429 | // Print optional headline |
---|
430 | var headlineText = document.createElement('text'); |
---|
431 | headlineText.innerHTML = "<BR>" + plotOptionalHeadline + "<BR>"; |
---|
432 | cellElement.appendChild(headlineText); |
---|
433 | } |
---|
434 | var plotKey = plotChartVariant + '_' + plotViewType; |
---|
435 | // Add plot |
---|
436 | var canvasInTable = document.createElement('canvas'); |
---|
437 | canvasInTable.setAttribute('id', plotKey); |
---|
438 | canvasInTable.setAttribute('width', draw_area_wdt * draw_scale_factor); |
---|
439 | canvasInTable.setAttribute('height', draw_area_hgt * draw_scale_factor); |
---|
440 | //alert("onPlotGenerated(): Calling createBoxPlot()"); |
---|
441 | createBoxPlot(boxPlotJsonData, canvasInTable, draw_area_wdt, draw_area_hgt, draw_scale_factor); |
---|
442 | cellElement.appendChild(canvasInTable); |
---|
443 | canvasInTable.addEventListener('mousemove', drawCanvasGuidelines, false); |
---|
444 | canvasInTable.addEventListener('mouseleave', hideCanvasGuidelines, false); |
---|
445 | } |
---|
446 | // Print optional appended info |
---|
447 | var appendedInfo = report.appendedInfo; |
---|
448 | if (appendedInfo != null && appendedInfo != '') |
---|
449 | { |
---|
450 | // Print optional headline |
---|
451 | var infoText = document.createElement('text'); |
---|
452 | infoText.innerHTML = "<BR>" + appendedInfo + "<BR>"; |
---|
453 | cellElement.appendChild(infoText); |
---|
454 | } |
---|
455 | } |
---|
456 | } |
---|
457 | else |
---|
458 | { |
---|
459 | var messageCell = getTableCellElement('No values could be found during given period', 'reportheader'); |
---|
460 | var messageRow = document.createElement('tr'); |
---|
461 | messageRow.appendChild(messageCell); |
---|
462 | var messageTable = getReportTable(); |
---|
463 | messageTable.appendChild(messageRow); |
---|
464 | reportTable = messageTable; |
---|
465 | } |
---|
466 | Main.show('printButton'); |
---|
467 | Main.show('gorestart'); |
---|
468 | } |
---|
469 | |
---|
470 | function getJSONData(jsonObject, key) |
---|
471 | { |
---|
472 | var data = getJSONData(jsonObject, key, ''); |
---|
473 | return data; |
---|
474 | } |
---|
475 | |
---|
476 | function getJSONData(jsonObject, key, defaultChoice) |
---|
477 | { |
---|
478 | var data = defaultChoice; |
---|
479 | if (jsonObject != null) |
---|
480 | { |
---|
481 | if (jsonObject[key] != null) |
---|
482 | { |
---|
483 | data = jsonObject[key]; |
---|
484 | } |
---|
485 | } |
---|
486 | return data; |
---|
487 | } |
---|
488 | |
---|
489 | function getReportTable() |
---|
490 | { |
---|
491 | var reportTable = document.createElement('table'); |
---|
492 | reportTable.setAttribute('class','reporttable'); |
---|
493 | reportTable.setAttribute('border','1'); |
---|
494 | return reportTable; |
---|
495 | } |
---|
496 | |
---|
497 | function getTableCellElement(text, clazz, colspan, rowspan) |
---|
498 | { |
---|
499 | var cellElement = document.createElement('td'); |
---|
500 | text = new String(text); |
---|
501 | var textArray = text.split("\n"); |
---|
502 | if (textArray.length > 1) |
---|
503 | { |
---|
504 | for (var i=0;i<textArray.length;i++) |
---|
505 | { |
---|
506 | if (i>0)cellElement.appendChild(document.createElement('br')); |
---|
507 | cellElement.appendChild(document.createTextNode(textArray[i])); |
---|
508 | } |
---|
509 | } |
---|
510 | else |
---|
511 | { |
---|
512 | cellElement.appendChild(document.createTextNode(text)); |
---|
513 | } |
---|
514 | cellElement.setAttribute('class', clazz); |
---|
515 | if (colspan != null) cellElement.setAttribute('colspan', colspan); |
---|
516 | if (rowspan != null) cellElement.setAttribute('rowspan', rowspan); |
---|
517 | |
---|
518 | return cellElement; |
---|
519 | } |
---|
520 | |
---|
521 | function getListElement(itemText) |
---|
522 | { |
---|
523 | var listElement = document.createElement('li'); |
---|
524 | var textNode = document.createTextNode(itemText); |
---|
525 | listElement.appendChild(textNode); |
---|
526 | return listElement; |
---|
527 | } |
---|
528 | |
---|
529 | /** |
---|
530 | * addHyphensToDateStr() |
---|
531 | * |
---|
532 | * Adds hyphens to date string in yyyymmdd format to |
---|
533 | * get yyyy-mm-dd format. If input string already contains |
---|
534 | * hyphen(s), the input string is returned unchanged. |
---|
535 | * If input string is null or empty, '????-??-??' is returned. |
---|
536 | * |
---|
537 | * @param dateStr String Input date string in yyyy-mm-dd or yyyymmdd format. |
---|
538 | * @return String Date string in yyyy-mm-dd format. |
---|
539 | */ |
---|
540 | function addHyphensToDateString(dateStr) |
---|
541 | { |
---|
542 | var dateWithHyphensStr = '????-??-??'; |
---|
543 | if (dateStr != null && dateStr != '') |
---|
544 | { |
---|
545 | // Check if input string already contains hyphen |
---|
546 | if (dateStr.indexOf("-") >= 0) |
---|
547 | { |
---|
548 | // Date already has hyphen(s) |
---|
549 | dateWithHyphensStr = dateStr; |
---|
550 | } |
---|
551 | else |
---|
552 | { |
---|
553 | // Date in yyyymmdd format |
---|
554 | var yearStr = dateStr.substr(0,4); |
---|
555 | var monthStr = dateStr.substr(4,2); |
---|
556 | var dayStr = dateStr.substr(6,2); |
---|
557 | dateWithHyphensStr = yearStr + '-' + monthStr + '-' + dayStr; |
---|
558 | } |
---|
559 | } |
---|
560 | return dateWithHyphensStr; |
---|
561 | } |
---|
562 | |
---|
563 | /** |
---|
564 | * dateStrToDate() |
---|
565 | * |
---|
566 | * Takes an input date string in yyyy-mm-dd or yyyymmdd format |
---|
567 | * and returns a date corresponding to the date string. |
---|
568 | * If input string is null or empty, null is returned. |
---|
569 | * |
---|
570 | * @param dateStr String Input date string in yyyy-mm-dd or yyyymmdd format. |
---|
571 | * @return Date Date corresponding to input date string. |
---|
572 | */ |
---|
573 | function dateStrToDate(dateStr) |
---|
574 | { |
---|
575 | var date = null; |
---|
576 | if (dateStr != null && dateStr != '') |
---|
577 | { |
---|
578 | // Check if input string already contains hyphen |
---|
579 | if (dateStr.indexOf("-") >= 0) |
---|
580 | { |
---|
581 | // Date in yyyy-mm-dd format |
---|
582 | var yearStr = dateStr.substr(0,4); |
---|
583 | var monthStr = dateStr.substr(5,2); |
---|
584 | var dayStr = dateStr.substr(8,2); |
---|
585 | var date = new Date(parseInt(yearStr, 10), parseInt(monthStr, 10)-1, parseInt(dayStr, 10)); |
---|
586 | } |
---|
587 | else |
---|
588 | { |
---|
589 | // Date in yyyymmdd format |
---|
590 | var yearStr = dateStr.substr(0,4); |
---|
591 | var monthStr = dateStr.substr(4,2); |
---|
592 | var dayStr = dateStr.substr(6,2); |
---|
593 | var date = new Date(parseInt(yearStr, 10), parseInt(monthStr, 10)-1, parseInt(dayStr, 10)); |
---|
594 | } |
---|
595 | } |
---|
596 | return date; |
---|
597 | } |
---|
598 | |
---|
599 | /* |
---|
600 | * Get the ISO week number for a given date |
---|
601 | * |
---|
602 | * Based on code at http://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php |
---|
603 | * |
---|
604 | * @param date String Input date to get ISO week number for. |
---|
605 | * @return int ISO week number for input date. |
---|
606 | */ |
---|
607 | function getISOWeekNumber(date) |
---|
608 | { |
---|
609 | tmpDate = new Date(date); |
---|
610 | tmpDate.setHours(0,0,0); |
---|
611 | // Set to nearest Thursday: current date + 4 - current day number |
---|
612 | // Make Sunday day number 7 |
---|
613 | tmpDate.setDate(tmpDate.getDate() + 4 - (tmpDate.getDay() || 7)); |
---|
614 | // Get first day of year |
---|
615 | var yearStart = new Date(tmpDate.getFullYear(), 0, 1); |
---|
616 | // Calculate full weeks to nearast Thursday (86400000 = 24*60*60*1000 number of ms in a day) |
---|
617 | var weekNo = Math.ceil(( ( (tmpDate - yearStart) / 86400000) + 1)/7); |
---|
618 | return weekNo; |
---|
619 | } |
---|
620 | |
---|
621 | function goPrint() |
---|
622 | { |
---|
623 | var printNote = '<b>Note!</b> For better printing set page orientation to <i>portrait</i>.'; |
---|
624 | printNote += ' Scale down to <i>90%</i> to fit 2 plots per page.'; |
---|
625 | openPrintWindow('<%=ID%>', 'reportcell', 'Lab environment statistics', 'portrait', printNote, '../'); |
---|
626 | } |
---|
627 | |
---|
628 | var xGuide; |
---|
629 | var yGuide; |
---|
630 | |
---|
631 | function drawCanvasGuidelines(event) |
---|
632 | { |
---|
633 | if (!xGuide) |
---|
634 | { |
---|
635 | xGuide = document.getElementById('x-guide'); |
---|
636 | yGuide = document.getElementById('y-guide'); |
---|
637 | } |
---|
638 | var canvas = event.target; |
---|
639 | var centerX = event.clientX; |
---|
640 | var centerY = event.clientY; |
---|
641 | var canvasPos = Main.getElementPosition(canvas); |
---|
642 | var startX = canvasPos.left+50; |
---|
643 | var widthX = canvasPos.width-100; |
---|
644 | var startY = canvasPos.top+80; |
---|
645 | var heightY = canvasPos.height-160; |
---|
646 | if (centerY < startY || centerY > startY+heightY) |
---|
647 | { |
---|
648 | // Hide when mouse is in the text area below or over the plot |
---|
649 | yGuide.style.display = 'none'; |
---|
650 | } |
---|
651 | else |
---|
652 | { |
---|
653 | yGuide.style.top = (centerY-2) + 'px'; |
---|
654 | yGuide.style.left = startX + 'px'; |
---|
655 | yGuide.style.width = widthX + 'px'; |
---|
656 | yGuide.style.display = 'block'; |
---|
657 | } |
---|
658 | if (centerX < startX || centerX > startX + widthX) |
---|
659 | { |
---|
660 | // Hide when mouse is in the text area to the left or right of the plot |
---|
661 | xGuide.style.display = 'none'; |
---|
662 | } |
---|
663 | else |
---|
664 | { |
---|
665 | // Avoid drawing outside the avilable hight (causes an extra pair of scroll bars) |
---|
666 | var yLimit = Main.getWindowHeight(); |
---|
667 | if (startY+heightY > yLimit) |
---|
668 | { |
---|
669 | heightY = yLimit-startY; |
---|
670 | } |
---|
671 | xGuide.style.top = startY + 'px'; |
---|
672 | xGuide.style.left = (centerX-2) + 'px'; |
---|
673 | xGuide.style.height = heightY + 'px'; |
---|
674 | xGuide.style.display = 'block'; |
---|
675 | } |
---|
676 | |
---|
677 | } |
---|
678 | |
---|
679 | function hideCanvasGuidelines(event) |
---|
680 | { |
---|
681 | xGuide.style.display = 'none'; |
---|
682 | yGuide.style.display = 'none'; |
---|
683 | } |
---|
684 | </script> |
---|
685 | |
---|
686 | <style> |
---|
687 | canvas |
---|
688 | { |
---|
689 | width: 700px; |
---|
690 | height: 550px; |
---|
691 | } |
---|
692 | </style> |
---|
693 | </base:head> |
---|
694 | <base:body onload="init()"> |
---|
695 | <p:path><p:pathelement |
---|
696 | title="LabEnv" href="<%="./labenvironmentdatabasestatistics.jsp?ID="+ID%>" |
---|
697 | /><p:pathelement title="Lab environment statistics" |
---|
698 | /></p:path> |
---|
699 | <div id="x-guide" style="position: absolute; z-index: 99; display: none; background-color: #224488; width: 1px;"></div> |
---|
700 | <div id="y-guide" style="position: absolute; z-index: 99; display: none; background-color: #224488; height: 1px;"></div> |
---|
701 | <div class="content"> |
---|
702 | <% |
---|
703 | if (sc.getActiveProjectId() == 0) |
---|
704 | { |
---|
705 | %> |
---|
706 | <div class="messagecontainer note" style="width: 950px; margin-left: 20px; margin-bottom: 20px; margin-right: 0px; font-weight: bold; color: #cc0000;"> |
---|
707 | No project has been selected. You may proceed with the report generation but |
---|
708 | only your own items will be included in the report. |
---|
709 | </div> |
---|
710 | <% |
---|
711 | } |
---|
712 | %> |
---|
713 | |
---|
714 | <form name="labenv" onsubmit="return false;"> |
---|
715 | <!-- 1. Report type--> |
---|
716 | <table border="0" cellspacing="0" cellpadding="0" class="stepform"> |
---|
717 | <tr> |
---|
718 | <td rowspan="3" class="stepno">1</td> |
---|
719 | <td class="steptitle">Report type</td> |
---|
720 | </tr> |
---|
721 | <tr> |
---|
722 | <td class="stepfields"> |
---|
723 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> |
---|
724 | <tr valign="top"> |
---|
725 | <td class="prompt">Report</td> |
---|
726 | <td class="input"> |
---|
727 | <select name="reporttype"> |
---|
728 | <option value="labenvironmentdailydistribution" selected="yes">Daily distribution statistics</option> |
---|
729 | <option value="labenvironmentweeklydistribution">Weekly distribution statistics</option> |
---|
730 | </select> |
---|
731 | </td> |
---|
732 | <td class="status" id="report.status"></td> |
---|
733 | <td class="help"> |
---|
734 | <span id="report.message" class="message" style="display: none;"></span> |
---|
735 | Select which report to generate. |
---|
736 | </td> |
---|
737 | </tr> |
---|
738 | </table> |
---|
739 | </td> |
---|
740 | </tr> |
---|
741 | </table> |
---|
742 | |
---|
743 | <div id="parameterSection" style="display:none;"> |
---|
744 | <p></p> |
---|
745 | <!-- 2. Report parameters--> |
---|
746 | <table border="0" cellspacing="0" cellpadding="0" class="stepform"> |
---|
747 | <tr> |
---|
748 | <td rowspan="3" class="stepno">2</td> |
---|
749 | <td class="steptitle">Report parameters</td> |
---|
750 | </tr> |
---|
751 | <tr> |
---|
752 | <td class="stepfields"> |
---|
753 | <!-- |
---|
754 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> |
---|
755 | <tr> |
---|
756 | <td class="prompt">Sensor</td> |
---|
757 | <td class="input"> |
---|
758 | <select id="sensorSelectId" name="sensorSelect"> |
---|
759 | <option value="all">All</option> |
---|
760 | </select> |
---|
761 | </td> |
---|
762 | <td class="status" id="sensorSelect.status"></td> |
---|
763 | <td class="help"><span id="time.message" class="message" style="display: none;"></span></td> |
---|
764 | </tr> |
---|
765 | <tr id="fromDateTimeSection" valign="top"> |
---|
766 | <td class="prompt">From</td> |
---|
767 | <td class="input">Date <input type="text" name="fromdate" value="" size="12" maxlength="10" |
---|
768 | onkeypress="focusOnEnter(event, 'fromtime')" onblur="fromDateTimeOnChange()"> |
---|
769 | Time <input type="text" name="fromtime" value="" size="6" maxlength="4" |
---|
770 | onkeypress="focusOnEnter(event, 'fromdate')" onblur="fromDateTimeOnChange()"></td> |
---|
771 | <td class="status" id="fromdatetime.status"></td> |
---|
772 | <td class="help"><span id="fromdatetime.message" class="message" style="display: none;"></span>Start date+time (YYYYMMDD, HHMM) Blank fields give data from start</td> |
---|
773 | </tr> |
---|
774 | <tr id="toDateTimeSection" valign="top"> |
---|
775 | <td class="prompt">To</td> |
---|
776 | <td class="input">Date <input type="text" name="todate" value="" size="12" maxlength="10" |
---|
777 | onkeypress="focusOnEnter(event, 'toTime')" onblur="toDateTimeOnChange()"> |
---|
778 | Time <input type="text" name="totime" value="" size="6" maxlength="4" |
---|
779 | onkeypress="focusOnEnter(event, 'totime')" onblur="toDateTimeOnChange()"></td> |
---|
780 | <td class="status" id="todatetime.status"></td> |
---|
781 | <td class="help"><span id="todatetime.message" class="message" style="display: none;"></span>End date+time (YYYYMMDD, HHMM) Blank fields give data to end</td> |
---|
782 | </tr> |
---|
783 | </table> |
---|
784 | --> |
---|
785 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> |
---|
786 | <tr> |
---|
787 | <td valign="top" class="prompt"> |
---|
788 | <div id="reportPeriodSubSection01" style="display:none;"> |
---|
789 | <text id="reportPeriodSubSection01Header">From</text> |
---|
790 | </div> |
---|
791 | </td> |
---|
792 | <td valign="top" class="input"> |
---|
793 | <div id="reportPeriodSubSection02" style="display:none;"> |
---|
794 | Date <input type="text" name="fromdate" value="" size="12" maxlength="10" |
---|
795 | onkeypress="focusOnEnter(event, 'fromTime')" onblur="fromDateTimeOnChange()"> |
---|
796 | Time <input type="text" name="fromtime" value="" size="6" maxlength="4" |
---|
797 | onkeypress="focusOnEnter(event, 'fromdate')" onblur="fromDateTimeOnChange()"> |
---|
798 | </div> |
---|
799 | </td> |
---|
800 | <td valign="top" class="status" id="sensorSelect.status"></td> |
---|
801 | <td class="help"> |
---|
802 | <div id="reportPeriodSubSection04" style="display:none;"> |
---|
803 | <span id="sensorSelect.message" class="message" style="display: none;"></span> |
---|
804 | <text id="reportPeriodSubSection04HelpText">Select sensor(s)</text><br> |
---|
805 | </div> |
---|
806 | </td> |
---|
807 | </tr> |
---|
808 | <tr> |
---|
809 | <td valign="top" class="prompt"> |
---|
810 | <div id="viewTypeSubSection01" style="display:none;"> |
---|
811 | To |
---|
812 | </div> |
---|
813 | </td> |
---|
814 | <td valign="top" class="input"> |
---|
815 | <div id="viewTypeSubSection02" style="display:none;"> |
---|
816 | Date <input type="text" name="todate" value="" size="12" maxlength="10" |
---|
817 | onkeypress="focusOnEnter(event, 'totime')" onblur="toDateTimeOnChange()"> |
---|
818 | Time <input type="text" name="totime" value="" size="6" maxlength="4" |
---|
819 | onkeypress="focusOnEnter(event, 'todate')" onblur="toDateTimeOnChange()"> |
---|
820 | </div> |
---|
821 | </td> |
---|
822 | <td valign="top" class="status" id="displayViewType.status"></td> |
---|
823 | <td class="help"> |
---|
824 | <div id="viewTypeSubSection04" style="display:none;"> |
---|
825 | <span id="displayViewType.message" class="message" style="display: none;"></span> |
---|
826 | End date+time (YYYYMMDD, HHMM) Blank fields give data to end. |
---|
827 | </div> |
---|
828 | </td> |
---|
829 | </tr> |
---|
830 | <tr> |
---|
831 | <td valign="top" class="prompt"> |
---|
832 | <div id="dayTimeFilterSubSection01" style="display:none;"> |
---|
833 | Daytime filter |
---|
834 | </div> |
---|
835 | </td> |
---|
836 | <td valign="top" class="input"> |
---|
837 | <div id="dayTimeFilterSubSection02" style="display:none;"> |
---|
838 | From time <input type="text" name="filterfromtime" value="" size="6" maxlength="4" |
---|
839 | onkeypress="focusOnEnter(event, 'filtertotime')" onblur="toDateTimeOnChange()"> |
---|
840 | To time <input type="text" name="filtertotime" value="" size="6" maxlength="4" |
---|
841 | onkeypress="focusOnEnter(event, 'todate')" onblur="toDateTimeOnChange()"> |
---|
842 | </div> |
---|
843 | </td> |
---|
844 | <td valign="top" class="status" id="dayTimeFilter.status"></td> |
---|
845 | <td class="help"> |
---|
846 | <div id="dayTimeFilterSubSection04" style="display:none;"> |
---|
847 | <span id="dayTimeFilter.message" class="message" style="display: none;"></span> |
---|
848 | Select what daytime interval to include in statistics (HHMM). Note that climate control in some labs are only active during day. Blank fields give data for full day. |
---|
849 | </div> |
---|
850 | </td> |
---|
851 | </tr> |
---|
852 | <!-- |
---|
853 | <tr> |
---|
854 | <td valign="top" class="prompt"> |
---|
855 | <div id="chartSiteSubSection01" style="display:none;"> |
---|
856 | Chart site |
---|
857 | </div> |
---|
858 | </td> |
---|
859 | <td valign="top" class="input"> |
---|
860 | <div id="chartSiteSubSection02" style="display:none;"> |
---|
861 | <select id="chartSiteSelect" name="chartsite"> |
---|
862 | <option value="allsitestogether" selected="yes">All sites together</option> |
---|
863 | </select> |
---|
864 | </div> |
---|
865 | </td> |
---|
866 | <td valign="top" class="status" id="displaychartSite.status"></td> |
---|
867 | <td class="help"> |
---|
868 | <div id="chartSiteSubSection04" style="display:none;"> |
---|
869 | <span id="displaysite.message" class="message" style="display: none;"></span> |
---|
870 | Select what site to take input data from. |
---|
871 | </div> |
---|
872 | </td> |
---|
873 | </tr> |
---|
874 | --> |
---|
875 | <tr> |
---|
876 | <td valign="top" class="prompt"> |
---|
877 | <div id="weekDayFilterSubSection01" style="display:none;"> |
---|
878 | Week day filter |
---|
879 | </div> |
---|
880 | </td> |
---|
881 | <td valign="top" class="input"> |
---|
882 | <div id="weekDayFilterSubSection02" style="display:none;"> |
---|
883 | <select id="weekDayFilterSelectId" name="weekdayfilter"> |
---|
884 | <option value="all">All</option> |
---|
885 | <option value="mondaytofriday">Mon-Fri only</option> |
---|
886 | <option value="saturdaytosunday">Sat-Sun only</option> |
---|
887 | <option value="workdays" selected="yes">Workdays</option> |
---|
888 | <option value="nonworkdays">Non-workdays</option> |
---|
889 | </select> |
---|
890 | </div> |
---|
891 | </td> |
---|
892 | <td valign="top" class="status" id="weekDayFilter.status"></td> |
---|
893 | <td class="help"> |
---|
894 | <div id="weekDayFilterSubSection04" style="display:none;"> |
---|
895 | <span id="weekDayFilter.message" class="message" style="display: none;"></span> |
---|
896 | Select what weekdays to include in statistics. Note that climate control in some labs are shut down on non-workdays (Saturdays, Sundays and work-free days related to holidays). |
---|
897 | </div> |
---|
898 | </td> |
---|
899 | </tr> |
---|
900 | <tr> |
---|
901 | <td valign="top" class="prompt"> |
---|
902 | <div id="chartVariantSubSection01" style="display:none;"> |
---|
903 | Chart data |
---|
904 | </div> |
---|
905 | </td> |
---|
906 | <td valign="top" class="input"> |
---|
907 | <div id="chartVariantSubSection02" style="display:none;"> |
---|
908 | <select id="sensorSelectId" name="chartvariant"> |
---|
909 | <option value="all">All</option> |
---|
910 | </select> |
---|
911 | </div> |
---|
912 | </td> |
---|
913 | <td valign="top" class="status" id="displaychartVariant.status"></td> |
---|
914 | <td class="help"> |
---|
915 | <div id="chartVariantSubSection04" style="display:none;"> |
---|
916 | <span id="displaychartVariant.message" class="message" style="display: none;"></span> |
---|
917 | Select what data to report. |
---|
918 | </div> |
---|
919 | </td> |
---|
920 | </tr> |
---|
921 | </table> |
---|
922 | </td> |
---|
923 | </tr> |
---|
924 | </table> |
---|
925 | </div> |
---|
926 | |
---|
927 | <div id="reportSection" style="display:none;"> |
---|
928 | <p></p> |
---|
929 | <table border="0" cellspacing="0" cellpadding="0" class="stepform"> |
---|
930 | <tr> |
---|
931 | <td rowspan="3" class="stepno">3</td> |
---|
932 | <td class="steptitle">Generated report |
---|
933 | <span id="printButton" class="link" style="float:right; display: none;" onclick="goPrint()"><img src="../images/print.png" style="padding-right: 0.5em;">Print version…</span> |
---|
934 | </td> |
---|
935 | </tr> |
---|
936 | <tr> |
---|
937 | <td id="reportcell" class="stepfields"> |
---|
938 | <div id="reportdiv" style="text-align: center;"> |
---|
939 | <div class="loading" id="loading"> |
---|
940 | <table> |
---|
941 | <tr> |
---|
942 | <td><img src="../images/loading.gif"></td> |
---|
943 | <td id="loading.msg">Generating report...</td> |
---|
944 | </tr> |
---|
945 | </table> |
---|
946 | </div> |
---|
947 | </div> |
---|
948 | </td> |
---|
949 | </tr> |
---|
950 | </table> |
---|
951 | </div> |
---|
952 | |
---|
953 | <div class="messagecontainer error" id="errorMessage" style="display: none; width: 950px; margin-left: 20px; margin-bottom: 0px;"></div> |
---|
954 | |
---|
955 | <table style="margin-left: 20px; margin-top: 10px;" class="navigation"> |
---|
956 | <tr> |
---|
957 | <td><base:button id="gocancel" title="Cancel" onclick="goRestart(false)" style="display: none;"/></td> |
---|
958 | <!-- |
---|
959 | <td><base:button id="gonext" title="Next" image="<%=home+"/images/gonext.png"%>" onclick="goNext(true)" /></td> |
---|
960 | <td><base:button id="gocreate" title="Generate" image="<%=home+"/images/gonext.png"%>" onclick="goCreate()" style="display: none;"/></td> |
---|
961 | <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" onclick="goRestart(true)" style="display: none;"/></td> |
---|
962 | --> |
---|
963 | <td><base:button id="gonext" title="Next" image="<%="gonext.png"%>" onclick="goNext(true)" /></td> |
---|
964 | <td><base:button id="gocreate" title="Generate" image="<%="gonext.png"%>" onclick="goCreate()" style="display: none;"/></td> |
---|
965 | <td><base:button id="gorestart" title="Restart" image="<%="goback.png"%>" onclick="goRestart(true)" style="display: none;"/></td> |
---|
966 | <td id="gonext.message" class="message"></td> |
---|
967 | </tr> |
---|
968 | </table> |
---|
969 | </form> |
---|
970 | </div> |
---|
971 | |
---|
972 | </base:body> |
---|
973 | </base:page> |
---|
974 | <% |
---|
975 | } |
---|
976 | finally |
---|
977 | { |
---|
978 | if (dc != null) dc.close(); |
---|
979 | } |
---|
980 | %> |
---|