4550 |
30 Jun 17 |
nicklas |
var StorageBox = function() |
4550 |
30 Jun 17 |
nicklas |
2 |
{ |
4550 |
30 Jun 17 |
nicklas |
var box = {}; |
4550 |
30 Jun 17 |
nicklas |
var debug = 0; |
4550 |
30 Jun 17 |
nicklas |
5 |
|
5340 |
29 Mar 19 |
nicklas |
var nofBoxesIsValid = []; |
5340 |
29 Mar 19 |
nicklas |
7 |
|
5340 |
29 Mar 19 |
nicklas |
var lastSpBox; |
5340 |
29 Mar 19 |
nicklas |
var lastPSpBox; |
7138 |
26 Apr 23 |
nicklas |
var lastESpBox; |
4550 |
30 Jun 17 |
nicklas |
var newBoxes; |
4550 |
30 Jun 17 |
nicklas |
12 |
|
4550 |
30 Jun 17 |
nicklas |
// Page initialization |
4550 |
30 Jun 17 |
nicklas |
box.initPage = function() |
4550 |
30 Jun 17 |
nicklas |
15 |
{ |
4550 |
30 Jun 17 |
nicklas |
// Step 1 |
4550 |
30 Jun 17 |
nicklas |
Events.addEventHandler('step-1', 'wizard-validate', box.validateStep1); |
5340 |
29 Mar 19 |
nicklas |
Events.addEventHandler('numberOfSpBoxes', 'keypress', Events.integerOnly); |
5340 |
29 Mar 19 |
nicklas |
Events.addEventHandler('numberOfSpBoxes', 'blur', box.nofBoxesOnChange); |
5340 |
29 Mar 19 |
nicklas |
Events.addEventHandler('numberOfPSpBoxes', 'keypress', Events.integerOnly); |
5340 |
29 Mar 19 |
nicklas |
Events.addEventHandler('numberOfPSpBoxes', 'blur', box.nofBoxesOnChange); |
7138 |
26 Apr 23 |
nicklas |
Events.addEventHandler('numberOfESpBoxes', 'keypress', Events.integerOnly); |
7138 |
26 Apr 23 |
nicklas |
Events.addEventHandler('numberOfESpBoxes', 'blur', box.nofBoxesOnChange); |
4550 |
30 Jun 17 |
nicklas |
24 |
|
4550 |
30 Jun 17 |
nicklas |
// Step 2 |
4550 |
30 Jun 17 |
nicklas |
Events.addEventHandler('step-2', 'wizard-initialize', box.initializeStep2); |
4550 |
30 Jun 17 |
nicklas |
27 |
|
4550 |
30 Jun 17 |
nicklas |
// Navigation |
4550 |
30 Jun 17 |
nicklas |
Buttons.addClickHandler('gocancel', Wizard.cancelWizard); |
4550 |
30 Jun 17 |
nicklas |
Buttons.addClickHandler('gorestart', Wizard.restartWizard); |
4550 |
30 Jun 17 |
nicklas |
Buttons.addClickHandler('gonext', Wizard.goNextOnClick); |
4550 |
30 Jun 17 |
nicklas |
Buttons.addClickHandler('goregister', Wizard.goRegister); |
5308 |
15 Feb 19 |
nicklas |
Buttons.addClickHandler('downloadLabelsCsv', box.downloadLabels); |
5308 |
15 Feb 19 |
nicklas |
Buttons.addClickHandler('downloadLabelsXlsx', box.downloadLabels); |
4550 |
30 Jun 17 |
nicklas |
35 |
|
4550 |
30 Jun 17 |
nicklas |
// Final registration |
4550 |
30 Jun 17 |
nicklas |
Events.addEventHandler('wizard', 'wizard-submit', box.submit); |
4550 |
30 Jun 17 |
nicklas |
38 |
|
7188 |
22 May 23 |
nicklas |
Reggie.loadHardware('FREEZER', 'freezer'); |
7188 |
22 May 23 |
nicklas |
40 |
|
4550 |
30 Jun 17 |
nicklas |
// Load last storage box |
4550 |
30 Jun 17 |
nicklas |
var url = '../SpecimenTubeRegistration.servlet?ID='+App.getSessionId(); |
5340 |
29 Mar 19 |
nicklas |
url += '&cmd=GetLastExistingStorageBoxes' |
5340 |
29 Mar 19 |
nicklas |
Wizard.showLoadingAnimation('Loading existing storage boxes...'); |
4550 |
30 Jun 17 |
nicklas |
Wizard.asyncJsonRequest(url, box.lastBoxLoaded); |
4550 |
30 Jun 17 |
nicklas |
46 |
} |
4550 |
30 Jun 17 |
nicklas |
47 |
|
4550 |
30 Jun 17 |
nicklas |
box.lastBoxLoaded = function(response) |
4550 |
30 Jun 17 |
nicklas |
49 |
{ |
5340 |
29 Mar 19 |
nicklas |
var frm = document.forms['reggie']; |
5340 |
29 Mar 19 |
nicklas |
lastSpBox = response.lastSpBox; |
5340 |
29 Mar 19 |
nicklas |
lastPSpBox = response.lastPSpBox; |
7138 |
26 Apr 23 |
nicklas |
lastESpBox = response.lastESpBox; |
5340 |
29 Mar 19 |
nicklas |
54 |
|
4550 |
30 Jun 17 |
nicklas |
var counts = response.counts; |
5340 |
29 Mar 19 |
nicklas |
var emptySpBoxes = counts['empty-storage-boxes']; |
5340 |
29 Mar 19 |
nicklas |
var emptyPSpBoxes = counts['empty-paused-storage-boxes']; |
7138 |
26 Apr 23 |
nicklas |
var emptyESpBoxes = counts['empty-external-storage-boxes']; |
4550 |
30 Jun 17 |
nicklas |
59 |
|
7138 |
26 Apr 23 |
nicklas |
var focus = null; |
5340 |
29 Mar 19 |
nicklas |
if (lastSpBox) |
4550 |
30 Jun 17 |
nicklas |
62 |
{ |
5340 |
29 Mar 19 |
nicklas |
Doc.element('lastSpBox').innerHTML = Strings.encodeTags(lastSpBox.name) + ' (' + lastSpBox.freeWells + ' free wells)'; |
4550 |
30 Jun 17 |
nicklas |
64 |
} |
5340 |
29 Mar 19 |
nicklas |
if (emptySpBoxes != null) |
5340 |
29 Mar 19 |
nicklas |
66 |
{ |
5340 |
29 Mar 19 |
nicklas |
Doc.element('emptySpBoxes').innerHTML = emptySpBoxes; |
7138 |
26 Apr 23 |
nicklas |
if (emptySpBoxes < 2) |
7138 |
26 Apr 23 |
nicklas |
69 |
{ |
7138 |
26 Apr 23 |
nicklas |
frm.numberOfSpBoxes.value = '8'; |
7138 |
26 Apr 23 |
nicklas |
if (focus == null) focus = frm.numberOfSpBoxes; |
7138 |
26 Apr 23 |
nicklas |
72 |
} |
5340 |
29 Mar 19 |
nicklas |
73 |
} |
4550 |
30 Jun 17 |
nicklas |
74 |
|
5340 |
29 Mar 19 |
nicklas |
if (lastPSpBox) |
5340 |
29 Mar 19 |
nicklas |
76 |
{ |
5340 |
29 Mar 19 |
nicklas |
Doc.element('lastPSpBox').innerHTML = Strings.encodeTags(lastPSpBox.name) + ' (' + lastPSpBox.freeWells + ' free wells)'; |
5340 |
29 Mar 19 |
nicklas |
78 |
} |
5340 |
29 Mar 19 |
nicklas |
if (emptyPSpBoxes != null) |
5340 |
29 Mar 19 |
nicklas |
80 |
{ |
5340 |
29 Mar 19 |
nicklas |
Doc.element('emptyPSpBoxes').innerHTML = emptyPSpBoxes; |
7138 |
26 Apr 23 |
nicklas |
if (emptyPSpBoxes < 2) |
7138 |
26 Apr 23 |
nicklas |
83 |
{ |
7138 |
26 Apr 23 |
nicklas |
frm.numberOfPSpBoxes.value = '8'; |
7138 |
26 Apr 23 |
nicklas |
if (focus == null) focus = frm.numberOfPSpBoxes; |
7138 |
26 Apr 23 |
nicklas |
86 |
} |
5340 |
29 Mar 19 |
nicklas |
87 |
} |
5340 |
29 Mar 19 |
nicklas |
88 |
|
7138 |
26 Apr 23 |
nicklas |
if (lastESpBox) |
7138 |
26 Apr 23 |
nicklas |
90 |
{ |
7138 |
26 Apr 23 |
nicklas |
Doc.element('lastESpBox').innerHTML = Strings.encodeTags(lastESpBox.name) + ' (' + lastESpBox.freeWells + ' free wells)'; |
7188 |
22 May 23 |
nicklas |
if (lastESpBox.freezer) Forms.selectListOption('freezer', lastESpBox.freezer); |
7138 |
26 Apr 23 |
nicklas |
93 |
} |
7138 |
26 Apr 23 |
nicklas |
if (emptyESpBoxes != null) |
7138 |
26 Apr 23 |
nicklas |
95 |
{ |
7138 |
26 Apr 23 |
nicklas |
Doc.element('emptyESpBoxes').innerHTML = emptyESpBoxes; |
7138 |
26 Apr 23 |
nicklas |
if (emptyESpBoxes < 2) |
7138 |
26 Apr 23 |
nicklas |
98 |
{ |
7138 |
26 Apr 23 |
nicklas |
frm.numberOfESpBoxes.value = '8'; |
7138 |
26 Apr 23 |
nicklas |
if (focus == null) focus = frm.numberOfESpBoxes; |
7138 |
26 Apr 23 |
nicklas |
101 |
} |
7138 |
26 Apr 23 |
nicklas |
102 |
} |
7138 |
26 Apr 23 |
nicklas |
103 |
|
5340 |
29 Mar 19 |
nicklas |
nofBoxesIsValid['numberOfSpBoxes'] = true; |
5340 |
29 Mar 19 |
nicklas |
nofBoxesIsValid['numberOfPSpBoxes'] = true; |
7138 |
26 Apr 23 |
nicklas |
nofBoxesIsValid['numberOfESpBoxes'] = true; |
5340 |
29 Mar 19 |
nicklas |
107 |
|
4550 |
30 Jun 17 |
nicklas |
Doc.show('step-1'); |
4550 |
30 Jun 17 |
nicklas |
Doc.show('gonext'); |
7138 |
26 Apr 23 |
nicklas |
if (focus != null) focus.focus(); |
4550 |
30 Jun 17 |
nicklas |
111 |
} |
4550 |
30 Jun 17 |
nicklas |
112 |
|
4550 |
30 Jun 17 |
nicklas |
box.validateStep1 = function(event) |
4550 |
30 Jun 17 |
nicklas |
114 |
{ |
4550 |
30 Jun 17 |
nicklas |
var frm = document.forms['reggie']; |
5340 |
29 Mar 19 |
nicklas |
if (!nofBoxesIsValid['numberOfSpBoxes']) event.preventDefault(); |
5340 |
29 Mar 19 |
nicklas |
if (!nofBoxesIsValid['numberOfPSpBoxes']) event.preventDefault(); |
7138 |
26 Apr 23 |
nicklas |
if (!nofBoxesIsValid['numberOfESpBoxes']) event.preventDefault(); |
5340 |
29 Mar 19 |
nicklas |
119 |
|
5340 |
29 Mar 19 |
nicklas |
var nofSpBoxes = parseInt(frm.numberOfSpBoxes.value); |
5340 |
29 Mar 19 |
nicklas |
var nofPSpBoxes = parseInt(frm.numberOfPSpBoxes.value); |
7138 |
26 Apr 23 |
nicklas |
var nofESpBoxes = parseInt(frm.numberOfESpBoxes.value); |
7138 |
26 Apr 23 |
nicklas |
if (nofSpBoxes == 0 && nofPSpBoxes == 0 && nofESpBoxes == 0) |
5340 |
29 Mar 19 |
nicklas |
124 |
{ |
5340 |
29 Mar 19 |
nicklas |
Wizard.showGoNextConfirmation(false, 'No new boxes to create!'); |
5340 |
29 Mar 19 |
nicklas |
event.preventDefault(); |
5340 |
29 Mar 19 |
nicklas |
127 |
} |
4550 |
30 Jun 17 |
nicklas |
128 |
} |
4550 |
30 Jun 17 |
nicklas |
129 |
|
5340 |
29 Mar 19 |
nicklas |
box.nofBoxesOnChange = function(event) |
4550 |
30 Jun 17 |
nicklas |
131 |
{ |
5340 |
29 Mar 19 |
nicklas |
var target = event.currentTarget; |
5340 |
29 Mar 19 |
nicklas |
133 |
|
5340 |
29 Mar 19 |
nicklas |
nofBoxesIsValid[target.id] = false; |
5340 |
29 Mar 19 |
nicklas |
Wizard.hideGoNextConfirmation(); |
5340 |
29 Mar 19 |
nicklas |
136 |
|
5340 |
29 Mar 19 |
nicklas |
var errmsg = box.checkNofBoxes(target.value); |
5340 |
29 Mar 19 |
nicklas |
if (errmsg) |
4550 |
30 Jun 17 |
nicklas |
139 |
{ |
5340 |
29 Mar 19 |
nicklas |
Wizard.setInputStatus(target.id, 'invalid', errmsg); |
4550 |
30 Jun 17 |
nicklas |
return; |
4550 |
30 Jun 17 |
nicklas |
142 |
} |
5340 |
29 Mar 19 |
nicklas |
Wizard.setInputStatus(target.id, 'valid'); |
5340 |
29 Mar 19 |
nicklas |
nofBoxesIsValid[target.id] = true; |
4550 |
30 Jun 17 |
nicklas |
145 |
} |
4550 |
30 Jun 17 |
nicklas |
146 |
|
5340 |
29 Mar 19 |
nicklas |
box.checkNofBoxes = function(nofBoxes) |
5340 |
29 Mar 19 |
nicklas |
148 |
{ |
5340 |
29 Mar 19 |
nicklas |
if (nofBoxes == '') return 'Missing'; |
5340 |
29 Mar 19 |
nicklas |
if (parseInt(nofBoxes) < 0) return 'Must not be less than 0'; |
5340 |
29 Mar 19 |
nicklas |
if (parseInt(nofBoxes) > 99) return 'Must not be greater than 99'; |
5340 |
29 Mar 19 |
nicklas |
return null; |
5340 |
29 Mar 19 |
nicklas |
153 |
} |
5340 |
29 Mar 19 |
nicklas |
154 |
|
4550 |
30 Jun 17 |
nicklas |
box.initializeStep2 = function() |
4550 |
30 Jun 17 |
nicklas |
156 |
{ |
4550 |
30 Jun 17 |
nicklas |
var frm = document.forms['reggie']; |
5340 |
29 Mar 19 |
nicklas |
var nofSpBoxes = parseInt(frm.numberOfSpBoxes.value); |
5340 |
29 Mar 19 |
nicklas |
var nofPSpBoxes = parseInt(frm.numberOfPSpBoxes.value); |
7138 |
26 Apr 23 |
nicklas |
var nofESpBoxes = parseInt(frm.numberOfESpBoxes.value); |
4550 |
30 Jun 17 |
nicklas |
161 |
|
7138 |
26 Apr 23 |
nicklas |
if (nofSpBoxes == 0 && nofPSpBoxes == 0 && nofESpBoxes == 0) |
5340 |
29 Mar 19 |
nicklas |
163 |
{ |
5340 |
29 Mar 19 |
nicklas |
Wizard.setFatalError('No new boxes to create!'); |
5340 |
29 Mar 19 |
nicklas |
return; |
5340 |
29 Mar 19 |
nicklas |
166 |
} |
4550 |
30 Jun 17 |
nicklas |
167 |
|
7138 |
26 Apr 23 |
nicklas |
var endNo = Math.max(nofSpBoxes+nofESpBoxes, nofPSpBoxes); |
7138 |
26 Apr 23 |
nicklas |
var baseSpNo = 1+(lastSpBox ? parseInt(lastSpBox.name.substring(2)) : 0); |
7138 |
26 Apr 23 |
nicklas |
var basePSpNo = 1+(lastPSpBox ? parseInt(lastPSpBox.name.substring(3)) : 0); |
7138 |
26 Apr 23 |
nicklas |
var baseESpNo = 1+(lastESpBox ? parseInt(lastESpBox.name.substring(4)) : 0); |
5340 |
29 Mar 19 |
nicklas |
172 |
|
4550 |
30 Jun 17 |
nicklas |
var html = ''; |
7138 |
26 Apr 23 |
nicklas |
var SpBoxPrefixes = ['Sp', 'PSp', 'Lys', 'RNA', 'DNA', 'FT']; |
7138 |
26 Apr 23 |
nicklas |
var ESpBoxPrefixes = ['E-Sp', 'PSp', 'E-Lys', 'E-RNA', 'E-DNA', 'E-FT']; |
5340 |
29 Mar 19 |
nicklas |
176 |
|
4550 |
30 Jun 17 |
nicklas |
newBoxes = []; |
7138 |
26 Apr 23 |
nicklas |
var createdSpBoxes = 0; |
7138 |
26 Apr 23 |
nicklas |
var createdPSpBoxes = 0; |
7138 |
26 Apr 23 |
nicklas |
var createdESpBoxes = 0; |
7138 |
26 Apr 23 |
nicklas |
var maxPrefix = SpBoxPrefixes.length-1; |
5340 |
29 Mar 19 |
nicklas |
for (var index = 1; index <= endNo; index++) |
7138 |
26 Apr 23 |
nicklas |
183 |
{ |
4550 |
30 Jun 17 |
nicklas |
html += '<tr>'; |
7138 |
26 Apr 23 |
nicklas |
for (var prefixNo = 0; prefixNo < SpBoxPrefixes.length; prefixNo++) |
4550 |
30 Jun 17 |
nicklas |
186 |
{ |
7138 |
26 Apr 23 |
nicklas |
var boxName = null; |
7138 |
26 Apr 23 |
nicklas |
if (prefixNo == 1) |
5340 |
29 Mar 19 |
nicklas |
189 |
{ |
7138 |
26 Apr 23 |
nicklas |
if (createdPSpBoxes < nofPSpBoxes) |
7138 |
26 Apr 23 |
nicklas |
191 |
{ |
7138 |
26 Apr 23 |
nicklas |
boxName = SpBoxPrefixes[prefixNo]+box.zeroPad(createdPSpBoxes+basePSpNo); |
7138 |
26 Apr 23 |
nicklas |
createdPSpBoxes++; |
7138 |
26 Apr 23 |
nicklas |
194 |
} |
7138 |
26 Apr 23 |
nicklas |
195 |
} |
7138 |
26 Apr 23 |
nicklas |
else |
7138 |
26 Apr 23 |
nicklas |
197 |
{ |
7138 |
26 Apr 23 |
nicklas |
if (createdSpBoxes < nofSpBoxes) |
7138 |
26 Apr 23 |
nicklas |
199 |
{ |
7138 |
26 Apr 23 |
nicklas |
boxName = SpBoxPrefixes[prefixNo]+box.zeroPad(createdSpBoxes+baseSpNo); |
7138 |
26 Apr 23 |
nicklas |
if (prefixNo == maxPrefix) createdSpBoxes++; |
7138 |
26 Apr 23 |
nicklas |
202 |
} |
7138 |
26 Apr 23 |
nicklas |
else if (createdESpBoxes < nofESpBoxes) |
7138 |
26 Apr 23 |
nicklas |
204 |
{ |
7138 |
26 Apr 23 |
nicklas |
boxName = ESpBoxPrefixes[prefixNo]+box.zeroPad(createdESpBoxes+baseESpNo); |
7138 |
26 Apr 23 |
nicklas |
if (prefixNo == maxPrefix) createdESpBoxes++; |
7138 |
26 Apr 23 |
nicklas |
207 |
} |
7138 |
26 Apr 23 |
nicklas |
208 |
} |
7138 |
26 Apr 23 |
nicklas |
if (boxName != null) |
7138 |
26 Apr 23 |
nicklas |
210 |
{ |
5340 |
29 Mar 19 |
nicklas |
newBoxes[newBoxes.length] = boxName; |
5340 |
29 Mar 19 |
nicklas |
html += '<td>'+boxName+'</td>'; |
5340 |
29 Mar 19 |
nicklas |
213 |
} |
5340 |
29 Mar 19 |
nicklas |
else |
5340 |
29 Mar 19 |
nicklas |
215 |
{ |
5340 |
29 Mar 19 |
nicklas |
html += '<td></td>'; |
7138 |
26 Apr 23 |
nicklas |
217 |
} |
4550 |
30 Jun 17 |
nicklas |
218 |
} |
4550 |
30 Jun 17 |
nicklas |
html += '</tr>'; |
4550 |
30 Jun 17 |
nicklas |
220 |
} |
4550 |
30 Jun 17 |
nicklas |
Doc.element('new-boxes').innerHTML = html; |
4550 |
30 Jun 17 |
nicklas |
222 |
|
4550 |
30 Jun 17 |
nicklas |
Wizard.setCurrentStep(2); |
4550 |
30 Jun 17 |
nicklas |
Doc.show('goregister'); |
4550 |
30 Jun 17 |
nicklas |
Doc.show('gocancel'); |
4550 |
30 Jun 17 |
nicklas |
Doc.show('godownload'); |
4550 |
30 Jun 17 |
nicklas |
Wizard.showGoNextConfirmation(true, 'I have downloaded the label file'); |
4550 |
30 Jun 17 |
nicklas |
228 |
} |
4550 |
30 Jun 17 |
nicklas |
229 |
|
5340 |
29 Mar 19 |
nicklas |
box.zeroPad = function(boxNo) |
5340 |
29 Mar 19 |
nicklas |
231 |
{ |
5340 |
29 Mar 19 |
nicklas |
var zeroPad = ''; |
5340 |
29 Mar 19 |
nicklas |
if (boxNo < 10) zeroPad = '00'; |
5340 |
29 Mar 19 |
nicklas |
else if (boxNo < 100) zeroPad = '0'; |
5340 |
29 Mar 19 |
nicklas |
return zeroPad+boxNo; |
5340 |
29 Mar 19 |
nicklas |
236 |
} |
5340 |
29 Mar 19 |
nicklas |
237 |
|
5308 |
15 Feb 19 |
nicklas |
box.downloadLabels = function(event) |
4550 |
30 Jun 17 |
nicklas |
239 |
{ |
5308 |
15 Feb 19 |
nicklas |
var format = Data.get(event.currentTarget, 'format'); |
4550 |
30 Jun 17 |
nicklas |
Wizard.hideGoNextConfirmation(); |
4550 |
30 Jun 17 |
nicklas |
var url = '../SpecimenTubeRegistration.servlet?ID='+App.getSessionId(); |
4550 |
30 Jun 17 |
nicklas |
url += '&cmd=GetStorageBoxLabels'; |
4550 |
30 Jun 17 |
nicklas |
url += '&boxes='+newBoxes.join(','); |
5308 |
15 Feb 19 |
nicklas |
url += '&format='+encodeURIComponent(format); |
4550 |
30 Jun 17 |
nicklas |
window.open(url); |
4550 |
30 Jun 17 |
nicklas |
247 |
} |
4550 |
30 Jun 17 |
nicklas |
248 |
|
4550 |
30 Jun 17 |
nicklas |
box.submit = function() |
4550 |
30 Jun 17 |
nicklas |
250 |
{ |
4550 |
30 Jun 17 |
nicklas |
var frm = document.forms['reggie']; |
4550 |
30 Jun 17 |
nicklas |
252 |
|
4550 |
30 Jun 17 |
nicklas |
var submitInfo = {}; |
5340 |
29 Mar 19 |
nicklas |
254 |
|
5340 |
29 Mar 19 |
nicklas |
if (lastSpBox) submitInfo.lastSpBox = lastSpBox.id; |
5340 |
29 Mar 19 |
nicklas |
submitInfo.nofSpBoxes = parseInt(frm.numberOfSpBoxes.value); |
4550 |
30 Jun 17 |
nicklas |
257 |
|
5340 |
29 Mar 19 |
nicklas |
if (lastPSpBox) submitInfo.lastPSpBox = lastPSpBox.id; |
5340 |
29 Mar 19 |
nicklas |
submitInfo.nofPSpBoxes = parseInt(frm.numberOfPSpBoxes.value); |
7138 |
26 Apr 23 |
nicklas |
260 |
|
7138 |
26 Apr 23 |
nicklas |
if (lastESpBox) submitInfo.lastESpBox = lastESpBox.id; |
7138 |
26 Apr 23 |
nicklas |
submitInfo.nofESpBoxes = parseInt(frm.numberOfESpBoxes.value); |
7188 |
22 May 23 |
nicklas |
submitInfo.freezer = parseInt(frm.freezer.value); |
5340 |
29 Mar 19 |
nicklas |
264 |
|
4550 |
30 Jun 17 |
nicklas |
var url = '../SpecimenTubeRegistration.servlet?ID='+App.getSessionId(); |
4550 |
30 Jun 17 |
nicklas |
url += '&cmd=CreateStorageBoxes'; |
4550 |
30 Jun 17 |
nicklas |
Wizard.showLoadingAnimation('Performing registration...'); |
4550 |
30 Jun 17 |
nicklas |
Wizard.asyncJsonRequest(url, box.submissionResults, 'POST', JSON.stringify(submitInfo)); |
4550 |
30 Jun 17 |
nicklas |
269 |
} |
4550 |
30 Jun 17 |
nicklas |
270 |
|
4550 |
30 Jun 17 |
nicklas |
box.submissionResults = function(response) |
4550 |
30 Jun 17 |
nicklas |
272 |
{ |
4550 |
30 Jun 17 |
nicklas |
Wizard.showFinalMessage(response.messages); |
4550 |
30 Jun 17 |
nicklas |
Doc.show('gorestart'); |
4550 |
30 Jun 17 |
nicklas |
275 |
} |
4550 |
30 Jun 17 |
nicklas |
276 |
|
4550 |
30 Jun 17 |
nicklas |
277 |
|
4550 |
30 Jun 17 |
nicklas |
return box; |
4550 |
30 Jun 17 |
nicklas |
279 |
}(); |
4550 |
30 Jun 17 |
nicklas |
280 |
|
4550 |
30 Jun 17 |
nicklas |
Doc.onLoad(StorageBox.initPage); |
4550 |
30 Jun 17 |
nicklas |
282 |
|