source: extensions/net.sf.basedb.reggie/trunk/resources/partitionform.jsp @ 1485

Last change on this file since 1485 was 1460, checked in by Martin Svensson, 10 years ago

Some minor changes to the partition wizard and correction of a misspelled word in specimen wizard

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 22.2 KB
Line 
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.clients.web.Base" 
8%>
9<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
10<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
11<%
12final SessionControl sc = Base.getExistingSessionControl(request, true);
13final String ID = sc.getId();
14final float scale = Base.getScale(sc);
15DbControl dc = null;
16try
17{
18  dc = sc.newDbControl();
19  final User user = User.getById(dc, sc.getLoggedInUserId());
20%>
21<base:page type="default" >
22<base:head scripts="ajax.js" styles="path.css">
23  <link rel="stylesheet" type="text/css" href="reggie.css">
24  <script language="JavaScript" src="reggie.js" type="text/javascript" charset="UTF-8"></script>
25 
26 
27<script language="JavaScript">
28var debug = false;
29var currentStep = 1;
30
31var specimenTubes = null;
32var selectedTubes = null;
33
34var partitionDateIsValid = false;
35
36var spWeightsAreValid;
37var apWeightsAreValid;
38var hisWeightsAreValid;
39var oneOrMoreWeightsAreSet;
40var nofPiecesAreValid;
41
42function init()
43{
44  var frm = document.forms['reggie'];
45  var selectList = frm.tubesSelect;
46  getSpecimenTubes();
47 
48  var specimenTubeOptions = '';
49  if (specimenTubes != null && specimenTubes.length > 0)
50  {
51    for (var i=0;i<specimenTubes.length;i++)
52    {
53      var tube = specimenTubes[i];
54      selectList.options[selectList.length] = new Option(tube.name, tube.name);
55    }
56  }
57  else
58  {
59    selectList.disabled = true;
60    Main.hide('gonext');   
61    setInputStatus('tubes','No tubes available for partition', 'invalid')
62  } 
63}
64
65function goNext()
66{
67  setInnerHTML('gonext.message', '');
68  if (currentStep == 1)
69  {   
70    gotoStep2();
71  }
72  else if (currentStep == 2)
73  {
74    partitionDateOnBlur();
75    if (step2IsValid()) gotoStep3();
76  }
77}
78
79function step2IsValid()
80{
81  return partitionDateIsValid;
82}
83
84function step3IsValid()
85{
86  for (var i=0; i<spWeightsAreValid.length; i++)
87  {
88   
89    if (spWeightsAreValid[i] == false ||
90        apWeightsAreValid[i] == false ||
91        hisWeightsAreValid[i] == false ||
92        nofPiecesAreValid[i] == false)
93    {
94      return false;
95    }
96    if (oneOrMoreWeightsAreSet[i] == false)
97    {
98      return false;
99    }
100  } 
101  return true;
102}
103
104function sortTubesByPosition(t1, t2)
105{
106  var box1 = t1.box;
107  var box2 = t2.box;
108  if (box1 < box2) return -1;
109  else if (box1>box2) return 1;
110  else
111  {
112    var row1 = t1.row;
113    var row2 = t2.row;
114    if (row1 < row2) return -1;
115    else if (row1>row2) return 1;
116    else
117    {
118      var col1 = t1.column;
119      var col2 = t2.column;
120      return col1 - col2;
121    }
122  }
123}
124
125function gotoStep2()
126{
127  var frm = document.forms['reggie'];
128  var selectList = frm.tubesSelect;
129  selectedTubes = new Array();
130  for (var i=0;i<selectList.length; i++)
131  {
132    if (selectList.options[i].selected)
133      selectedTubes.push(specimenTubes[i]);
134  }   
135  selectedTubes.sort(sortTubesByPosition);
136  if (selectedTubes.length == 0)
137  {
138    setInputStatus('tubes', 'Missing', 'invalid');
139    return;
140  }
141 
142  setInputStatus('tubes', '', 'valid');
143  // Change section
144  frm.tubesSelect.disabled = true;
145 
146  Main.show('partitionSection');
147  Main.show('gocancel');
148  var currentTime = new Date();
149  var currentYear = currentTime.getFullYear().toString();
150  var currentMonth = (currentTime.getMonth()+1).toString();
151  currentMonth = currentMonth.length < 2 ? '0'+currentMonth : currentMonth;
152  var currentDate = currentTime.getDate().toString();
153  currentDate = currentDate.length < 2 ? '0'+currentDate : currentDate;
154 
155  var dateString = currentYear + currentMonth + currentDate;
156 
157  frm.partitionDate.value = dateString;
158  frm.partitionDate.setSelectionRange(0,frm.partitionDate.value.length);
159  frm.partitionDate.focus();
160  currentStep = 2;
161}
162
163function gotoStep3()
164{
165  var frm = document.forms['reggie'];
166  frm.partitionDate.disabled = true; 
167 
168  var inputWeightHtml; 
169  if (selectedTubes.length > 0)
170  {
171    spWeightsAreValid = Array();
172    apWeightsAreValid = Array();
173    hisWeightsAreValid = Array();
174    nofPiecesAreValid = Array();
175    oneOrMoreWeightsAreSet = Array();
176   
177    for (var i=0;i<selectedTubes.length;i++)
178    {
179      spWeightsAreValid[i] = true;
180      apWeightsAreValid[i] = true;
181      hisWeightsAreValid[i] = true;
182      nofPiecesAreValid[i] = false;
183      oneOrMoreWeightsAreSet[i] = false;     
184    }
185   
186    inputWeightHtml = '';
187    var spTitle = 'SpWeight<br>';
188    var apTitle = 'ApWeight<br>';
189    var hisTitle = 'HisWeight<br>';
190    var nofTitle = 'NofPieces<br>';
191    var appearanceTitle = 'Appearance<br>';
192    var necrosisTitle = 'Necrosis%<br>';
193    var fatTitle = 'Fat%<br>';
194    var colouredTitle = 'Coloured<br>';
195    var bloodyTitle = 'Bloody<br>';
196   
197    var appearanceOptions = '<option selected ></option>'; 
198    appearanceOptions += '<option value="HOMOGENEOUS">Homogeneous</option>';
199    appearanceOptions += '<option value="HETEROGENEOUS">Heterogeneous</option>';
200   
201    var necrosisOptions = '<option selected value="0">0</option>';
202    necrosisOptions += '<option value="5">5</option>';
203    necrosisOptions += '<option value="10">10</option>';
204    necrosisOptions += '<option value="15">15</option>';
205    necrosisOptions += '<option value="20">20</option>';
206    necrosisOptions += '<option value="30">30</option>';
207    necrosisOptions += '<option value="40">40</option>';
208    necrosisOptions += '<option value="60">60</option>';
209    necrosisOptions += '<option value="80">80</option>';
210    necrosisOptions += '<option value="100">100</option>';
211   
212    var fatOptions = '<option selected value=0>0</option>';
213    fatOptions += '<option value=20>20</option>';
214    fatOptions += '<option value=40>40</option>';
215    fatOptions += '<option value=60>60</option>';
216    fatOptions += '<option value=80>80</option>';
217    fatOptions += '<option value=100>100</option>';
218   
219    for (var i=0;i<selectedTubes.length; i++)
220    {
221      var tube = selectedTubes[i];
222      var nextStep = i<(selectedTubes.length-1) ? 'focusOnEnter(event, \'bloody'+(i+1)+'\')' : '';
223     
224      inputWeightHtml += '<tr>';
225      inputWeightHtml += '<td rowspan=2 class=prompt>'+tube.name;
226      // Only show box information if there is something show.     
227      if (tube.row != null && tube.column != null)
228      {
229        inputWeightHtml += ' ['+tube.box+'&nbsp;'+tube.row+tube.column+']';
230      }
231      inputWeightHtml += '</td>';
232     
233      inputWeightHtml += '<td style="width:400px;">';
234      inputWeightHtml += '<table style="width:100%"><tr>';     
235      inputWeightHtml += '<td>'+bloodyTitle+'<input type=checkbox onkeypress="checkOnNumber(event, this);focusOnEnter(event, \'appearance'+i+'\')" onfocus="messageOnFocus(0,'+i+')" name=bloody'+i+' /></td>';
236      inputWeightHtml += '<td>'+appearanceTitle+'<select name=appearance'+i+' onfocus="messageOnFocus(1,'+i+')" onkeypress="focusOnEnter(event, \'necrosis'+i+'\')">'+appearanceOptions+'</select></td>';
237      inputWeightHtml += '<td>'+necrosisTitle+'<select name=necrosis'+i+' onfocus="messageOnFocus(2,'+i+')" onkeypress="focusOnEnter(event, \'fat'+i+'\')">'+necrosisOptions+'</select></td>'; 
238      inputWeightHtml += '<td>'+fatTitle+'<select name=fat'+i+' onfocus="messageOnFocus(3,'+i+')" onkeypress="focusOnEnter(event, \'coloured'+i+'\')">'+fatOptions+'</select></td>';
239      inputWeightHtml += '<td>'+colouredTitle+'<input type=checkbox name=coloured'+i+' onfocus="messageOnFocus(4,'+i+')" onkeypress="checkOnNumber(event, this);focusOnEnter(event, \'nofPieces'+i+'\')" /></td>'
240      inputWeightHtml += '<td>'+nofTitle+'<input name="nofPieces'+i+'" onfocus="messageOnFocus(5,'+i+')" onblur="nofPiecesOnChange('+i+')" onkeypress="focusOnEnter(event, \'spWeight'+i+'\');return isNumberKey(event)" size=2 /></td>';
241      inputWeightHtml += '<td>'+spTitle+'<input name="spWeight'+i+'" onfocus="messageOnFocus(6,'+i+')" onblur="spWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'hisWeight'+i+'\');return isNumberKey(event)" size=4 /></td>';
242      inputWeightHtml += '<td>'+hisTitle+'<input name="hisWeight'+i+'" onfocus="messageOnFocus(7,'+i+')" onblur="hisWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'apWeight'+i+'\');return isNumberKey(event)" size=4 /></td>';
243      inputWeightHtml += '<td>'+apTitle+'<input name="apWeight'+i+'" onfocus="messageOnFocus(8,'+i+')" onblur="apWeightOnChange('+i+')" onkeypress="'+nextStep+';return isNumberKey(event)" size=4 /></td>';     
244      inputWeightHtml += '</tr>';
245      inputWeightHtml += '</table>';
246      inputWeightHtml += '</td>';
247      inputWeightHtml += '<td rowspan=2 class="status" id="'+i+'.status"></td>';     
248      inputWeightHtml += '</tr>';
249     
250      inputWeightHtml += '<tr>';
251      inputWeightHtml += '<td style="width:400px;" class="help"><span class="message" id="'+i+'.message"></span><span id="'+i+'.help"></span></td>';     
252      inputWeightHtml += '</tr>';     
253      inputWeightHtml += '<tr><td>&nbsp;</td></tr>';
254    }
255    setInnerHTML('weightInputs', inputWeightHtml);
256  }
257  Main.show('weightSection');
258  Main.hide('gonext');
259  Main.show('gocreate');
260  frm.bloody0.focus();
261}
262
263function checkOnNumber(event, element)
264{
265  if (event.charCode == 48)
266  {
267    element.checked = false;
268  }
269  else if (event.charCode == 49)
270  {
271    element.checked = true;
272  }
273  return true;
274}
275
276function isNumberKey(evt)
277{
278  evt = (evt) ? evt : ((window.event) ? event : null);
279    if (evt) {
280       var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
281       if (elem) {
282           var charCode = (evt.charCode) ? evt.charCode :
283               ((evt.which) ? evt.which : evt.keyCode);
284           if ((charCode < 32 ) || 
285               (charCode > 45 && charCode < 47) || 
286               (charCode > 47 && charCode < 58)) {
287               return true;
288           } else {
289               return false;
290           }
291       }
292    }
293}
294
295function messageOnFocus(order, tubeIndex)
296{ 
297  var helpMessage;
298  switch(order)
299  {
300    case 0:
301      helpMessage = 'Check this if the partition is bloody. Unchecked is default.';
302      break;
303    case 1:
304      helpMessage = 'Select appearance. Empty is default';
305      break;
306    case 2:
307      helpMessage = 'Select percentage of necrosis. \'0\' is default.';
308      break;
309    case 3:
310      helpMessage = 'Select percentage of fat. \'0\' is default.';
311      break;
312    case 4:
313      helpMessage = 'Check this if the partition is coloured. Unchecked is default.';
314      break;
315    case 5:
316      helpMessage = 'Number of pieces in this partition.';
317      break;
318    case 6:
319      helpMessage = 'Sp weight in [mg].';
320      break;
321    case 7:
322      helpMessage = 'His weight in [mg].';
323      break;
324    case 8:
325      helpMessage = 'Ap weight in [mg].';
326      break;
327    default:
328      helpMessage='&nbsp;';
329  }
330  for (var i=0;i<selectedTubes.length;i++)
331  {
332    if (i!=tubeIndex) setInnerHTML(i+'.help', '&nbsp;')
333  }
334  setInnerHTML(tubeIndex+'.help', helpMessage); 
335}
336
337function updateInputStatus(tubeIndex)
338{
339  var frm = document.forms['reggie'];
340  if(nofPiecesAreValid[tubeIndex] == false)
341  {
342    setInputStatus(tubeIndex, 'NofPieces is invalid.', 'invalid');
343    frm.elements['nofPieces'+tubeIndex].focus();
344    return ;
345  }
346  if (spWeightsAreValid[tubeIndex] == false)
347  {
348    setInputStatus(tubeIndex, 'SpWeight is invalid.','invalid');
349    return;
350  }
351  if(hisWeightsAreValid[tubeIndex] == false)
352  {
353    setInputStatus(tubeIndex, 'HisWeight is invalid.', 'invalid');
354    return;
355  }
356  if(apWeightsAreValid[tubeIndex] == false)
357  {
358    setInputStatus(tubeIndex, 'APWeight is invalid.', 'invalid');
359    return;
360  }
361 
362  var spWeightValue = frm.elements['spWeight'+tubeIndex].value;
363  var apWeightValue = frm.elements['apWeight'+tubeIndex].value;
364  var hisWeightValue = frm.elements['hisWeight'+tubeIndex].value; 
365  if (spWeightValue == '' && apWeightValue == '' && hisWeightValue == '')
366  {
367    oneOrMoreWeightsAreSet[tubeIndex] = false;
368    setInputStatus(tubeIndex, 'No weight is defined.', 'invalid');
369    return;
370  }
371  oneOrMoreWeightsAreSet[tubeIndex] = true; 
372  setInputStatus(tubeIndex, '', 'valid');
373}
374
375function spWeightOnChange(tubeIndex)
376{
377  var inputName = 'spWeight'+tubeIndex;
378  var frm = document.forms['reggie'];
379  var weightInput = frm.elements[inputName].value;
380  if (weightInput != '')
381  {
382    if (weightInput < 0)
383    {
384      spWeightsAreValid[tubeIndex] = false;
385      updateInputStatus(tubeIndex);
386      return;
387    }
388    if (weightInput == '0')
389    {
390      frm.elements[inputName].value = '';
391    }
392  } 
393  spWeightsAreValid[tubeIndex] = true;
394  updateInputStatus(tubeIndex);
395}
396
397function apWeightOnChange(tubeIndex)
398{
399  var inputName = 'apWeight'+tubeIndex;
400  var frm = document.forms['reggie'];
401  var weightInput = frm.elements[inputName].value;
402  if (weightInput != '')
403  {
404    if (weightInput < 0)
405    {
406      apWeightsAreValid[tubeIndex] = false;
407      updateInputStatus(tubeIndex);
408      return;
409    } 
410    if (weightInput == '0')
411    {
412      frm.elements[inputName].value = '';
413    } 
414  }
415  apWeightsAreValid[tubeIndex] = true;
416  updateInputStatus(tubeIndex);
417}
418
419function hisWeightOnChange(tubeIndex)
420{
421  var inputName = 'hisWeight'+tubeIndex;
422  var frm = document.forms['reggie'];
423  var weightInput = frm.elements[inputName].value;
424  if (weightInput != '')
425  {
426    if (weightInput < 0)
427    {
428      hisWeightsAreValid[tubeIndex] = false;
429      updateInputStatus(tubeIndex);
430      return;
431    }
432    if (weightInput == '0')
433    {
434      frm.elements[inputName].value = '';
435    }   
436  } 
437  hisWeightsAreValid[tubeIndex] = true;
438  updateInputStatus(tubeIndex);
439}
440
441function nofPiecesOnChange(tubeIndex)
442{
443  var inputName = 'nofPieces'+tubeIndex;
444  var frm = document.forms['reggie'];
445  var fieldInput = frm.elements[inputName].value;
446  if (fieldInput != '')
447  {
448    if (fieldInput < 0)
449    {
450      nofPiecesAreValid[tubeIndex] = false;
451      updateInputStatus(tubeIndex);
452      return;
453    } 
454    if (fieldInput == '0')
455    {
456      fieldInput = '';     
457      frm.elements[inputName].value = fieldInput;
458    }
459  } 
460  if (fieldInput == '')
461  {
462    nofPiecesAreValid[tubeIndex] = false;
463    updateInputStatus(tubeIndex);
464    return;
465  }
466  nofPiecesAreValid[tubeIndex] = true;
467  updateInputStatus(tubeIndex);
468}
469
470function partitionDateOnBlur()
471{
472  var frm = document.forms['reggie'];
473  var partitionDate = frm.partitionDate.value;
474  var todaysDate = new Date();
475  partitionDateIsValid = false;
476 
477  setInputStatus('partitionDate', '', '');
478 
479  if (partitionDate != '')
480  {
481    partitionDate = autoFillDate(partitionDate);
482    frm.partitionDate.value = partitionDate;
483   
484    if (!Dates.isDate(partitionDate, 'yyyyMMdd'))
485    {
486      setInputStatus('partitionDate', 'Not a valid date', 'invalid');
487      return;
488    }   
489    if (todaysDate < new Date(partitionDate.substring(0,4), new Number(partitionDate.substring(4,6)-1), partitionDate.substring(6)))
490    {
491      setInputStatus('partitionDate', 'Future dates are not valid','invalid');
492      return;
493    }
494    setInputStatus('partitionDate','','valid');   
495  }
496  else
497  {
498    setInputStatus('partitionDate', 'Missing', 'invalid');
499    return;
500  }
501  partitionDateIsValid = true;
502}
503
504function getSpecimenTubes()
505{
506  var frm = document.forms['reggie']; 
507 
508  var request = Ajax.getXmlHttpRequest();
509  var url = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=GetSpecimenTubes';   
510  request.open("GET", url, false); 
511  request.send(null);
512
513  if (debug) Main.debug(request.responseText); 
514  var response = JSON.parse(request.responseText); 
515  if (response.status != 'ok')
516  {
517    setFatalError(response.message);
518    return false;
519  } 
520  specimenTubes = response.tubeInfo.specimenTubes;
521}
522
523function goCreate()
524{
525  if (!step3IsValid()) return;
526 
527  Main.hide('gocancel');
528  Main.hide('gocreate');
529 
530  var frm = document.forms['reggie'];
531  var tubeInfo = new Object();
532 
533  var specimens = selectedTubes;
534  var nofTubes = specimens.length;
535  var partitionDateValue = frm.elements['partitionDate'].value;
536  tubeInfo.partitionDate = partitionDateValue;
537  for (var i=0; i<nofTubes; i++)
538  {
539    frm.elements['spWeight'+i].disabled = true;
540    frm.elements['apWeight'+i].disabled = true;
541    frm.elements['hisWeight'+i].disabled = true;
542    frm.elements['nofPieces'+i].disabled = true;
543    frm.elements['bloody'+i].disabled = true;
544    frm.elements['appearance'+i].disabled = true;
545    frm.elements['necrosis'+i].disabled = true;
546    frm.elements['fat'+i].disabled = true;
547    frm.elements['coloured'+i].disabled = true;
548       
549    var specimenTube = specimens[i];
550   
551    var spWeightValue = frm.elements['spWeight'+i].value; 
552    if (spWeightValue != '') specimenTube.spWeight = spWeightValue;
553    var apWeightValue = frm.elements['apWeight'+i].value;
554    if (apWeightValue != '') specimenTube.apWeight = apWeightValue;
555    var hisWeightValue = frm.elements['hisWeight'+i].value;
556    if (hisWeightValue != '') specimenTube.hisWeight = hisWeightValue;
557    var nofPiecesValue = frm.elements['nofPieces'+i].value;
558    if (nofPiecesValue != '') specimenTube.nofPieces = nofPiecesValue;
559   
560    var partitionComment = ''; 
561    var appearanceElement = frm.elements['appearance'+i];
562    var necrosisElement = frm.elements['necrosis'+i];
563    var fatElement = frm.elements['fat'+i];
564    var appearanceValue = appearanceElement.options[appearanceElement.selectedIndex].value;   
565    var necrosisValue = necrosisElement.options[necrosisElement.selectedIndex].value;
566    var fatValue = fatElement.options[fatElement.selectedIndex].value;
567   
568    // Generate partition comment string
569    if (frm.elements['bloody'+i].checked == true) partitionComment += 'BLOODY';
570    if (appearanceValue != '') partitionComment += (partitionComment.length>0 ? ';' : '') + appearanceValue;
571    if (necrosisValue != '0') partitionComment += (partitionComment.length>0 ? ';' : '') + 'NECROSIS'+necrosisValue+'%';
572    if (fatValue != '0') partitionComment += (partitionComment.length>0 ? ';' : '') + 'FAT'+fatValue+'%';
573    if (frm.elements['coloured'+i].checked == true) partitionComment += partitionComment.length>0 ? ';COLOURED' : 'COLOURED';
574   
575    specimenTube.operatorPartitionComment = partitionComment.length > 0 ? partitionComment : null;
576   
577    specimens[i] = specimenTube;   
578  }
579  tubeInfo.specimens = specimens;
580  var submitInfo = new Object();
581  submitInfo.tubeInfo = tubeInfo;
582 
583  if (debug) Main.debug(JSON.stringify(caseInfo));     
584  var request = Ajax.getXmlHttpRequest();
585  var url = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=CreatePartitions';
586  request.open("POST", url, false);
587  request.setRequestHeader("Content-Type", "application/json");
588  request.send(JSON.stringify(submitInfo));
589
590  if (debug) Main.debug(request.responseText);
591
592  var response = JSON.parse(request.responseText);
593  if (response.status != 'ok')
594  {
595    setFatalError(response.message);
596    return false;
597  }
598
599  var msg = '<ul>';
600  for (var i = 0; i < response.messages.length; i++)
601  {
602    msg += '<li>' + response.messages[i];
603  }
604  msg += '</ul>';
605  setInnerHTML('done', msg);
606 
607 
608  Main.show('done');
609  Main.show('gorestart');
610}
611
612function downloadLabelFile()
613{
614  var downloadFileInput = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=GetLabelFile';
615  downloadFileInput += '&tubes=';
616  var separator = '';
617  for (i in selectedTubes)
618  {
619    downloadFileInput += separator + selectedTubes[i].name;
620    separator = ',';
621  }
622  window.location = downloadFileInput;
623}
624</script>
625
626
627</base:head>
628<base:body onload="init()">
629<p:path style="margin-top: 20px; margin-bottom: 10px;">
630    <p:pathelement title="Reggie" href="<%="index.jsp?ID="+ID%>" />
631    <p:pathelement title="Partition registration" />
632  </p:path>
633
634  <%
635  if (sc.getActiveProjectId() == 0)
636  {
637    %>
638    <base:note type="warning" style="width: 800px; margin-left: 20px; margin-bottom: 20px; margin-right: 0px; font-weight: bold; color: #cc0000;">
639      No project has been selected. You may proceed with the registration but
640      created items will not be shared.
641    </base:note>
642    <%
643  }
644  %>
645
646  <form name="reggie" onsubmit="return false;">
647 
648  <!-- 1. Case name-->
649  <table border="0" cellspacing="0" cellpadding="0" class="stepform">
650  <tr>
651    <td rowspan="3" class="stepno">1</td>
652    <td class="steptitle">Select specimen tubes</td>
653  </tr>
654  <tr>
655    <td class="stepfields">
656      <table border="0" cellspacing="0" cellpadding="0" width="100%">
657      <tr valign="top">
658        <td class="prompt">Specimen tubes</td>
659        <td class="input"><select style="width:50%" name="tubeSelect" id="tubesSelect" multiple="multiple" size="12" onkeypress='doOnTab(event, goNext)'></select></td>
660        <td class="status" id="tubes.status"></td>
661        <td class="help"><span id="tubes.message" class="message" style="display: none;"></span>Select specimen tubes to include in the partition.</td>
662      </tr>
663      </table>
664    </td>
665  </tr>
666  </table>
667 
668  <!-- 2. General partition information -->
669  <div id="partitionSection" style="display: none;">
670    <p></p>
671    <table border="0" cellspacing="0" cellpadding="0" class="stepform">
672    <tr>
673      <td rowspan="2" class="stepno">2</td>
674      <td class="steptitle">General partition information</td>
675    </tr>
676    <tr>
677      <td class="stepfields">
678        <table border="0" cellspacing="0" cellpadding="0" width="100%">
679        <tr valign="top">
680          <td class="prompt">Partition date</td>
681          <td class="input"><input type="text" name="partitionDate" 
682             onkeypress="focusOnEnter(event, 'download')" size="12" maxlength="10" onBlur="partitionDateOnBlur()"></td>
683          <td class="status" id="partitionDate.status"></td>
684          <td class="help"><span id="partitionDate.message" class="message" style="display: none;"></span>The date when the partition was done.</td>
685        </tr>
686        <tr>
687          <td class="prompt">Download label file</td>
688          <td class="input" name="downloadfile.input" id="downloadfile.input">
689            <base:button id="downloadlabels" title="Download..." onclick="downloadLabelFile()" image="download.gif" style="width:115px"/>
690          </td>
691          <td class="status" id="downloadfile.status"></td>
692          <td class="help"><span id="downloadfile.message" class="message" style="display:none;"></span>Download label file for the selected tubes.</td>
693        </tr>       
694        </table>
695      </td>
696    </tr>   
697    </table>
698  </div>
699 
700  <div id="weightSection" style="display:none;">
701    <p></p>
702    <table border="0" cellspacing="0" cellpadding="0" class="stepform">
703    <tr>
704      <td rowspan="2" class="stepno">3</td>
705      <td class="steptitle">Enter weight information</td>   
706    </tr>
707    <tr>
708      <td class="stepfields">
709        <table id="weightInputs" border="0" cellspacing="0" cellpadding="0" width="100%"></table>
710      </td>
711    </tr>
712    </table>
713  </div>
714   
715  <div class="error" id="errorMessage" style="display: none; width: 800px; margin-left: 20px; margin-bottom: 0px;"></div>
716 
717  <div id="done" class="success" style="display: none; width: 800px; margin-left: 20px; margin-top: 20px;"></div>
718 
719  <table style="margin-left: 20px; margin-top: 10px;" class="navigation">
720    <tr>
721      <td><base:button id="gocancel" title="Cancel" onclick="goRestart(false)" style="display: none;"/></td>
722      <td><base:button id="gonext" title="Next" image="gonext.gif" onclick="goNext(true)"/></td>
723      <td><base:button id="gocreate" title="Create" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td>
724      <td><base:button id="goupdate" title="Update" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td>
725      <td><base:button id="gorestart" title="Restart" image="goback.gif" onclick="goRestart(true)" style="display: none;"/></td>
726      <td id="gonext.message" class="message"></td>
727    </tr>
728  </table>
729  </form>
730 
731</base:body>
732</base:page>
733<%
734}
735finally
736{
737  if (dc != null) dc.close();
738}
739%>
Note: See TracBrowser for help on using the repository browser.