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

Last change on this file since 1449 was 1449, checked in by Martin Svensson, 12 years ago

References #330 Following changes are included in this commit.

  • Tubes in step3(weight input table) are now sorted by the tubes' box-positions.
  • Selection list in step1 is sorting the tubes by their BASE-id in descending order.
  • Samples that already have child-extracts are no longer included in the step1 selection list.
  • A csv-file with label-names can now be downloaded in step2.
  • Also fixed a bugg that occoured when default partition date contained month or date less then 10.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 21.3 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="HOMOGENOUS">Homogenous</option>';
199    appearanceOptions += '<option value="HETEROGENOUS">Heterogenous</option>';
200   
201    var necrosisOptions = '<option selected value="0">0</option>';
202    necrosisOptions += '<option value="20">20</option>';
203    necrosisOptions += '<option value="40">40</option>';
204    necrosisOptions += '<option value="60">60</option>';
205    necrosisOptions += '<option value="80">80</option>';
206    necrosisOptions += '<option value="100">100</option>';
207   
208    var fatOptions = '<option selected value=0>0</option>';
209    fatOptions += '<option value=20>20</option>';
210    fatOptions += '<option value=40>40</option>';
211    fatOptions += '<option value=60>60</option>';
212    fatOptions += '<option value=80>80</option>';
213    fatOptions += '<option value=100>100</option>';
214   
215    for (var i=0;i<selectedTubes.length; i++)
216    {
217      var tube = selectedTubes[i];
218      var nextStep = i<(selectedTubes.length-1) ? 'focusOnEnter(event, \'bloody'+(i+1)+'\')' : '';
219     
220      inputWeightHtml += '<tr>';
221      inputWeightHtml += '<td rowspan=2 class=prompt>'+tube.name;
222      // Only show box information if there is something show.     
223      if (tube.row != null && tube.column != null)
224      {
225        inputWeightHtml += ' ['+tube.box+'&nbsp;'+tube.row+tube.column+']';
226      }
227      inputWeightHtml += '</td>';
228     
229      inputWeightHtml += '<td style="width:400px;">';
230      inputWeightHtml += '<table style="width:100%"><tr>';     
231      inputWeightHtml += '<td>'+bloodyTitle+'<input type=checkbox onkeypress="checkOnNumber(event, this);focusOnEnter(event, \'appearance'+i+'\')" onfocus="messageOnFocus(0,'+i+')" name=bloody'+i+' /></td>';
232      inputWeightHtml += '<td>'+appearanceTitle+'<select name=appearance'+i+' onfocus="messageOnFocus(1,'+i+')" onkeypress="focusOnEnter(event, \'necrosis'+i+'\')">'+appearanceOptions+'</select></td>';
233      inputWeightHtml += '<td>'+necrosisTitle+'<select name=necrosis'+i+' onfocus="messageOnFocus(2,'+i+')" onkeypress="focusOnEnter(event, \'fat'+i+'\')">'+necrosisOptions+'</select></td>'; 
234      inputWeightHtml += '<td>'+fatTitle+'<select name=fat'+i+' onfocus="messageOnFocus(3,'+i+')" onkeypress="focusOnEnter(event, \'coloured'+i+'\')">'+fatOptions+'</select></td>';
235      inputWeightHtml += '<td>'+colouredTitle+'<input type=checkbox name=coloured'+i+' onfocus="messageOnFocus(4,'+i+')" onkeypress="checkOnNumber(event, this);focusOnEnter(event, \'nofPieces'+i+'\')" /></td>'
236      inputWeightHtml += '<td>'+nofTitle+'<input name="nofPieces'+i+'" onfocus="messageOnFocus(5,'+i+')" onblur="nofPiecesOnChange('+i+')" onkeypress="focusOnEnter(event, \'spWeight'+i+'\')" size=2 /></td>';
237      inputWeightHtml += '<td>'+spTitle+'<input name="spWeight'+i+'" onfocus="messageOnFocus(6,'+i+')" onblur="spWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'hisWeight'+i+'\')" size=2 /></td>';
238      inputWeightHtml += '<td>'+hisTitle+'<input name="hisWeight'+i+'" onfocus="messageOnFocus(7,'+i+')" onblur="hisWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'apWeight'+i+'\')" size=2 /></td>';
239      inputWeightHtml += '<td>'+apTitle+'<input name="apWeight'+i+'" onfocus="messageOnFocus(8,'+i+')" onblur="apWeightOnChange('+i+')" onkeypress="'+nextStep+'" size=2 /></td>';     
240      inputWeightHtml += '</tr>';
241      inputWeightHtml += '</table>';
242      inputWeightHtml += '</td>';
243      inputWeightHtml += '<td rowspan=2 class="status" id="'+i+'.status"></td>';     
244      inputWeightHtml += '</tr>';
245     
246      inputWeightHtml += '<tr>';
247      inputWeightHtml += '<td style="width:400px;" class="help"><span class="message" id="'+i+'.message"></span><span id="'+i+'.help"></span></td>';     
248      inputWeightHtml += '</tr>';     
249      inputWeightHtml += '<tr><td>&nbsp;</td></tr>';
250    }
251    setInnerHTML('weightInputs', inputWeightHtml);
252  }
253  Main.show('weightSection');
254  Main.hide('gonext');
255  Main.show('gocreate');
256  frm.bloody0.focus();
257}
258
259function checkOnNumber(event, element)
260{
261  if (event.charCode == 48)
262  {
263    element.checked = false;
264  }
265  else if (event.charCode == 49)
266  {
267    element.checked = true;
268  }
269  return true;
270}
271
272function messageOnFocus(order, tubeIndex)
273{
274  var helpMessage;
275  switch(order)
276  {
277    case 0:
278      helpMessage = 'Check this if the partition is bloody. Unchecked is default.';
279      break;
280    case 1:
281      helpMessage = 'Select appearance. Empty is default';
282      break;
283    case 2:
284      helpMessage = 'Select percentage of necrosis. \'0\' is default.';
285      break;
286    case 3:
287      helpMessage = 'Select percentage of fat. \'0\' is default.';
288      break;
289    case 4:
290      helpMessage = 'Check this if the partition is coloured. Unchecked is default.';
291      break;
292    case 5:
293      helpMessage = 'Number of pieces in this partition.';
294      break;
295    case 6:
296      helpMessage = 'Sp weight in [mg].';
297      break;
298    case 7:
299      helpMessage = 'His weight in [mg].';
300      break;
301    case 8:
302      helpMessage = 'Ap weight in [mg].';
303      break;
304    default:
305      helpMessage='&nbsp;';
306  }
307  for (var i=0;i<selectedTubes.length;i++)
308  {
309    if (i!=tubeIndex) setInnerHTML(i+'.help', '&nbsp;')
310  }
311  setInnerHTML(tubeIndex+'.help', helpMessage); 
312}
313
314function updateInputStatus(tubeIndex)
315{
316  var frm = document.forms['reggie'];
317  if(nofPiecesAreValid[tubeIndex] == false)
318  {
319    setInputStatus(tubeIndex, 'NofPieces is invalid.', 'invalid');
320    frm.elements['nofPieces'+tubeIndex].focus();
321    return ;
322  }
323  if (spWeightsAreValid[tubeIndex] == false)
324  {
325    setInputStatus(tubeIndex, 'SpWeight is invalid.','invalid');
326    return;
327  }
328  if(hisWeightsAreValid[tubeIndex] == false)
329  {
330    setInputStatus(tubeIndex, 'HisWeight is invalid.', 'invalid');
331    return;
332  }
333  if(apWeightsAreValid[tubeIndex] == false)
334  {
335    setInputStatus(tubeIndex, 'APWeight is invalid.', 'invalid');
336    return;
337  }
338 
339  var spWeightValue = frm.elements['spWeight'+tubeIndex].value;
340  var apWeightValue = frm.elements['apWeight'+tubeIndex].value;
341  var hisWeightValue = frm.elements['hisWeight'+tubeIndex].value; 
342  if (spWeightValue == '' && apWeightValue == '' && hisWeightValue == '')
343  {
344    oneOrMoreWeightsAreSet[tubeIndex] = false;
345    setInputStatus(tubeIndex, 'No weight is defined.', 'invalid');
346    return;
347  }
348  oneOrMoreWeightsAreSet[tubeIndex] = true; 
349  setInputStatus(tubeIndex, '', 'valid');
350}
351
352function spWeightOnChange(tubeIndex)
353{
354  var inputName = 'spWeight'+tubeIndex;
355  var frm = document.forms['reggie'];
356  var weightInput = frm.elements[inputName].value;
357  if (weightInput != '')
358  {
359    if (weightInput < 0)
360    {
361      spWeightsAreValid[tubeIndex] = false;
362      updateInputStatus(tubeIndex);
363      return;
364    }
365    if (weightInput == '0')
366    {
367      frm.elements[inputName].value = '';
368    }
369  } 
370  spWeightsAreValid[tubeIndex] = true;
371  updateInputStatus(tubeIndex);
372}
373
374function apWeightOnChange(tubeIndex)
375{
376  var inputName = 'apWeight'+tubeIndex;
377  var frm = document.forms['reggie'];
378  var weightInput = frm.elements[inputName].value;
379  if (weightInput != '')
380  {
381    if (weightInput < 0)
382    {
383      apWeightsAreValid[tubeIndex] = false;
384      updateInputStatus(tubeIndex);
385      return;
386    } 
387    if (weightInput == '0')
388    {
389      frm.elements[inputName].value = '';
390    } 
391  }
392  apWeightsAreValid[tubeIndex] = true;
393  updateInputStatus(tubeIndex);
394}
395
396function hisWeightOnChange(tubeIndex)
397{
398  var inputName = 'hisWeight'+tubeIndex;
399  var frm = document.forms['reggie'];
400  var weightInput = frm.elements[inputName].value;
401  if (weightInput != '')
402  {
403    if (weightInput < 0)
404    {
405      hisWeightsAreValid[tubeIndex] = false;
406      updateInputStatus(tubeIndex);
407      return;
408    }
409    if (weightInput == '0')
410    {
411      frm.elements[inputName].value = '';
412    }   
413  } 
414  hisWeightsAreValid[tubeIndex] = true;
415  updateInputStatus(tubeIndex);
416}
417
418function nofPiecesOnChange(tubeIndex)
419{
420  var inputName = 'nofPieces'+tubeIndex;
421  var frm = document.forms['reggie'];
422  var fieldInput = frm.elements[inputName].value;
423  if (fieldInput != '')
424  {
425    if (fieldInput < 0)
426    {
427      nofPiecesAreValid[tubeIndex] = false;
428      updateInputStatus(tubeIndex);
429      return;
430    } 
431    if (fieldInput == '0')
432    {
433      fieldInput = '';     
434      frm.elements[inputName].value = fieldInput;
435    }
436  } 
437  if (fieldInput == '')
438  {
439    nofPiecesAreValid[tubeIndex] = false;
440    updateInputStatus(tubeIndex);
441    return;
442  }
443  nofPiecesAreValid[tubeIndex] = true;
444  updateInputStatus(tubeIndex);
445}
446
447function partitionDateOnBlur()
448{
449  var frm = document.forms['reggie'];
450  var partitionDate = frm.partitionDate.value;
451  var todaysDate = new Date();
452  partitionDateIsValid = false;
453 
454  setInputStatus('partitionDate', '', '');
455 
456  if (partitionDate != '')
457  {
458    partitionDate = autoFillDate(partitionDate);
459    frm.partitionDate.value = partitionDate;
460   
461    if (!Dates.isDate(partitionDate, 'yyyyMMdd'))
462    {
463      setInputStatus('partitionDate', 'Not a valid date', 'invalid');
464      return;
465    }   
466    if (todaysDate < new Date(partitionDate.substring(0,4), new Number(partitionDate.substring(4,6)-1), partitionDate.substring(6)))
467    {
468      setInputStatus('partitionDate', 'Future dates are not valid','invalid');
469      return;
470    }
471    setInputStatus('partitionDate','','valid');   
472  }
473  else
474  {
475    setInputStatus('partitionDate', 'Missing', 'invalid');
476    return;
477  }
478  partitionDateIsValid = true;
479}
480
481function getSpecimenTubes()
482{
483  var frm = document.forms['reggie']; 
484 
485  var request = Ajax.getXmlHttpRequest();
486  var url = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=GetSpecimenTubes';   
487  request.open("GET", url, false); 
488  request.send(null);
489
490  if (debug) Main.debug(request.responseText); 
491  var response = JSON.parse(request.responseText); 
492  if (response.status != 'ok')
493  {
494    setFatalError(response.message);
495    return false;
496  } 
497  specimenTubes = response.tubeInfo.specimenTubes;
498}
499
500function goCreate()
501{
502  if (!step3IsValid()) return;
503 
504  Main.hide('gocancel');
505  Main.hide('gocreate');
506 
507  var frm = document.forms['reggie'];
508  var tubeInfo = new Object();
509 
510  var specimens = selectedTubes;
511  var nofTubes = specimens.length;
512  var partitionDateValue = frm.elements['partitionDate'].value;
513  tubeInfo.partitionDate = partitionDateValue;
514  for (var i=0; i<nofTubes; i++)
515  {
516    frm.elements['spWeight'+i].disabled = true;
517    frm.elements['apWeight'+i].disabled = true;
518    frm.elements['hisWeight'+i].disabled = true;
519    frm.elements['nofPieces'+i].disabled = true;
520    frm.elements['bloody'+i].disabled = true;
521    frm.elements['appearance'+i].disabled = true;
522    frm.elements['necrosis'+i].disabled = true;
523    frm.elements['fat'+i].disabled = true;
524    frm.elements['coloured'+i].disabled = true;
525       
526    var specimenTube = specimens[i];
527   
528    var spWeightValue = frm.elements['spWeight'+i].value; 
529    if (spWeightValue != '') specimenTube.spWeight = spWeightValue;
530    var apWeightValue = frm.elements['apWeight'+i].value;
531    if (apWeightValue != '') specimenTube.apWeight = apWeightValue;
532    var hisWeightValue = frm.elements['hisWeight'+i].value;
533    if (hisWeightValue != '') specimenTube.hisWeight = hisWeightValue;
534    var nofPiecesValue = frm.elements['nofPieces'+i].value;
535    if (nofPiecesValue != '') specimenTube.nofPieces = nofPiecesValue;
536   
537    var partitionComment = ''; 
538    var appearanceElement = frm.elements['appearance'+i];
539    var necrosisElement = frm.elements['necrosis'+i];
540    var fatElement = frm.elements['fat'+i];
541    var appearanceValue = appearanceElement.options[appearanceElement.selectedIndex].value;   
542    var necrosisValue = necrosisElement.options[necrosisElement.selectedIndex].value;
543    var fatValue = fatElement.options[fatElement.selectedIndex].value;
544   
545    // Generate partition comment string
546    if (frm.elements['bloody'+i].checked == true) partitionComment += 'BLOODY';
547    if (appearanceValue != '') partitionComment += (partitionComment.length>0 ? ';' : '') + appearanceValue;
548    if (necrosisValue != '0') partitionComment += (partitionComment.length>0 ? ';' : '') + 'NECROSIS'+necrosisValue+'%';
549    if (fatValue != '0') partitionComment += (partitionComment.length>0 ? ';' : '') + 'FAT'+fatValue+'%';
550    if (frm.elements['coloured'+i].checked == true) partitionComment += partitionComment.length>0 ? ';COLOURED' : 'COLOURED';
551   
552    specimenTube.operatorPartitionComment = partitionComment.length > 0 ? partitionComment : null;
553   
554    specimens[i] = specimenTube;   
555  }
556  tubeInfo.specimens = specimens;
557  var submitInfo = new Object();
558  submitInfo.tubeInfo = tubeInfo;
559 
560  if (debug) Main.debug(JSON.stringify(caseInfo));     
561  var request = Ajax.getXmlHttpRequest();
562  var url = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=CreatePartitions';
563  request.open("POST", url, false);
564  request.setRequestHeader("Content-Type", "application/json");
565  request.send(JSON.stringify(submitInfo));
566
567  if (debug) Main.debug(request.responseText);
568
569  var response = JSON.parse(request.responseText);
570  if (response.status != 'ok')
571  {
572    setFatalError(response.message);
573    return false;
574  }
575
576  var msg = '<ul>';
577  for (var i = 0; i < response.messages.length; i++)
578  {
579    msg += '<li>' + response.messages[i];
580  }
581  msg += '</ul>';
582  setInnerHTML('done', msg);
583 
584 
585  Main.show('done');
586  Main.show('gorestart');
587}
588
589function downloadLabelFile()
590{
591  var downloadFileInput = 'PartitionRegistration.servlet?ID=<%=ID%>&cmd=GetLabelFile';
592  downloadFileInput += '&tubes=';
593  var separator = '';
594  for (i in selectedTubes)
595  {
596    downloadFileInput += separator + selectedTubes[i].name;
597    separator = ',';
598  }
599  window.location = downloadFileInput;
600}
601</script>
602
603
604</base:head>
605<base:body onload="init()">
606<p:path style="margin-top: 20px; margin-bottom: 10px;">
607    <p:pathelement title="Reggie" href="<%="index.jsp?ID="+ID%>" />
608    <p:pathelement title="Partition registration" />
609  </p:path>
610
611  <%
612  if (sc.getActiveProjectId() == 0)
613  {
614    %>
615    <base:note type="warning" style="width: 800px; margin-left: 20px; margin-bottom: 20px; margin-right: 0px; font-weight: bold; color: #cc0000;">
616      No project has been selected. You may proceed with the registration but
617      created items will not be shared.
618    </base:note>
619    <%
620  }
621  %>
622
623  <form name="reggie" onsubmit="return false;">
624 
625  <!-- 1. Case name-->
626  <table border="0" cellspacing="0" cellpadding="0" class="stepform">
627  <tr>
628    <td rowspan="3" class="stepno">1</td>
629    <td class="steptitle">Select specimen tubes</td>
630  </tr>
631  <tr>
632    <td class="stepfields">
633      <table border="0" cellspacing="0" cellpadding="0" width="100%">
634      <tr valign="top">
635        <td class="prompt">Specimen tubes</td>
636        <td class="input"><select style="width:50%" name="tubeSelect" id="tubesSelect" multiple="multiple" size="12" onkeypress='doOnTab(event, goNext)'></select></td>
637        <td class="status" id="tubes.status"></td>
638        <td class="help"><span id="tubes.message" class="message" style="display: none;"></span>Select specimen tubes to include in the partition.</td>
639      </tr>
640      </table>
641    </td>
642  </tr>
643  </table>
644 
645  <!-- 2. General partition information -->
646  <div id="partitionSection" style="display: none;">
647    <p></p>
648    <table border="0" cellspacing="0" cellpadding="0" class="stepform">
649    <tr>
650      <td rowspan="2" class="stepno">2</td>
651      <td class="steptitle">General partition information</td>
652    </tr>
653    <tr>
654      <td class="stepfields">
655        <table border="0" cellspacing="0" cellpadding="0" width="100%">
656        <tr valign="top">
657          <td class="prompt">Partition date</td>
658          <td class="input"><input type="text" name="partitionDate" 
659             onkeypress="focusOnEnter(event, 'download')" size="12" maxlength="10" onBlur="partitionDateOnBlur()"></td>
660          <td class="status" id="partitionDate.status"></td>
661          <td class="help"><span id="partitionDate.message" class="message" style="display: none;"></span>The date when the partition was done.</td>
662        </tr>
663        <tr>
664          <td class="prompt">Download label file</td>
665          <td class="input" name="downloadfile.input" id="downloadfile.input">
666            <base:button id="downloadlabels" title="Download..." onclick="downloadLabelFile()" image="download.gif" style="width:115px"/>
667          </td>
668          <td class="status" id="downloadfile.status"></td>
669          <td class="help"><span id="downloadfile.message" class="message" style="display:none;"></span>Download label file for the selected tubes.</td>
670        </tr>       
671        </table>
672      </td>
673    </tr>   
674    </table>
675  </div>
676 
677  <div id="weightSection" style="display:none;">
678    <p></p>
679    <table border="0" cellspacing="0" cellpadding="0" class="stepform">
680    <tr>
681      <td rowspan="2" class="stepno">3</td>
682      <td class="steptitle">Enter weight information</td>   
683    </tr>
684    <tr>
685      <td class="stepfields">
686        <table id="weightInputs" border="0" cellspacing="0" cellpadding="0" width="100%"></table>
687      </td>
688    </tr>
689    </table>
690  </div>
691   
692  <div class="error" id="errorMessage" style="display: none; width: 800px; margin-left: 20px; margin-bottom: 0px;"></div>
693 
694  <div id="done" class="success" style="display: none; width: 800px; margin-left: 20px; margin-top: 20px;"></div>
695 
696  <table style="margin-left: 20px; margin-top: 10px;" class="navigation">
697    <tr>
698      <td><base:button id="gocancel" title="Cancel" onclick="goRestart(false)" style="display: none;"/></td>
699      <td><base:button id="gonext" title="Next" image="gonext.gif" onclick="goNext(true)"/></td>
700      <td><base:button id="gocreate" title="Create" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td>
701      <td><base:button id="goupdate" title="Update" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td>
702      <td><base:button id="gorestart" title="Restart" image="goback.gif" onclick="goRestart(true)" style="display: none;"/></td>
703      <td id="gonext.message" class="message"></td>
704    </tr>
705  </table>
706  </form>
707 
708</base:body>
709</base:page>
710<%
711}
712finally
713{
714  if (dc != null) dc.close();
715}
716%>
Note: See TracBrowser for help on using the repository browser.