2652 |
11 Sep 14 |
nicklas |
var FlowCell = function() |
2652 |
11 Sep 14 |
nicklas |
2 |
{ |
2652 |
11 Sep 14 |
nicklas |
var flowcell = {}; |
2656 |
11 Sep 14 |
nicklas |
var debug = 0; |
2652 |
11 Sep 14 |
nicklas |
var subtypePooledLibrary = null; |
5435 |
17 May 19 |
nicklas |
var annotationTypePipeline = null; |
5435 |
17 May 19 |
nicklas |
7 |
|
2652 |
11 Sep 14 |
nicklas |
var flowCells = []; |
2652 |
11 Sep 14 |
nicklas |
var selectedPools = []; |
3108 |
27 Jan 15 |
nicklas |
var newPools; |
2652 |
11 Sep 14 |
nicklas |
11 |
|
2652 |
11 Sep 14 |
nicklas |
var PRESET_NEXTSEQ = 'NextSeq'; |
2652 |
11 Sep 14 |
nicklas |
var DEFAULT_READ_NEXTSEQ = [76, 6, 76]; |
2652 |
11 Sep 14 |
nicklas |
14 |
|
2652 |
11 Sep 14 |
nicklas |
var poolsAreValid = false; |
2652 |
11 Sep 14 |
nicklas |
var readIsValid = []; |
2652 |
11 Sep 14 |
nicklas |
var currentFcNo; |
2652 |
11 Sep 14 |
nicklas |
var currentLaneNo; |
2652 |
11 Sep 14 |
nicklas |
19 |
|
2652 |
11 Sep 14 |
nicklas |
// Page initialization |
2652 |
11 Sep 14 |
nicklas |
flowcell.initPage = function() |
2652 |
11 Sep 14 |
nicklas |
22 |
{ |
2652 |
11 Sep 14 |
nicklas |
// Step 1 |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('step-1', 'wizard-validate', flowcell.validateStep1); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('preset', 'change', flowcell.presetOnChange); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('pools', 'change', flowcell.poolsOnChange); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('pools', 'base-selected', flowcell.setPoolCallback); |
2652 |
11 Sep 14 |
nicklas |
Buttons.addClickHandler('btnSelectPools', flowcell.selectPools); |
2652 |
11 Sep 14 |
nicklas |
29 |
|
2652 |
11 Sep 14 |
nicklas |
// Step 2 |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('step-2', 'wizard-initialize', flowcell.initializeStep2); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('step-2', 'wizard-validate', flowcell.validateStep2); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('read1', 'change', flowcell.readOnChange); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('indexRead', 'change', flowcell.readOnChange); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('read2', 'change', flowcell.readOnChange); |
2842 |
20 Oct 14 |
nicklas |
Events.addEventHandler('read1', 'keypress', Events.integerOnly); |
2842 |
20 Oct 14 |
nicklas |
Events.addEventHandler('indexRead', 'keypress', Events.integerOnly); |
2842 |
20 Oct 14 |
nicklas |
Events.addEventHandler('read2', 'keypress', Events.integerOnly); |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('select-pool', 'click', flowcell.onPoolSelected); |
2796 |
13 Oct 14 |
nicklas |
Events.addEventHandler('wizard', 'click', flowcell.hidePoolSelection); |
2652 |
11 Sep 14 |
nicklas |
41 |
|
2652 |
11 Sep 14 |
nicklas |
// Navigation |
2652 |
11 Sep 14 |
nicklas |
Buttons.addClickHandler('gocancel', Wizard.cancelWizard); |
2652 |
11 Sep 14 |
nicklas |
Buttons.addClickHandler('gorestart', Wizard.restartWizard); |
2652 |
11 Sep 14 |
nicklas |
Buttons.addClickHandler('gonext', Wizard.goNextOnClick); |
2652 |
11 Sep 14 |
nicklas |
Buttons.addClickHandler('goregister', Wizard.goRegister); |
2652 |
11 Sep 14 |
nicklas |
47 |
|
2652 |
11 Sep 14 |
nicklas |
// Final registration |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('wizard', 'wizard-submit', flowcell.submit); |
2652 |
11 Sep 14 |
nicklas |
50 |
|
2652 |
11 Sep 14 |
nicklas |
var url = '../FlowCell.servlet?ID='+App.getSessionId(); |
2652 |
11 Sep 14 |
nicklas |
url += '&cmd=GetUnusedPools'; |
2652 |
11 Sep 14 |
nicklas |
Wizard.showLoadingAnimation('Loading pools...'); |
2652 |
11 Sep 14 |
nicklas |
Wizard.asyncJsonRequest(url, flowcell.initializeStep1); |
2652 |
11 Sep 14 |
nicklas |
55 |
} |
2652 |
11 Sep 14 |
nicklas |
56 |
|
2652 |
11 Sep 14 |
nicklas |
57 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.initializeStep1 = function(response) |
2652 |
11 Sep 14 |
nicklas |
59 |
{ |
3108 |
27 Jan 15 |
nicklas |
flowcell.poolInfoLoaded(response); |
3108 |
27 Jan 15 |
nicklas |
flowcell.presetOnChange(); |
3108 |
27 Jan 15 |
nicklas |
Doc.show('step-1'); |
3108 |
27 Jan 15 |
nicklas |
Doc.show('gonext'); |
3108 |
27 Jan 15 |
nicklas |
64 |
} |
3108 |
27 Jan 15 |
nicklas |
65 |
|
3108 |
27 Jan 15 |
nicklas |
flowcell.poolInfoLoaded = function(response) |
3108 |
27 Jan 15 |
nicklas |
67 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
var pools = response.pools; |
2652 |
11 Sep 14 |
nicklas |
70 |
|
2652 |
11 Sep 14 |
nicklas |
var poolsList = frm.pools; |
2652 |
11 Sep 14 |
nicklas |
if (pools.length > 0) |
2652 |
11 Sep 14 |
nicklas |
73 |
{ |
2652 |
11 Sep 14 |
nicklas |
for (var poolNo=0; poolNo < pools.length; poolNo++) |
2652 |
11 Sep 14 |
nicklas |
75 |
{ |
2652 |
11 Sep 14 |
nicklas |
var pool = pools[poolNo]; |
3108 |
27 Jan 15 |
nicklas |
var name = pool.name + ' (' + Numbers.formatNumber(pool.molarity, 2, 'nM') + ') - '; |
2652 |
11 Sep 14 |
nicklas |
78 |
|
2652 |
11 Sep 14 |
nicklas |
var numPlates = pool.libPlates.length; |
2652 |
11 Sep 14 |
nicklas |
var title = ''; |
2652 |
11 Sep 14 |
nicklas |
81 |
|
2652 |
11 Sep 14 |
nicklas |
if (numPlates <= 2) |
2652 |
11 Sep 14 |
nicklas |
83 |
{ |
2652 |
11 Sep 14 |
nicklas |
for (var plateNo=0; plateNo < numPlates; plateNo++) |
2652 |
11 Sep 14 |
nicklas |
85 |
{ |
2652 |
11 Sep 14 |
nicklas |
var libPlate = pool.libPlates[plateNo]; |
2652 |
11 Sep 14 |
nicklas |
if (plateNo > 0) name += ', '; |
2652 |
11 Sep 14 |
nicklas |
name += libPlate.name; |
2652 |
11 Sep 14 |
nicklas |
89 |
} |
2652 |
11 Sep 14 |
nicklas |
90 |
} |
2652 |
11 Sep 14 |
nicklas |
else |
2652 |
11 Sep 14 |
nicklas |
92 |
{ |
2652 |
11 Sep 14 |
nicklas |
name += pool.libPlates[0].name + ' + ' + (numPlates-1) + ' more...'; |
2652 |
11 Sep 14 |
nicklas |
for (var plateNo=0; plateNo < numPlates; plateNo++) |
2652 |
11 Sep 14 |
nicklas |
95 |
{ |
2652 |
11 Sep 14 |
nicklas |
var libPlate = pool.libPlates[plateNo]; |
2652 |
11 Sep 14 |
nicklas |
if (plateNo > 0) title += ', '; |
2652 |
11 Sep 14 |
nicklas |
title += libPlate.name; |
2652 |
11 Sep 14 |
nicklas |
99 |
} |
2652 |
11 Sep 14 |
nicklas |
100 |
} |
2652 |
11 Sep 14 |
nicklas |
101 |
|
4583 |
21 Sep 17 |
nicklas |
var option = new Option(name, pool.id, false, poolNo < 1); |
2652 |
11 Sep 14 |
nicklas |
option.title = title; |
2652 |
11 Sep 14 |
nicklas |
option.pool = pool; |
2652 |
11 Sep 14 |
nicklas |
105 |
|
2652 |
11 Sep 14 |
nicklas |
poolsList[poolsList.length] = option; |
2652 |
11 Sep 14 |
nicklas |
107 |
} |
2652 |
11 Sep 14 |
nicklas |
108 |
} |
2652 |
11 Sep 14 |
nicklas |
109 |
} |
3108 |
27 Jan 15 |
nicklas |
110 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.presetOnChange = function() |
2652 |
11 Sep 14 |
nicklas |
112 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
var preset = frm.preset.value; |
2652 |
11 Sep 14 |
nicklas |
115 |
|
3623 |
25 Nov 15 |
nicklas |
if (preset == PRESET_NEXTSEQ) |
2652 |
11 Sep 14 |
nicklas |
117 |
{ |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[0].disabled = true; |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[1].disabled = false; |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[2].disabled = true; |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[1].checked = true; |
2652 |
11 Sep 14 |
nicklas |
for (var i = 0; i<frm.pools.length; i++) |
2652 |
11 Sep 14 |
nicklas |
123 |
{ |
2652 |
11 Sep 14 |
nicklas |
frm.pools[i].selected = i < 1; |
2652 |
11 Sep 14 |
nicklas |
125 |
} |
2652 |
11 Sep 14 |
nicklas |
frm.read1.value = DEFAULT_READ_NEXTSEQ[0]; |
2652 |
11 Sep 14 |
nicklas |
frm.indexRead.value = DEFAULT_READ_NEXTSEQ[1]; |
2652 |
11 Sep 14 |
nicklas |
frm.read2.value = DEFAULT_READ_NEXTSEQ[2]; |
2652 |
11 Sep 14 |
nicklas |
129 |
} |
2652 |
11 Sep 14 |
nicklas |
else |
2652 |
11 Sep 14 |
nicklas |
131 |
{ |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[0].disabled = false; |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[1].disabled = false; |
2652 |
11 Sep 14 |
nicklas |
frm.num_lanes[2].disabled = false; |
2652 |
11 Sep 14 |
nicklas |
135 |
} |
2652 |
11 Sep 14 |
nicklas |
136 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.poolsOnChange(); |
2652 |
11 Sep 14 |
nicklas |
138 |
} |
2652 |
11 Sep 14 |
nicklas |
139 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.poolsOnChange = function() |
2652 |
11 Sep 14 |
nicklas |
141 |
{ |
2652 |
11 Sep 14 |
nicklas |
poolsAreValid = false; |
2652 |
11 Sep 14 |
nicklas |
143 |
|
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
var preset = frm.preset.value; |
2652 |
11 Sep 14 |
nicklas |
var poolsList = frm.pools; |
2652 |
11 Sep 14 |
nicklas |
147 |
|
2652 |
11 Sep 14 |
nicklas |
var numSelected = 0; |
5435 |
17 May 19 |
nicklas |
var invalidPipeline = null; |
2652 |
11 Sep 14 |
nicklas |
for (var i = 0; i < poolsList.length; i++) |
2652 |
11 Sep 14 |
nicklas |
151 |
{ |
3108 |
27 Jan 15 |
nicklas |
if (poolsList[i].selected) |
3108 |
27 Jan 15 |
nicklas |
153 |
{ |
3108 |
27 Jan 15 |
nicklas |
var pool = poolsList[i].pool; |
5435 |
17 May 19 |
nicklas |
if (pool.pipeline && pool.pipeline != 'RNAseq') |
3108 |
27 Jan 15 |
nicklas |
156 |
{ |
5435 |
17 May 19 |
nicklas |
invalidPipeline = 'Pool ' + Strings.encodeTags(pool.name+' ('+pool.pipeline)+') is not intended for RNAseq pipeline.'; |
3108 |
27 Jan 15 |
nicklas |
158 |
} |
5435 |
17 May 19 |
nicklas |
numSelected++; |
3108 |
27 Jan 15 |
nicklas |
160 |
} |
2652 |
11 Sep 14 |
nicklas |
161 |
} |
5435 |
17 May 19 |
nicklas |
162 |
|
2652 |
11 Sep 14 |
nicklas |
Doc.element('numSelected').innerHTML = numSelected + ' selected'; |
2652 |
11 Sep 14 |
nicklas |
164 |
|
5435 |
17 May 19 |
nicklas |
if (invalidPipeline) |
5435 |
17 May 19 |
nicklas |
166 |
{ |
5435 |
17 May 19 |
nicklas |
Wizard.setInputStatus('pools', 'invalid', invalidPipeline); |
5435 |
17 May 19 |
nicklas |
return; |
5435 |
17 May 19 |
nicklas |
169 |
} |
2652 |
11 Sep 14 |
nicklas |
if (numSelected == 0) |
2652 |
11 Sep 14 |
nicklas |
171 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus('pools', 'invalid', 'Must select at least 1 pool.'); |
2652 |
11 Sep 14 |
nicklas |
return; |
2652 |
11 Sep 14 |
nicklas |
174 |
} |
3108 |
27 Jan 15 |
nicklas |
if (preset == PRESET_NEXTSEQ) |
2652 |
11 Sep 14 |
nicklas |
176 |
{ |
3108 |
27 Jan 15 |
nicklas |
if (numSelected > 1) |
3108 |
27 Jan 15 |
nicklas |
178 |
{ |
3108 |
27 Jan 15 |
nicklas |
Wizard.setInputStatus('pools', 'invalid', 'Can only use 1 pool with the NextSeq.'); |
3108 |
27 Jan 15 |
nicklas |
return; |
3108 |
27 Jan 15 |
nicklas |
181 |
} |
2652 |
11 Sep 14 |
nicklas |
182 |
} |
2652 |
11 Sep 14 |
nicklas |
183 |
|
2652 |
11 Sep 14 |
nicklas |
poolsAreValid = true; |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus('pools', 'valid'); |
2652 |
11 Sep 14 |
nicklas |
186 |
} |
2652 |
11 Sep 14 |
nicklas |
187 |
|
2652 |
11 Sep 14 |
nicklas |
188 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.selectPools = function() |
2652 |
11 Sep 14 |
nicklas |
190 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
if (frm.pools.disabled) return; |
2652 |
11 Sep 14 |
nicklas |
193 |
|
2652 |
11 Sep 14 |
nicklas |
if (subtypePooledLibrary == null) |
2652 |
11 Sep 14 |
nicklas |
195 |
{ |
2652 |
11 Sep 14 |
nicklas |
subtypePooledLibrary = Reggie.getSubtypeInfo('POOLED_LIBRARY'); |
2652 |
11 Sep 14 |
nicklas |
197 |
} |
5435 |
17 May 19 |
nicklas |
if (annotationTypePipeline == null) |
5435 |
17 May 19 |
nicklas |
199 |
{ |
5435 |
17 May 19 |
nicklas |
annotationTypePipeline = Reggie.getAnnotationTypeInfo('PIPELINE'); |
5435 |
17 May 19 |
nicklas |
201 |
} |
2652 |
11 Sep 14 |
nicklas |
202 |
|
3108 |
27 Jan 15 |
nicklas |
newPools = []; |
2652 |
11 Sep 14 |
nicklas |
var url = '&resetTemporary=1'; |
2652 |
11 Sep 14 |
nicklas |
url += '&tmpfilter:INT:itemSubtype='+subtypePooledLibrary.id; |
2652 |
11 Sep 14 |
nicklas |
url += '&tmpfilter:DATE:creationEvent.eventDate='+encodeURIComponent('<>'); |
5435 |
17 May 19 |
nicklas |
url += '&tmpfilter:STRING:'+encodeURIComponent('#')+annotationTypePipeline.id+'=RNAseq'; |
2652 |
11 Sep 14 |
nicklas |
Dialogs.selectItem('EXTRACT', 'pools', 1, url); |
2652 |
11 Sep 14 |
nicklas |
209 |
} |
2652 |
11 Sep 14 |
nicklas |
210 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.setPoolCallback = function(event) |
2652 |
11 Sep 14 |
nicklas |
212 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
var name = event.detail.name; |
2652 |
11 Sep 14 |
nicklas |
var id = event.detail.id; |
2652 |
11 Sep 14 |
nicklas |
216 |
|
2652 |
11 Sep 14 |
nicklas |
var poolsList = frm.pools; |
2808 |
15 Oct 14 |
nicklas |
var isNew = true; |
2652 |
11 Sep 14 |
nicklas |
for (var i = 0; i < poolsList.length; i++) |
2652 |
11 Sep 14 |
nicklas |
220 |
{ |
2652 |
11 Sep 14 |
nicklas |
if (poolsList[i].value == id) |
2652 |
11 Sep 14 |
nicklas |
222 |
{ |
2652 |
11 Sep 14 |
nicklas |
poolsList[i].selected = true; |
2808 |
15 Oct 14 |
nicklas |
isNew = false; |
2652 |
11 Sep 14 |
nicklas |
225 |
} |
2652 |
11 Sep 14 |
nicklas |
226 |
} |
2652 |
11 Sep 14 |
nicklas |
227 |
|
2808 |
15 Oct 14 |
nicklas |
if (isNew) |
2808 |
15 Oct 14 |
nicklas |
229 |
{ |
3108 |
27 Jan 15 |
nicklas |
newPools[newPools.length] = id; |
2808 |
15 Oct 14 |
nicklas |
231 |
} |
2808 |
15 Oct 14 |
nicklas |
232 |
|
3108 |
27 Jan 15 |
nicklas |
if (event.detail.remaining == 0 && newPools.length > 0) |
2808 |
15 Oct 14 |
nicklas |
234 |
{ |
3108 |
27 Jan 15 |
nicklas |
// Get more information about the selected library |
3108 |
27 Jan 15 |
nicklas |
var url = '../FlowCell.servlet?ID='+App.getSessionId(); |
3108 |
27 Jan 15 |
nicklas |
url += '&cmd=GetPoolInfo&pools=' + newPools.join(','); |
3108 |
27 Jan 15 |
nicklas |
Wizard.asyncJsonRequest(url, flowcell.manualPoolInfoLoaded); |
2808 |
15 Oct 14 |
nicklas |
239 |
} |
2652 |
11 Sep 14 |
nicklas |
240 |
} |
2652 |
11 Sep 14 |
nicklas |
241 |
|
3108 |
27 Jan 15 |
nicklas |
flowcell.manualPoolInfoLoaded = function(response) |
3108 |
27 Jan 15 |
nicklas |
243 |
{ |
3108 |
27 Jan 15 |
nicklas |
flowcell.poolInfoLoaded(response); |
3108 |
27 Jan 15 |
nicklas |
flowcell.poolsOnChange(); |
3108 |
27 Jan 15 |
nicklas |
246 |
} |
3108 |
27 Jan 15 |
nicklas |
247 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.validateStep1 = function(event) |
2652 |
11 Sep 14 |
nicklas |
249 |
{ |
2652 |
11 Sep 14 |
nicklas |
if (!poolsAreValid) event.preventDefault(); |
2652 |
11 Sep 14 |
nicklas |
251 |
} |
2652 |
11 Sep 14 |
nicklas |
252 |
|
2652 |
11 Sep 14 |
nicklas |
253 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.initializeStep2 = function() |
2652 |
11 Sep 14 |
nicklas |
255 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
3108 |
27 Jan 15 |
nicklas |
257 |
|
3108 |
27 Jan 15 |
nicklas |
// Auto-select either 10µl or 20µl |
3108 |
27 Jan 15 |
nicklas |
var maxMolarity = null; |
3108 |
27 Jan 15 |
nicklas |
var minMolarity = null; |
3108 |
27 Jan 15 |
nicklas |
var poolsList = frm.pools; |
3108 |
27 Jan 15 |
nicklas |
for (var i = 0; i < poolsList.length; i++) |
3108 |
27 Jan 15 |
nicklas |
263 |
{ |
3108 |
27 Jan 15 |
nicklas |
if (poolsList[i].selected) |
3108 |
27 Jan 15 |
nicklas |
265 |
{ |
3108 |
27 Jan 15 |
nicklas |
var pool = poolsList[i].pool; |
3108 |
27 Jan 15 |
nicklas |
if (maxMolarity == null || pool.molarity > maxMolarity) |
3108 |
27 Jan 15 |
nicklas |
268 |
{ |
3108 |
27 Jan 15 |
nicklas |
maxMolarity = pool.molarity; |
3108 |
27 Jan 15 |
nicklas |
270 |
} |
3108 |
27 Jan 15 |
nicklas |
if (minMolarity == null || pool.molarity < minMolarity) |
3108 |
27 Jan 15 |
nicklas |
272 |
{ |
3108 |
27 Jan 15 |
nicklas |
minMolarity = pool.molarity; |
3108 |
27 Jan 15 |
nicklas |
274 |
} |
3108 |
27 Jan 15 |
nicklas |
275 |
} |
3108 |
27 Jan 15 |
nicklas |
276 |
} |
3108 |
27 Jan 15 |
nicklas |
277 |
|
3108 |
27 Jan 15 |
nicklas |
if (Math.abs(maxMolarity - 1) < 0.25 && Math.abs(minMolarity - 1) < 0.25) |
3108 |
27 Jan 15 |
nicklas |
279 |
{ |
3108 |
27 Jan 15 |
nicklas |
// Close to 1nM use 20µl instead of 10 |
3108 |
27 Jan 15 |
nicklas |
Forms.selectListOption(frm.volumeToUseFromPool, '20'); |
3108 |
27 Jan 15 |
nicklas |
282 |
} |
3108 |
27 Jan 15 |
nicklas |
283 |
|
2652 |
11 Sep 14 |
nicklas |
var numFlowCells = Forms.getCheckedRadio(frm.num_flowcells).value; |
2652 |
11 Sep 14 |
nicklas |
var url = '../FlowCell.servlet?ID='+App.getSessionId(); |
2652 |
11 Sep 14 |
nicklas |
url += '&cmd=GetNextAutoGeneratedFlowCellNames&numNames='+numFlowCells; |
2652 |
11 Sep 14 |
nicklas |
Wizard.showLoadingAnimation('Loading flow cell information...'); |
2652 |
11 Sep 14 |
nicklas |
Wizard.asyncJsonRequest(url, flowcell.flowCellsLoaded); |
2652 |
11 Sep 14 |
nicklas |
289 |
} |
2652 |
11 Sep 14 |
nicklas |
290 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.flowCellsLoaded = function(response) |
2652 |
11 Sep 14 |
nicklas |
292 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
294 |
|
2652 |
11 Sep 14 |
nicklas |
var names = response.names; |
2652 |
11 Sep 14 |
nicklas |
var numFlowCells = names.length; |
2652 |
11 Sep 14 |
nicklas |
var numLanes = Forms.getCheckedRadio(frm.num_lanes).value; |
2652 |
11 Sep 14 |
nicklas |
298 |
|
2652 |
11 Sep 14 |
nicklas |
// Initialize flowCell->lane->pool array |
2652 |
11 Sep 14 |
nicklas |
for (var fcNo = 0; fcNo < numFlowCells; fcNo++) |
2652 |
11 Sep 14 |
nicklas |
301 |
{ |
2652 |
11 Sep 14 |
nicklas |
var fc = {}; |
2652 |
11 Sep 14 |
nicklas |
fc.name = names[fcNo]; |
2652 |
11 Sep 14 |
nicklas |
fc.lanes = []; |
2652 |
11 Sep 14 |
nicklas |
for (var laneNo = 0; laneNo < numLanes; laneNo++) |
2652 |
11 Sep 14 |
nicklas |
306 |
{ |
2652 |
11 Sep 14 |
nicklas |
fc.lanes[laneNo] = {}; |
2652 |
11 Sep 14 |
nicklas |
308 |
} |
2652 |
11 Sep 14 |
nicklas |
309 |
|
2652 |
11 Sep 14 |
nicklas |
flowCells[fcNo] = fc; |
2652 |
11 Sep 14 |
nicklas |
Doc.element('fc.'+fcNo).innerHTML = Strings.encodeTags(fc.name); |
2652 |
11 Sep 14 |
nicklas |
Doc.element('comments.'+fcNo+'.name').innerHTML = Strings.encodeTags(fc.name); |
2652 |
11 Sep 14 |
nicklas |
313 |
} |
2652 |
11 Sep 14 |
nicklas |
314 |
|
2652 |
11 Sep 14 |
nicklas |
// Hide unused flow cell |
2652 |
11 Sep 14 |
nicklas |
if (numFlowCells == 1) |
2652 |
11 Sep 14 |
nicklas |
317 |
{ |
2652 |
11 Sep 14 |
nicklas |
Doc.addClass(plate, 'hide-fc-1'); |
2652 |
11 Sep 14 |
nicklas |
Doc.hide('comments.1'); |
2652 |
11 Sep 14 |
nicklas |
320 |
} |
2652 |
11 Sep 14 |
nicklas |
321 |
|
2652 |
11 Sep 14 |
nicklas |
// Hide unused lanes |
2652 |
11 Sep 14 |
nicklas |
for (var i = numLanes; i < 8; i++) |
2652 |
11 Sep 14 |
nicklas |
324 |
{ |
2652 |
11 Sep 14 |
nicklas |
Doc.hide('lane.'+i); |
2652 |
11 Sep 14 |
nicklas |
326 |
} |
2652 |
11 Sep 14 |
nicklas |
327 |
|
2652 |
11 Sep 14 |
nicklas |
// Generate popup menu for pool selection |
2652 |
11 Sep 14 |
nicklas |
var selectPoolHtml = ''; |
2652 |
11 Sep 14 |
nicklas |
for (var i = 0; i < frm.pools.length; i++) |
2652 |
11 Sep 14 |
nicklas |
331 |
{ |
2652 |
11 Sep 14 |
nicklas |
if (frm.pools[i].selected) |
2652 |
11 Sep 14 |
nicklas |
333 |
{ |
2652 |
11 Sep 14 |
nicklas |
var pool = frm.pools[i].pool; |
2652 |
11 Sep 14 |
nicklas |
var index = selectedPools.length; |
2652 |
11 Sep 14 |
nicklas |
selectedPools[index] = pool; |
2652 |
11 Sep 14 |
nicklas |
337 |
|
2981 |
25 Nov 14 |
nicklas |
selectPoolHtml += '<div class="menuitem enabled interactable" id="pool-'+pool.id+'" data-index="'+index+'">'; |
2652 |
11 Sep 14 |
nicklas |
selectPoolHtml += Strings.encodeTags(pool.name)+'</div>'; |
2652 |
11 Sep 14 |
nicklas |
340 |
} |
2652 |
11 Sep 14 |
nicklas |
341 |
} |
2652 |
11 Sep 14 |
nicklas |
// Add separator |
2652 |
11 Sep 14 |
nicklas |
selectPoolHtml += '<div class="menuseparator"></div>'; |
2652 |
11 Sep 14 |
nicklas |
// Add option for empty lane |
2981 |
25 Nov 14 |
nicklas |
selectPoolHtml += '<div class="menuitem enabled interactable" id="pool-none"><i>empty</i>'+'</div>'; |
2652 |
11 Sep 14 |
nicklas |
Doc.element('select-pool-all').innerHTML = selectPoolHtml; |
2652 |
11 Sep 14 |
nicklas |
347 |
|
3623 |
25 Nov 15 |
nicklas |
// A single pool on all lanes |
2652 |
11 Sep 14 |
nicklas |
if (selectedPools.length == 1) |
2652 |
11 Sep 14 |
nicklas |
350 |
{ |
2652 |
11 Sep 14 |
nicklas |
var pool = selectedPools[0]; |
2652 |
11 Sep 14 |
nicklas |
for (var fcNo = 0; fcNo < numFlowCells; fcNo++) |
2652 |
11 Sep 14 |
nicklas |
353 |
{ |
2652 |
11 Sep 14 |
nicklas |
for (var laneNo = 0; laneNo < numLanes; laneNo++) |
2652 |
11 Sep 14 |
nicklas |
355 |
{ |
2652 |
11 Sep 14 |
nicklas |
flowCells[fcNo].lanes[laneNo] = {'pool': pool, 'defaultPool': pool}; |
2652 |
11 Sep 14 |
nicklas |
357 |
} |
2652 |
11 Sep 14 |
nicklas |
358 |
} |
2652 |
11 Sep 14 |
nicklas |
359 |
} |
2652 |
11 Sep 14 |
nicklas |
360 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.updateFlowCellsMatrix(true); |
2652 |
11 Sep 14 |
nicklas |
362 |
|
2652 |
11 Sep 14 |
nicklas |
Doc.show('gocancel'); |
2652 |
11 Sep 14 |
nicklas |
Doc.show('goregister'); |
2652 |
11 Sep 14 |
nicklas |
Wizard.setCurrentStep(2); |
2652 |
11 Sep 14 |
nicklas |
366 |
|
2652 |
11 Sep 14 |
nicklas |
Events.sendChangeEvent('read1'); |
2652 |
11 Sep 14 |
nicklas |
Events.sendChangeEvent('indexRead'); |
2652 |
11 Sep 14 |
nicklas |
Events.sendChangeEvent('read2'); |
2652 |
11 Sep 14 |
nicklas |
frm.read1.focus(); |
2652 |
11 Sep 14 |
nicklas |
371 |
|
2652 |
11 Sep 14 |
nicklas |
372 |
} |
2652 |
11 Sep 14 |
nicklas |
373 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.readOnChange = function(event) |
2652 |
11 Sep 14 |
nicklas |
375 |
{ |
2652 |
11 Sep 14 |
nicklas |
var target = event.currentTarget; |
2652 |
11 Sep 14 |
nicklas |
377 |
|
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus(target.id); |
2652 |
11 Sep 14 |
nicklas |
379 |
|
2652 |
11 Sep 14 |
nicklas |
var defaultValue = Data.int(target, 'default-value'); |
2652 |
11 Sep 14 |
nicklas |
var value = target.value; |
2652 |
11 Sep 14 |
nicklas |
if (!defaultValue) Data.set(target, 'default-value', value); // Initalize the default value |
2652 |
11 Sep 14 |
nicklas |
383 |
|
2652 |
11 Sep 14 |
nicklas |
if (value == '') |
2652 |
11 Sep 14 |
nicklas |
385 |
{ |
2652 |
11 Sep 14 |
nicklas |
readIsValid[target.id] = false; |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus(target.id, 'invalid', 'Missing'); |
2652 |
11 Sep 14 |
nicklas |
return; |
2652 |
11 Sep 14 |
nicklas |
389 |
} |
2652 |
11 Sep 14 |
nicklas |
390 |
|
2652 |
11 Sep 14 |
nicklas |
if (!Numbers.isInteger(value)) |
2652 |
11 Sep 14 |
nicklas |
392 |
{ |
2652 |
11 Sep 14 |
nicklas |
readIsValid[target.id] = false; |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus(target.id, 'invalid', 'Not a number'); |
2652 |
11 Sep 14 |
nicklas |
return; |
2652 |
11 Sep 14 |
nicklas |
396 |
} |
2652 |
11 Sep 14 |
nicklas |
397 |
|
2652 |
11 Sep 14 |
nicklas |
readIsValid[target.id] = true; |
2652 |
11 Sep 14 |
nicklas |
if (defaultValue && parseInt(value) != defaultValue) |
2652 |
11 Sep 14 |
nicklas |
400 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus(target.id, 'warning', 'Default: ' + defaultValue); |
2652 |
11 Sep 14 |
nicklas |
402 |
} |
2652 |
11 Sep 14 |
nicklas |
else |
2652 |
11 Sep 14 |
nicklas |
404 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus(target.id, 'valid'); |
2652 |
11 Sep 14 |
nicklas |
406 |
} |
2652 |
11 Sep 14 |
nicklas |
407 |
} |
2652 |
11 Sep 14 |
nicklas |
408 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.updateFlowCellsMatrix = function(attachEventHandlers) |
2652 |
11 Sep 14 |
nicklas |
410 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus('flowCells'); |
2652 |
11 Sep 14 |
nicklas |
flowCellsAreValid = false; |
2652 |
11 Sep 14 |
nicklas |
413 |
|
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
var numFlowCells = Forms.getCheckedRadio(frm.num_flowcells).value; |
2652 |
11 Sep 14 |
nicklas |
var numLanes = Forms.getCheckedRadio(frm.num_lanes).value; |
2652 |
11 Sep 14 |
nicklas |
var numEmptyLanes = 0; |
2652 |
11 Sep 14 |
nicklas |
418 |
|
2652 |
11 Sep 14 |
nicklas |
for (var fcNo = 0; fcNo < flowCells.length; fcNo++) |
2652 |
11 Sep 14 |
nicklas |
420 |
{ |
2652 |
11 Sep 14 |
nicklas |
for (var laneNo = 0; laneNo < flowCells[fcNo].lanes.length; laneNo++) |
2652 |
11 Sep 14 |
nicklas |
422 |
{ |
2652 |
11 Sep 14 |
nicklas |
var lane = flowCells[fcNo].lanes[laneNo]; |
2652 |
11 Sep 14 |
nicklas |
var pool = lane.pool; |
2652 |
11 Sep 14 |
nicklas |
425 |
|
2652 |
11 Sep 14 |
nicklas |
var name = pool ? Strings.encodeTags(pool.name) : ''; |
2652 |
11 Sep 14 |
nicklas |
if (pool && lane.defaultPool && pool != lane.defaultPool) |
2652 |
11 Sep 14 |
nicklas |
428 |
{ |
2652 |
11 Sep 14 |
nicklas |
name = '<span class="nondefault">' + name + '</name>'; |
2652 |
11 Sep 14 |
nicklas |
430 |
} |
2652 |
11 Sep 14 |
nicklas |
431 |
|
2652 |
11 Sep 14 |
nicklas |
Doc.element('lane.'+laneNo+'.'+fcNo).innerHTML = name; |
2652 |
11 Sep 14 |
nicklas |
if (attachEventHandlers) |
2652 |
11 Sep 14 |
nicklas |
434 |
{ |
2652 |
11 Sep 14 |
nicklas |
Events.addEventHandler('lane.'+laneNo+'.'+fcNo, 'click', flowcell.selectPool); |
2652 |
11 Sep 14 |
nicklas |
436 |
} |
2652 |
11 Sep 14 |
nicklas |
if (!pool) numEmptyLanes++; |
2652 |
11 Sep 14 |
nicklas |
438 |
} |
2652 |
11 Sep 14 |
nicklas |
439 |
} |
2652 |
11 Sep 14 |
nicklas |
440 |
|
2652 |
11 Sep 14 |
nicklas |
if (numEmptyLanes >= numFlowCells*numLanes) |
2652 |
11 Sep 14 |
nicklas |
442 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus('flowCells', 'invalid', 'All lanes empty'); |
2652 |
11 Sep 14 |
nicklas |
return; |
2652 |
11 Sep 14 |
nicklas |
445 |
} |
2652 |
11 Sep 14 |
nicklas |
446 |
|
2652 |
11 Sep 14 |
nicklas |
flowCellsAreValid = true; |
2652 |
11 Sep 14 |
nicklas |
if (numEmptyLanes > 0) |
2652 |
11 Sep 14 |
nicklas |
449 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus('flowCells', 'warning', numEmptyLanes + ' empty lanes'); |
2652 |
11 Sep 14 |
nicklas |
451 |
} |
2652 |
11 Sep 14 |
nicklas |
else |
2652 |
11 Sep 14 |
nicklas |
453 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.setInputStatus('flowCells', 'valid'); |
2652 |
11 Sep 14 |
nicklas |
455 |
} |
2652 |
11 Sep 14 |
nicklas |
456 |
} |
2652 |
11 Sep 14 |
nicklas |
457 |
|
2652 |
11 Sep 14 |
nicklas |
458 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.selectPool = function(event) |
2652 |
11 Sep 14 |
nicklas |
460 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2652 |
11 Sep 14 |
nicklas |
if (frm.preset.value == PRESET_NEXTSEQ) return; |
2652 |
11 Sep 14 |
nicklas |
463 |
|
2652 |
11 Sep 14 |
nicklas |
var target = event.currentTarget; |
2652 |
11 Sep 14 |
nicklas |
currentFcNo = Data.int(target, 'fc-no'); |
2652 |
11 Sep 14 |
nicklas |
currentLaneNo = Data.int(target, 'lane-no'); |
2652 |
11 Sep 14 |
nicklas |
467 |
|
2652 |
11 Sep 14 |
nicklas |
// Reset 'current' selection |
2652 |
11 Sep 14 |
nicklas |
var menu = Doc.element('select-pool'); |
2652 |
11 Sep 14 |
nicklas |
var selectAll = Doc.element('select-pool-all'); |
2652 |
11 Sep 14 |
nicklas |
for (var i = 0; i < selectAll.childNodes.length; i++) |
2652 |
11 Sep 14 |
nicklas |
472 |
{ |
2652 |
11 Sep 14 |
nicklas |
Doc.removeClass(selectAll.childNodes[i], 'current'); |
2652 |
11 Sep 14 |
nicklas |
Doc.removeClass(selectAll.childNodes[i], 'default'); |
2652 |
11 Sep 14 |
nicklas |
475 |
} |
2652 |
11 Sep 14 |
nicklas |
menu.style.display = 'block'; |
2652 |
11 Sep 14 |
nicklas |
477 |
|
2652 |
11 Sep 14 |
nicklas |
var currentPool = flowCells[currentFcNo].lanes[currentLaneNo].pool; |
2652 |
11 Sep 14 |
nicklas |
var defaultPool = flowCells[currentFcNo].lanes[currentLaneNo].defaultPool; |
2652 |
11 Sep 14 |
nicklas |
if (currentPool) |
2652 |
11 Sep 14 |
nicklas |
481 |
{ |
2652 |
11 Sep 14 |
nicklas |
Doc.addClass('pool-'+currentPool.id, 'current'); |
2652 |
11 Sep 14 |
nicklas |
483 |
} |
2652 |
11 Sep 14 |
nicklas |
if (defaultPool && defaultPool != currentPool) |
2652 |
11 Sep 14 |
nicklas |
485 |
{ |
2652 |
11 Sep 14 |
nicklas |
Doc.addClass('pool-'+defaultPool.id, 'default'); |
2652 |
11 Sep 14 |
nicklas |
487 |
} |
2652 |
11 Sep 14 |
nicklas |
488 |
|
2652 |
11 Sep 14 |
nicklas |
var x = event.clientX; |
2652 |
11 Sep 14 |
nicklas |
var halfHeight = Math.floor(selectAll.offsetHeight/2) |
2652 |
11 Sep 14 |
nicklas |
var y = event.clientY+2; //-halfHeight; |
2652 |
11 Sep 14 |
nicklas |
492 |
|
2652 |
11 Sep 14 |
nicklas |
var scroll = 0; |
2652 |
11 Sep 14 |
nicklas |
494 |
|
2652 |
11 Sep 14 |
nicklas |
// Position the selection div |
2652 |
11 Sep 14 |
nicklas |
selectAll.scrollTop = scroll; |
2652 |
11 Sep 14 |
nicklas |
menu.style.left = (x)+'px'; |
2652 |
11 Sep 14 |
nicklas |
menu.style.top = (y)+'px'; |
2652 |
11 Sep 14 |
nicklas |
event.stopPropagation(); |
2652 |
11 Sep 14 |
nicklas |
500 |
} |
2652 |
11 Sep 14 |
nicklas |
501 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.onPoolSelected = function(event) |
2652 |
11 Sep 14 |
nicklas |
503 |
{ |
2652 |
11 Sep 14 |
nicklas |
var optionId = event.target.id; |
2652 |
11 Sep 14 |
nicklas |
var pool = null; |
2652 |
11 Sep 14 |
nicklas |
var index = Data.int(event.target, 'index', -1); |
2652 |
11 Sep 14 |
nicklas |
if (index >= 0) |
2652 |
11 Sep 14 |
nicklas |
508 |
{ |
2652 |
11 Sep 14 |
nicklas |
pool = selectedPools[index]; |
2652 |
11 Sep 14 |
nicklas |
510 |
} |
2652 |
11 Sep 14 |
nicklas |
flowCells[currentFcNo].lanes[currentLaneNo].pool = pool; |
2652 |
11 Sep 14 |
nicklas |
flowcell.updateFlowCellsMatrix(); |
2652 |
11 Sep 14 |
nicklas |
513 |
} |
2796 |
13 Oct 14 |
nicklas |
514 |
|
2796 |
13 Oct 14 |
nicklas |
flowcell.hidePoolSelection = function() |
2796 |
13 Oct 14 |
nicklas |
516 |
{ |
2796 |
13 Oct 14 |
nicklas |
Doc.hide('select-pool'); |
2796 |
13 Oct 14 |
nicklas |
518 |
} |
2652 |
11 Sep 14 |
nicklas |
519 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.validateStep2 = function(event) |
2652 |
11 Sep 14 |
nicklas |
521 |
{ |
2652 |
11 Sep 14 |
nicklas |
var valid = flowCellsAreValid; |
2652 |
11 Sep 14 |
nicklas |
valid &= readIsValid['read1']; |
2652 |
11 Sep 14 |
nicklas |
valid &= readIsValid['indexRead']; |
2652 |
11 Sep 14 |
nicklas |
valid &= readIsValid['read2']; |
2652 |
11 Sep 14 |
nicklas |
526 |
|
2652 |
11 Sep 14 |
nicklas |
if (!valid) |
2652 |
11 Sep 14 |
nicklas |
528 |
{ |
2652 |
11 Sep 14 |
nicklas |
event.preventDefault(); |
2652 |
11 Sep 14 |
nicklas |
530 |
} |
2652 |
11 Sep 14 |
nicklas |
531 |
} |
2652 |
11 Sep 14 |
nicklas |
532 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.submit = function() |
2652 |
11 Sep 14 |
nicklas |
534 |
{ |
2652 |
11 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
3108 |
27 Jan 15 |
nicklas |
var volumeToUseFromPool = parseFloat(frm.volumeToUseFromPool.value); |
2652 |
11 Sep 14 |
nicklas |
537 |
|
2652 |
11 Sep 14 |
nicklas |
var submitInfo = {}; |
2652 |
11 Sep 14 |
nicklas |
submitInfo.flowCellType = frm.preset.value; |
2652 |
11 Sep 14 |
nicklas |
submitInfo.read1 = parseInt(frm.read1.value); |
2652 |
11 Sep 14 |
nicklas |
submitInfo.indexRead = parseInt(frm.indexRead.value); |
2652 |
11 Sep 14 |
nicklas |
submitInfo.read2 = parseInt(frm.read2.value); |
2652 |
11 Sep 14 |
nicklas |
submitInfo.flowCells = flowCells; |
2652 |
11 Sep 14 |
nicklas |
544 |
|
2652 |
11 Sep 14 |
nicklas |
// Calculate volume to use for each pool |
2652 |
11 Sep 14 |
nicklas |
for (var fcNo = 0; fcNo < flowCells.length; fcNo++) |
2652 |
11 Sep 14 |
nicklas |
547 |
{ |
2652 |
11 Sep 14 |
nicklas |
var flowCell = flowCells[fcNo]; |
2652 |
11 Sep 14 |
nicklas |
flowCell.comment = frm['comments.'+fcNo].value; |
2652 |
11 Sep 14 |
nicklas |
for (var laneNo = 0; laneNo < flowCell.lanes.length; laneNo++) |
2652 |
11 Sep 14 |
nicklas |
551 |
{ |
2652 |
11 Sep 14 |
nicklas |
var lane = flowCell.lanes[laneNo]; |
2652 |
11 Sep 14 |
nicklas |
lane.defaultPool = null; // Do not need to submit this information |
2652 |
11 Sep 14 |
nicklas |
var pool = lane.pool; |
2652 |
11 Sep 14 |
nicklas |
if (pool != null) |
2652 |
11 Sep 14 |
nicklas |
556 |
{ |
2652 |
11 Sep 14 |
nicklas |
pool.count = pool.count ? pool.count+1 : 1; |
2652 |
11 Sep 14 |
nicklas |
558 |
} |
2652 |
11 Sep 14 |
nicklas |
559 |
} |
2652 |
11 Sep 14 |
nicklas |
560 |
} |
2652 |
11 Sep 14 |
nicklas |
561 |
|
2652 |
11 Sep 14 |
nicklas |
for (var poolNo = 0; poolNo < selectedPools.length; poolNo++) |
2652 |
11 Sep 14 |
nicklas |
563 |
{ |
2652 |
11 Sep 14 |
nicklas |
var pool = selectedPools[poolNo]; |
2652 |
11 Sep 14 |
nicklas |
if (pool != null) |
2652 |
11 Sep 14 |
nicklas |
566 |
{ |
3108 |
27 Jan 15 |
nicklas |
pool.usedVolume = volumeToUseFromPool / pool.count; |
2652 |
11 Sep 14 |
nicklas |
568 |
} |
2652 |
11 Sep 14 |
nicklas |
569 |
} |
2652 |
11 Sep 14 |
nicklas |
570 |
|
2652 |
11 Sep 14 |
nicklas |
var url = '../FlowCell.servlet?ID='+App.getSessionId(); |
2652 |
11 Sep 14 |
nicklas |
url += '&cmd=CreateFlowCells'; |
2652 |
11 Sep 14 |
nicklas |
Wizard.showLoadingAnimation('Performing registration...'); |
2652 |
11 Sep 14 |
nicklas |
Wizard.asyncJsonRequest(url, flowcell.submissionResults, 'POST', JSON.stringify(submitInfo)); |
2652 |
11 Sep 14 |
nicklas |
575 |
} |
2652 |
11 Sep 14 |
nicklas |
576 |
|
2652 |
11 Sep 14 |
nicklas |
flowcell.submissionResults = function(response) |
2652 |
11 Sep 14 |
nicklas |
578 |
{ |
2652 |
11 Sep 14 |
nicklas |
Wizard.showFinalMessage(response.messages); |
2652 |
11 Sep 14 |
nicklas |
Doc.show('gorestart'); |
2652 |
11 Sep 14 |
nicklas |
581 |
} |
2652 |
11 Sep 14 |
nicklas |
582 |
|
2652 |
11 Sep 14 |
nicklas |
return flowcell; |
2652 |
11 Sep 14 |
nicklas |
584 |
}(); |
2652 |
11 Sep 14 |
nicklas |
585 |
|
2652 |
11 Sep 14 |
nicklas |
Doc.onLoad(FlowCell.initPage); |
2652 |
11 Sep 14 |
nicklas |
587 |
|