2662 |
12 Sep 14 |
nicklas |
var Protocol = function() |
2662 |
12 Sep 14 |
nicklas |
2 |
{ |
2662 |
12 Sep 14 |
nicklas |
var protocol = {}; |
2702 |
26 Sep 14 |
nicklas |
var debug = 0; |
2662 |
12 Sep 14 |
nicklas |
5 |
|
2662 |
12 Sep 14 |
nicklas |
var pools; |
2662 |
12 Sep 14 |
nicklas |
var libPlate; |
2662 |
12 Sep 14 |
nicklas |
8 |
|
2662 |
12 Sep 14 |
nicklas |
var POOL_CURRENT_SCHEMA; |
2662 |
12 Sep 14 |
nicklas |
var POOL_CURRENT_BARCODE_VARIANT; |
2662 |
12 Sep 14 |
nicklas |
11 |
|
2662 |
12 Sep 14 |
nicklas |
// Page initialization |
2662 |
12 Sep 14 |
nicklas |
protocol.initPage = function() |
2662 |
12 Sep 14 |
nicklas |
14 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pageId = Doc.getPageId(); |
2662 |
12 Sep 14 |
nicklas |
if (pageId == 'protocol') |
2662 |
12 Sep 14 |
nicklas |
17 |
{ |
2662 |
12 Sep 14 |
nicklas |
Buttons.addClickHandler('print-button', Wizard.goPrint); |
2662 |
12 Sep 14 |
nicklas |
protocol.initializeProtocol(); |
2662 |
12 Sep 14 |
nicklas |
20 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
22 |
{ |
2662 |
12 Sep 14 |
nicklas |
Events.addEventHandler('bioplate', 'change', protocol.bioplateOnChange); |
2662 |
12 Sep 14 |
nicklas |
Events.addEventHandler('listview', 'click', protocol.viewProtocol); |
2662 |
12 Sep 14 |
nicklas |
Events.addEventHandler('plateview', 'click', protocol.viewProtocol); |
2662 |
12 Sep 14 |
nicklas |
26 |
|
2662 |
12 Sep 14 |
nicklas |
var url = '../Pool.servlet?ID='+App.getSessionId(); |
2662 |
12 Sep 14 |
nicklas |
url += '&cmd=GetUnprocessedPools'; |
2662 |
12 Sep 14 |
nicklas |
Wizard.showLoadingAnimation('Loading pools...'); |
2662 |
12 Sep 14 |
nicklas |
Wizard.asyncJsonRequest(url, protocol.initializeStep1); |
2662 |
12 Sep 14 |
nicklas |
31 |
} |
2662 |
12 Sep 14 |
nicklas |
32 |
} |
2662 |
12 Sep 14 |
nicklas |
33 |
|
2662 |
12 Sep 14 |
nicklas |
34 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.initializeStep1 = function(response) |
2662 |
12 Sep 14 |
nicklas |
36 |
{ |
2662 |
12 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2662 |
12 Sep 14 |
nicklas |
pools = response.pools; |
2662 |
12 Sep 14 |
nicklas |
39 |
|
2662 |
12 Sep 14 |
nicklas |
// We get a list of pools from the servlet |
2662 |
12 Sep 14 |
nicklas |
// Each pool has a list of libraries |
2662 |
12 Sep 14 |
nicklas |
// We want to find the Library bioplates that are unique |
2662 |
12 Sep 14 |
nicklas |
// within a pool (eg. all libraries are from the same bioplate) |
2662 |
12 Sep 14 |
nicklas |
if (pools.length == 0) |
2662 |
12 Sep 14 |
nicklas |
45 |
{ |
2662 |
12 Sep 14 |
nicklas |
Wizard.setFatalError('No pools available for processing.'); |
2662 |
12 Sep 14 |
nicklas |
return; |
2662 |
12 Sep 14 |
nicklas |
48 |
} |
2662 |
12 Sep 14 |
nicklas |
49 |
|
2662 |
12 Sep 14 |
nicklas |
var poolsList = frm.pools; |
2662 |
12 Sep 14 |
nicklas |
var plateList = frm.bioplate; |
2662 |
12 Sep 14 |
nicklas |
var libPlates = []; |
2662 |
12 Sep 14 |
nicklas |
for (var poolNo=0; poolNo < pools.length; poolNo++) |
2662 |
12 Sep 14 |
nicklas |
54 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pool = pools[poolNo]; |
2662 |
12 Sep 14 |
nicklas |
56 |
|
2662 |
12 Sep 14 |
nicklas |
// Shortcut to single-plate pools |
2662 |
12 Sep 14 |
nicklas |
var libPlateForPool = pool.libPlates.length == 1 && !pool.isManual ? pool.libPlates[0] : null; |
2662 |
12 Sep 14 |
nicklas |
pool.libPlate = libPlateForPool; |
2662 |
12 Sep 14 |
nicklas |
60 |
|
2662 |
12 Sep 14 |
nicklas |
// If the pool has a single library bioplate add it to the selection list |
2662 |
12 Sep 14 |
nicklas |
// If the pool doesn't have a single library bioplate, nothing is added to |
2662 |
12 Sep 14 |
nicklas |
// the list and the pool can only be selected when the 'manual pools' option is |
2662 |
12 Sep 14 |
nicklas |
// active for the bioplates list |
2662 |
12 Sep 14 |
nicklas |
if (libPlateForPool != null && !libPlates[libPlateForPool.name]) |
2662 |
12 Sep 14 |
nicklas |
66 |
{ |
2662 |
12 Sep 14 |
nicklas |
libPlates[libPlateForPool.name] = libPlateForPool; |
2662 |
12 Sep 14 |
nicklas |
var plateOption = new Option(libPlateForPool.name, libPlateForPool.id); |
2662 |
12 Sep 14 |
nicklas |
plateOption.plate = libPlateForPool; |
2662 |
12 Sep 14 |
nicklas |
plateList[plateList.length] = plateOption; |
2662 |
12 Sep 14 |
nicklas |
71 |
} |
2662 |
12 Sep 14 |
nicklas |
72 |
|
2662 |
12 Sep 14 |
nicklas |
73 |
} |
2662 |
12 Sep 14 |
nicklas |
if (plateList.length > 1) plateList.selectedIndex = 1; |
2662 |
12 Sep 14 |
nicklas |
75 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.bioplateOnChange(); |
2662 |
12 Sep 14 |
nicklas |
Doc.show('step-1'); |
2662 |
12 Sep 14 |
nicklas |
Doc.show('gonext'); |
2662 |
12 Sep 14 |
nicklas |
79 |
} |
2662 |
12 Sep 14 |
nicklas |
80 |
|
2662 |
12 Sep 14 |
nicklas |
81 |
|
2662 |
12 Sep 14 |
nicklas |
// Add pools to the pools list based on the bioplate selection |
2662 |
12 Sep 14 |
nicklas |
protocol.bioplateOnChange = function() |
2662 |
12 Sep 14 |
nicklas |
84 |
{ |
2662 |
12 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2662 |
12 Sep 14 |
nicklas |
86 |
|
2662 |
12 Sep 14 |
nicklas |
var libPlateId = parseInt(frm.bioplate.value); |
2662 |
12 Sep 14 |
nicklas |
88 |
|
2662 |
12 Sep 14 |
nicklas |
// Clear current list |
2662 |
12 Sep 14 |
nicklas |
frm.pools.length = 0; |
2662 |
12 Sep 14 |
nicklas |
91 |
|
2662 |
12 Sep 14 |
nicklas |
for (var poolNo = 0; poolNo < pools.length; poolNo++) |
2662 |
12 Sep 14 |
nicklas |
93 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pool = pools[poolNo]; |
2662 |
12 Sep 14 |
nicklas |
// If a libplate is selected, only show pools that have all libraries from that plate |
2662 |
12 Sep 14 |
nicklas |
// If no libplate is selected, only show pools that have libraries from multiple plates |
2662 |
12 Sep 14 |
nicklas |
var addPool = (libPlateId && pool.libPlate && pool.libPlate.id == libPlateId) || (!libPlateId && pool.libPlate == null); |
2662 |
12 Sep 14 |
nicklas |
if (addPool) |
2662 |
12 Sep 14 |
nicklas |
99 |
{ |
2662 |
12 Sep 14 |
nicklas |
var name = pool.name; |
2662 |
12 Sep 14 |
nicklas |
if (pool.libPlate == null) |
2662 |
12 Sep 14 |
nicklas |
102 |
{ |
2662 |
12 Sep 14 |
nicklas |
103 |
|
2662 |
12 Sep 14 |
nicklas |
name += ' - '; |
2662 |
12 Sep 14 |
nicklas |
var numPlates = pool.libPlates.length; |
2662 |
12 Sep 14 |
nicklas |
var title = ''; |
2662 |
12 Sep 14 |
nicklas |
if (numPlates <= 2) |
2662 |
12 Sep 14 |
nicklas |
108 |
{ |
2662 |
12 Sep 14 |
nicklas |
for (var plateNo=0; plateNo < numPlates; plateNo++) |
2662 |
12 Sep 14 |
nicklas |
110 |
{ |
2662 |
12 Sep 14 |
nicklas |
var libPlate = pool.libPlates[plateNo]; |
2662 |
12 Sep 14 |
nicklas |
if (plateNo > 0) name += ', '; |
2662 |
12 Sep 14 |
nicklas |
name += libPlate.name; |
2662 |
12 Sep 14 |
nicklas |
114 |
} |
2662 |
12 Sep 14 |
nicklas |
115 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
117 |
{ |
2662 |
12 Sep 14 |
nicklas |
name += pool.libPlates[0].name + ' + ' + (numPlates-1) + ' more...'; |
2662 |
12 Sep 14 |
nicklas |
for (var plateNo=0; plateNo < numPlates; plateNo++) |
2662 |
12 Sep 14 |
nicklas |
120 |
{ |
2662 |
12 Sep 14 |
nicklas |
var libPlate = pool.libPlates[plateNo]; |
2662 |
12 Sep 14 |
nicklas |
if (plateNo > 0) title += ', '; |
2662 |
12 Sep 14 |
nicklas |
title += libPlate.name; |
2662 |
12 Sep 14 |
nicklas |
124 |
} |
2662 |
12 Sep 14 |
nicklas |
125 |
} |
2662 |
12 Sep 14 |
nicklas |
126 |
} |
2662 |
12 Sep 14 |
nicklas |
127 |
|
4583 |
21 Sep 17 |
nicklas |
var option = new Option(name, pool.id, false, libPlateId || frm.pools.length == 0); |
2662 |
12 Sep 14 |
nicklas |
option.pool = pool; |
2662 |
12 Sep 14 |
nicklas |
frm.pools[frm.pools.length] = option; |
2662 |
12 Sep 14 |
nicklas |
131 |
} |
2662 |
12 Sep 14 |
nicklas |
132 |
} |
2662 |
12 Sep 14 |
nicklas |
133 |
|
2662 |
12 Sep 14 |
nicklas |
Wizard.setInputStatus('pools'); |
2662 |
12 Sep 14 |
nicklas |
if (libPlateId) |
2662 |
12 Sep 14 |
nicklas |
136 |
{ |
2662 |
12 Sep 14 |
nicklas |
frm.pools.disabled = true; |
2662 |
12 Sep 14 |
nicklas |
Doc.removeClass('plateview', 'disabled'); |
2662 |
12 Sep 14 |
nicklas |
139 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
141 |
{ |
2662 |
12 Sep 14 |
nicklas |
frm.pools.disabled = false; |
2662 |
12 Sep 14 |
nicklas |
Doc.addClass('plateview', 'disabled'); |
2662 |
12 Sep 14 |
nicklas |
144 |
} |
2662 |
12 Sep 14 |
nicklas |
145 |
} |
2662 |
12 Sep 14 |
nicklas |
146 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.viewProtocol = function(event) |
2662 |
12 Sep 14 |
nicklas |
148 |
{ |
2662 |
12 Sep 14 |
nicklas |
if (event.currentTarget.className.indexOf('disabled')>=0) return; |
2662 |
12 Sep 14 |
nicklas |
150 |
|
2662 |
12 Sep 14 |
nicklas |
var frm = document.forms['reggie']; |
2662 |
12 Sep 14 |
nicklas |
var libPlateId = parseInt(frm.bioplate.value); |
2662 |
12 Sep 14 |
nicklas |
153 |
|
2662 |
12 Sep 14 |
nicklas |
if (libPlateId == 0) |
2662 |
12 Sep 14 |
nicklas |
155 |
{ |
2662 |
12 Sep 14 |
nicklas |
// 'manual' option selected, check that at least one pool is selected |
2662 |
12 Sep 14 |
nicklas |
var numSelectedPools = 0; |
2662 |
12 Sep 14 |
nicklas |
for (var poolNo = 0; poolNo < frm.pools.length; poolNo++) |
2662 |
12 Sep 14 |
nicklas |
159 |
{ |
2662 |
12 Sep 14 |
nicklas |
if (frm.pools[poolNo].selected) numSelectedPools++; |
2662 |
12 Sep 14 |
nicklas |
161 |
} |
2662 |
12 Sep 14 |
nicklas |
162 |
|
2662 |
12 Sep 14 |
nicklas |
if (numSelectedPools == 0) |
2662 |
12 Sep 14 |
nicklas |
164 |
{ |
2662 |
12 Sep 14 |
nicklas |
Wizard.setInputStatus('pools', 'invalid', 'Select at least one pool'); |
2662 |
12 Sep 14 |
nicklas |
Wizard.notifyError(); |
2662 |
12 Sep 14 |
nicklas |
return; |
2662 |
12 Sep 14 |
nicklas |
168 |
} |
2662 |
12 Sep 14 |
nicklas |
Wizard.setInputStatus('pools', 'valid'); |
2662 |
12 Sep 14 |
nicklas |
170 |
} |
2662 |
12 Sep 14 |
nicklas |
171 |
|
2662 |
12 Sep 14 |
nicklas |
var type = Data.get(event.currentTarget, 'protocol-type'); |
2662 |
12 Sep 14 |
nicklas |
frm.pools.disabled = false; |
2662 |
12 Sep 14 |
nicklas |
frm.view.value = type; |
2662 |
12 Sep 14 |
nicklas |
frm.submit(); |
2662 |
12 Sep 14 |
nicklas |
frm.pools.disabled = (libPlateId != 0); |
2662 |
12 Sep 14 |
nicklas |
177 |
} |
2662 |
12 Sep 14 |
nicklas |
178 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.loadLibPlate = function() |
2662 |
12 Sep 14 |
nicklas |
180 |
{ |
2662 |
12 Sep 14 |
nicklas |
var libPlateId = Data.get('page-data', 'libplate'); |
2662 |
12 Sep 14 |
nicklas |
var url = '../Pool.servlet?ID='+App.getSessionId(); |
2662 |
12 Sep 14 |
nicklas |
url += '&cmd=GetLibPlateInfo&bioplate='+libPlateId; |
2662 |
12 Sep 14 |
nicklas |
Wizard.showLoadingAnimation('Loading library bioplate information...'); |
2662 |
12 Sep 14 |
nicklas |
Wizard.asyncJsonRequest(url, protocol.initializeProtocol); |
2662 |
12 Sep 14 |
nicklas |
186 |
} |
2662 |
12 Sep 14 |
nicklas |
187 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.loadPools = function() |
2662 |
12 Sep 14 |
nicklas |
189 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pools = Data.get('page-data', 'pools'); |
2662 |
12 Sep 14 |
nicklas |
var libPlateId = Data.get('page-data', 'libplate'); |
2662 |
12 Sep 14 |
nicklas |
192 |
|
2662 |
12 Sep 14 |
nicklas |
var url = '../Pool.servlet?ID='+App.getSessionId(); |
2662 |
12 Sep 14 |
nicklas |
url += '&cmd=GetLibraryInfoForPools&pools='+pools+'&bioplate='+libPlateId; |
2662 |
12 Sep 14 |
nicklas |
195 |
|
2662 |
12 Sep 14 |
nicklas |
Wizard.showLoadingAnimation('Loading pooled library information...'); |
2662 |
12 Sep 14 |
nicklas |
Wizard.asyncJsonRequest(url, protocol.initializeProtocol); |
2662 |
12 Sep 14 |
nicklas |
198 |
} |
2662 |
12 Sep 14 |
nicklas |
199 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.initializeProtocol = function(response) |
2662 |
12 Sep 14 |
nicklas |
201 |
{ |
2662 |
12 Sep 14 |
nicklas |
var libPlateId = Data.int('page-data', 'libplate'); |
2662 |
12 Sep 14 |
nicklas |
var view = Data.get('page-data', 'view'); |
2662 |
12 Sep 14 |
nicklas |
204 |
|
2662 |
12 Sep 14 |
nicklas |
if (!response) |
2662 |
12 Sep 14 |
nicklas |
206 |
{ |
2662 |
12 Sep 14 |
nicklas |
if (libPlateId) |
2662 |
12 Sep 14 |
nicklas |
208 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.loadLibPlate(libPlateId); |
2662 |
12 Sep 14 |
nicklas |
210 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
212 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.loadPools(); |
2662 |
12 Sep 14 |
nicklas |
214 |
} |
2662 |
12 Sep 14 |
nicklas |
return; |
2662 |
12 Sep 14 |
nicklas |
216 |
} |
2662 |
12 Sep 14 |
nicklas |
else if (response.libPlate) |
2662 |
12 Sep 14 |
nicklas |
218 |
{ |
2662 |
12 Sep 14 |
nicklas |
libPlate = response.libPlate; |
2662 |
12 Sep 14 |
nicklas |
POOL_CURRENT_SCHEMA = PoolSchema.getById(libPlate.poolSchema); |
2662 |
12 Sep 14 |
nicklas |
POOL_CURRENT_BARCODE_VARIANT = PoolSchema.getBarcodeVariantByName(POOL_CURRENT_SCHEMA, libPlate.barcodeVariant); |
2662 |
12 Sep 14 |
nicklas |
protocol.loadPools(); |
2662 |
12 Sep 14 |
nicklas |
return; |
2662 |
12 Sep 14 |
nicklas |
224 |
} |
2662 |
12 Sep 14 |
nicklas |
225 |
|
2662 |
12 Sep 14 |
nicklas |
pools = response.pools; |
2662 |
12 Sep 14 |
nicklas |
var poolInfo = response.poolInfo; |
2662 |
12 Sep 14 |
nicklas |
228 |
|
2662 |
12 Sep 14 |
nicklas |
var pageTitle = 'Lab protocol for pooling '; |
2662 |
12 Sep 14 |
nicklas |
// Pre-process the Library items |
2662 |
12 Sep 14 |
nicklas |
for (var i = 0; i < pools.length; i++) |
2662 |
12 Sep 14 |
nicklas |
232 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pool = pools[i]; |
2662 |
12 Sep 14 |
nicklas |
if (i > 0) pageTitle += ', ' |
2662 |
12 Sep 14 |
nicklas |
pageTitle += ' ' + pool.name; |
2662 |
12 Sep 14 |
nicklas |
236 |
|
2662 |
12 Sep 14 |
nicklas |
// Calculate some pool quantities |
2662 |
12 Sep 14 |
nicklas |
pool.volume = 1000 * pool.originalQuantity / pool.conc; |
2662 |
12 Sep 14 |
nicklas |
239 |
|
2662 |
12 Sep 14 |
nicklas |
for (var libNo = 0; libNo < pool.libraries.length; libNo++) |
2662 |
12 Sep 14 |
nicklas |
241 |
{ |
2662 |
12 Sep 14 |
nicklas |
var lib = pool.libraries[libNo]; |
2662 |
12 Sep 14 |
nicklas |
PoolMix.calculateLibVolumeForProtocol(lib, pool.targetPoolMolarity, pool.targetVolumePerLib, pool.mixingStrategy, true); |
2662 |
12 Sep 14 |
nicklas |
PoolMix.calculateEbVolume(lib, pool.targetPoolMolarity, pool.targetVolumePerLib, pool.mixingStrategy); |
2662 |
12 Sep 14 |
nicklas |
protocol.checkAndPreProcessLibrary(lib, pool, POOL_CURRENT_SCHEMA, POOL_CURRENT_BARCODE_VARIANT, view); |
2662 |
12 Sep 14 |
nicklas |
246 |
} |
2662 |
12 Sep 14 |
nicklas |
247 |
|
2662 |
12 Sep 14 |
nicklas |
pool.extra = PoolMix.calculateFinalPoolInfo(pool.libraries, pool.targetPoolMolarity, pool.targetVolumePerLib, pool.mixingStrategy); |
2662 |
12 Sep 14 |
nicklas |
249 |
} |
2662 |
12 Sep 14 |
nicklas |
250 |
|
2662 |
12 Sep 14 |
nicklas |
if (!libPlate) |
2662 |
12 Sep 14 |
nicklas |
252 |
{ |
2662 |
12 Sep 14 |
nicklas |
document.title = pageTitle; |
2662 |
12 Sep 14 |
nicklas |
254 |
} |
2662 |
12 Sep 14 |
nicklas |
255 |
|
2662 |
12 Sep 14 |
nicklas |
if (view == 'list') |
2662 |
12 Sep 14 |
nicklas |
257 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.viewAsList(pools, POOL_CURRENT_SCHEMA, POOL_CURRENT_BARCODE_VARIANT); |
2662 |
12 Sep 14 |
nicklas |
259 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
261 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.viewAsPlate(pools, POOL_CURRENT_SCHEMA, POOL_CURRENT_BARCODE_VARIANT); |
2662 |
12 Sep 14 |
nicklas |
263 |
} |
2662 |
12 Sep 14 |
nicklas |
264 |
|
2662 |
12 Sep 14 |
nicklas |
265 |
} |
2662 |
12 Sep 14 |
nicklas |
266 |
|
2662 |
12 Sep 14 |
nicklas |
267 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.checkAndPreProcessLibrary = function(lib, pool, schema, barcodeVariant, view) |
2662 |
12 Sep 14 |
nicklas |
269 |
{ |
2662 |
12 Sep 14 |
nicklas |
var well = lib.bioWell; |
2662 |
12 Sep 14 |
nicklas |
var remarks = []; |
2662 |
12 Sep 14 |
nicklas |
272 |
|
3762 |
19 Feb 16 |
nicklas |
lib.isYellow = lib.specimen && lib.specimen.YellowLabel != null; |
3762 |
19 Feb 16 |
nicklas |
274 |
|
2662 |
12 Sep 14 |
nicklas |
// Check if default barcode has been modified |
2662 |
12 Sep 14 |
nicklas |
if (barcodeVariant) |
2662 |
12 Sep 14 |
nicklas |
277 |
{ |
2662 |
12 Sep 14 |
nicklas |
var indexSet = barcodeVariant.indexSets[well.column]; |
2662 |
12 Sep 14 |
nicklas |
if (indexSet) |
2662 |
12 Sep 14 |
nicklas |
280 |
{ |
2662 |
12 Sep 14 |
nicklas |
var defaultBarcode = indexSet.barcodes[well.row]; |
2662 |
12 Sep 14 |
nicklas |
if (defaultBarcode && lib.barcode.name != defaultBarcode) |
2662 |
12 Sep 14 |
nicklas |
283 |
{ |
2662 |
12 Sep 14 |
nicklas |
remarks[remarks.length] = 'Modified barcode'; |
2662 |
12 Sep 14 |
nicklas |
lib.barcode.modified = true; |
2662 |
12 Sep 14 |
nicklas |
286 |
} |
2662 |
12 Sep 14 |
nicklas |
287 |
} |
2662 |
12 Sep 14 |
nicklas |
288 |
} |
2662 |
12 Sep 14 |
nicklas |
289 |
|
2662 |
12 Sep 14 |
nicklas |
if (lib.molarity) |
2662 |
12 Sep 14 |
nicklas |
291 |
{ |
2662 |
12 Sep 14 |
nicklas |
if (lib.speedVacConc != null) |
2662 |
12 Sep 14 |
nicklas |
293 |
{ |
2662 |
12 Sep 14 |
nicklas |
remarks[remarks.length] = 'SpeedVac'; |
2662 |
12 Sep 14 |
nicklas |
295 |
} |
2662 |
12 Sep 14 |
nicklas |
296 |
|
2662 |
12 Sep 14 |
nicklas |
if (lib.mixFactor > 1) |
2662 |
12 Sep 14 |
nicklas |
298 |
{ |
2662 |
12 Sep 14 |
nicklas |
// Larger mix than default |
2662 |
12 Sep 14 |
nicklas |
if (view != 'plate') |
2662 |
12 Sep 14 |
nicklas |
301 |
{ |
2662 |
12 Sep 14 |
nicklas |
remarks[remarks.length] = '<span class="mix-remark">Mix <span class="volume">'+Numbers.formatNumber(lib.actualVolume*lib.mixFactor, 1) + '</span>+<span class="eb">' + Numbers.formatNumber(lib.actualEb*lib.mixFactor, 1)+'µl</span></span>'; |
2662 |
12 Sep 14 |
nicklas |
303 |
} |
2662 |
12 Sep 14 |
nicklas |
remarks[remarks.length] = 'Use <b>' + Numbers.formatNumber(lib.actualVolume+lib.actualEb, 1) + 'µl</b> in pool'; |
2662 |
12 Sep 14 |
nicklas |
305 |
} |
2662 |
12 Sep 14 |
nicklas |
306 |
|
2662 |
12 Sep 14 |
nicklas |
lib.remarks = remarks; |
2662 |
12 Sep 14 |
nicklas |
308 |
} |
2662 |
12 Sep 14 |
nicklas |
309 |
|
2662 |
12 Sep 14 |
nicklas |
if (lib.comment) remarks[remarks.length] = lib.comment; |
2662 |
12 Sep 14 |
nicklas |
311 |
} |
2662 |
12 Sep 14 |
nicklas |
312 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.viewAsPlate = function(pools, schema, barcodeVariant) |
3310 |
07 May 15 |
nicklas |
314 |
{ |
3310 |
07 May 15 |
nicklas |
var columns = libPlate.columns; |
3310 |
07 May 15 |
nicklas |
var rows = libPlate.rows; |
3310 |
07 May 15 |
nicklas |
317 |
|
3310 |
07 May 15 |
nicklas |
var html = '<tr id="pool-row"></tr>'; |
3310 |
07 May 15 |
nicklas |
html += '<tr class="header">'; |
3310 |
07 May 15 |
nicklas |
html += '<th></th>'; |
3310 |
07 May 15 |
nicklas |
for (var c = 0; c < columns; c++) |
3310 |
07 May 15 |
nicklas |
322 |
{ |
3310 |
07 May 15 |
nicklas |
html += '<th id="col.'+c+'">'+(c+1)+'</th>'; |
3310 |
07 May 15 |
nicklas |
324 |
} |
3310 |
07 May 15 |
nicklas |
html += '</tr>'; |
3310 |
07 May 15 |
nicklas |
html += '<tbody>'; |
3310 |
07 May 15 |
nicklas |
327 |
|
3310 |
07 May 15 |
nicklas |
for (var r = 0; r < rows; r++) |
3310 |
07 May 15 |
nicklas |
329 |
{ |
3310 |
07 May 15 |
nicklas |
html += '<tr class="row-'+r+'">'; |
5883 |
26 Mar 20 |
nicklas |
html += '<th id="row.'+r+'" class="rowheader">'+(Reggie.wellToAlpha(r))+'</th>'; |
3310 |
07 May 15 |
nicklas |
332 |
|
3310 |
07 May 15 |
nicklas |
for (var c = 0; c < columns; c++) |
3310 |
07 May 15 |
nicklas |
334 |
{ |
3310 |
07 May 15 |
nicklas |
html += '<td class="well col-'+c+'" id="well.'+r+'.'+c+'"'; |
3310 |
07 May 15 |
nicklas |
html += ' data-col="'+c+'" data-row="'+r+'"'; |
3310 |
07 May 15 |
nicklas |
html += ' title="Select/deselect this well"></td>'; |
3310 |
07 May 15 |
nicklas |
338 |
} |
3310 |
07 May 15 |
nicklas |
html += '</tr>'; |
3310 |
07 May 15 |
nicklas |
340 |
} |
3310 |
07 May 15 |
nicklas |
html += '</tbody>'; |
3310 |
07 May 15 |
nicklas |
Doc.element('plateview').innerHTML = html; |
3310 |
07 May 15 |
nicklas |
343 |
|
3310 |
07 May 15 |
nicklas |
Plate.init(rows, columns, schema, WellPainter); |
3310 |
07 May 15 |
nicklas |
345 |
|
2662 |
12 Sep 14 |
nicklas |
for (var poolNo = 0; poolNo < pools.length; poolNo++) |
2662 |
12 Sep 14 |
nicklas |
347 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pool = pools[poolNo]; |
2662 |
12 Sep 14 |
nicklas |
for (var libNo = 0; libNo < pool.libraries.length; libNo++) |
2662 |
12 Sep 14 |
nicklas |
350 |
{ |
2662 |
12 Sep 14 |
nicklas |
var lib = pool.libraries[libNo]; |
2662 |
12 Sep 14 |
nicklas |
var well = lib.bioWell; |
2662 |
12 Sep 14 |
nicklas |
Plate.getWell(well.row, well.column).setExtract(lib); |
2662 |
12 Sep 14 |
nicklas |
354 |
} |
2662 |
12 Sep 14 |
nicklas |
355 |
} |
2662 |
12 Sep 14 |
nicklas |
356 |
|
2662 |
12 Sep 14 |
nicklas |
WellPainter.barcodeVariant = barcodeVariant; |
5883 |
26 Mar 20 |
nicklas |
PoolSchema.buildPoolTableRow(schema, libPlate.columns, false, null, null); |
2662 |
12 Sep 14 |
nicklas |
359 |
|
2662 |
12 Sep 14 |
nicklas |
Doc.show('all-protocol'); |
2662 |
12 Sep 14 |
nicklas |
361 |
|
2662 |
12 Sep 14 |
nicklas |
for (var poolNo = 0; poolNo < pools.length; poolNo++) |
2662 |
12 Sep 14 |
nicklas |
363 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pool = pools[poolNo]; |
2662 |
12 Sep 14 |
nicklas |
var realPoolNo = schema.getPoolNumForColumn(pool.libraries[0].bioWell.column); |
2662 |
12 Sep 14 |
nicklas |
366 |
|
2662 |
12 Sep 14 |
nicklas |
var poolData = '<div class="pool-data">'; |
2662 |
12 Sep 14 |
nicklas |
poolData += pool.libraries.length + ' libs • '; |
2662 |
12 Sep 14 |
nicklas |
poolData += Numbers.formatNumber(pool.molarity, 2)+'nM • '; |
2662 |
12 Sep 14 |
nicklas |
poolData += Numbers.formatNumber(pool.volume, 1) + 'µl'; |
2662 |
12 Sep 14 |
nicklas |
if (pool.mixingStrategy == 'dynamic') |
2662 |
12 Sep 14 |
nicklas |
372 |
{ |
2662 |
12 Sep 14 |
nicklas |
poolData += ' • <span class="pool-eb">'+Numbers.formatNumber(pool.extra.ebVolumeExtra, 1, 'µl')+'</span>'; |
2662 |
12 Sep 14 |
nicklas |
374 |
} |
2662 |
12 Sep 14 |
nicklas |
poolData += '<br>Mixing strategy: ' + pool.mixingStrategy; |
2662 |
12 Sep 14 |
nicklas |
poolData += '<div class="comments">'+pool.comments+'</div>'; |
2662 |
12 Sep 14 |
nicklas |
poolData += '</div>'; |
2662 |
12 Sep 14 |
nicklas |
378 |
|
2662 |
12 Sep 14 |
nicklas |
Doc.element('pool.'+realPoolNo).innerHTML = Strings.encodeTags(pool.name) + poolData; |
2662 |
12 Sep 14 |
nicklas |
380 |
} |
3762 |
19 Feb 16 |
nicklas |
Plate.paint(Plate.getWells()); |
2662 |
12 Sep 14 |
nicklas |
382 |
} |
2662 |
12 Sep 14 |
nicklas |
383 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.viewAsList = function(pools, schema, barcodeVariant) |
2662 |
12 Sep 14 |
nicklas |
385 |
{ |
3310 |
07 May 15 |
nicklas |
if (libPlate) |
3310 |
07 May 15 |
nicklas |
387 |
{ |
3310 |
07 May 15 |
nicklas |
Plate.init(libPlate.rows, libPlate.columns, schema, null); |
3310 |
07 May 15 |
nicklas |
389 |
} |
3762 |
19 Feb 16 |
nicklas |
var homeUrl = Data.get('page-data', 'home-url'); |
3762 |
19 Feb 16 |
nicklas |
var yellowImg = '<img src="'+homeUrl+'/images/yellow-label-small.png">'; |
2662 |
12 Sep 14 |
nicklas |
for (var poolNo = 0; poolNo < pools.length; poolNo++) |
2662 |
12 Sep 14 |
nicklas |
393 |
{ |
2662 |
12 Sep 14 |
nicklas |
var pool = pools[poolNo]; |
2662 |
12 Sep 14 |
nicklas |
var wellsInPool = null; |
2662 |
12 Sep 14 |
nicklas |
if (schema) |
2662 |
12 Sep 14 |
nicklas |
397 |
{ |
2662 |
12 Sep 14 |
nicklas |
var realPoolNo = schema.getPoolNumForColumn(pool.libraries[0].bioWell.column); |
2662 |
12 Sep 14 |
nicklas |
wellsInPool = Plate.getPool(realPoolNo); |
2662 |
12 Sep 14 |
nicklas |
400 |
} |
2662 |
12 Sep 14 |
nicklas |
401 |
|
2662 |
12 Sep 14 |
nicklas |
var html = ''; |
2662 |
12 Sep 14 |
nicklas |
var tbody = Doc.element('listview.'+pool.id+'.body'); |
2662 |
12 Sep 14 |
nicklas |
404 |
|
2662 |
12 Sep 14 |
nicklas |
var wellIndex = 0; |
2662 |
12 Sep 14 |
nicklas |
for (var j = 0; j < pool.libraries.length; j++) |
2662 |
12 Sep 14 |
nicklas |
407 |
{ |
2662 |
12 Sep 14 |
nicklas |
var lib = pool.libraries[j]; |
2662 |
12 Sep 14 |
nicklas |
var well = lib.bioWell; |
2662 |
12 Sep 14 |
nicklas |
410 |
|
2662 |
12 Sep 14 |
nicklas |
var tr = document.createElement('tr'); |
2662 |
12 Sep 14 |
nicklas |
if (schema) |
2662 |
12 Sep 14 |
nicklas |
413 |
{ |
2662 |
12 Sep 14 |
nicklas |
wellIndex = protocol.createMissingRows(tbody, wellsInPool, wellIndex, well, barcodeVariant); |
2662 |
12 Sep 14 |
nicklas |
tr.className = well.column % 2 == 0 ? "evencol" : "oddcol"; |
2662 |
12 Sep 14 |
nicklas |
416 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
418 |
{ |
2662 |
12 Sep 14 |
nicklas |
tr.className = 'evencol'; |
2662 |
12 Sep 14 |
nicklas |
420 |
} |
2662 |
12 Sep 14 |
nicklas |
421 |
|
2662 |
12 Sep 14 |
nicklas |
if (barcodeVariant) |
2662 |
12 Sep 14 |
nicklas |
423 |
{ |
2662 |
12 Sep 14 |
nicklas |
var indexSet = barcodeVariant.indexSets[well.column]; |
2662 |
12 Sep 14 |
nicklas |
if (indexSet) |
2662 |
12 Sep 14 |
nicklas |
426 |
{ |
2662 |
12 Sep 14 |
nicklas |
tr.className = lib && lib.barcode.modified ? 'bg-modified' : indexSet.color; |
2662 |
12 Sep 14 |
nicklas |
428 |
} |
2662 |
12 Sep 14 |
nicklas |
429 |
} |
3762 |
19 Feb 16 |
nicklas |
var img = ''; |
3762 |
19 Feb 16 |
nicklas |
if (lib.isYellow) |
3762 |
19 Feb 16 |
nicklas |
432 |
{ |
3762 |
19 Feb 16 |
nicklas |
tr.className += ' yellow-specimen'; |
3762 |
19 Feb 16 |
nicklas |
img = yellowImg; |
3762 |
19 Feb 16 |
nicklas |
435 |
} |
3762 |
19 Feb 16 |
nicklas |
436 |
|
3762 |
19 Feb 16 |
nicklas |
protocol.addColumn(tr, 'lib if-yellow', img+Strings.encodeTags(lib.name)); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'remain', Numbers.formatNumber((lib.remainingVolume), 1)); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'molarity', Numbers.formatNumber(lib.molarity, 2)); |
2662 |
12 Sep 14 |
nicklas |
if (!libPlate) |
2662 |
12 Sep 14 |
nicklas |
441 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'workplate', Strings.encodeTags(well.bioPlate.name + ' ' + well.location)); |
2662 |
12 Sep 14 |
nicklas |
443 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
445 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'workplate', Strings.encodeTags(well.location)); |
2662 |
12 Sep 14 |
nicklas |
447 |
} |
2662 |
12 Sep 14 |
nicklas |
var mixFactor = lib.mixFactor || 1.0; |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'volume', mixFactor > 1.0 ? '—' : Numbers.formatNumber(lib.actualVolume, 1)); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'eb', pool.mixingStrategy == 'dynamic' || mixFactor > 1.0 ? '—' : Numbers.formatNumber(lib.actualEb, 1)); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, "remarks", lib.remarks.join('; ')); |
2662 |
12 Sep 14 |
nicklas |
tbody.appendChild(tr); |
2662 |
12 Sep 14 |
nicklas |
453 |
} |
2837 |
20 Oct 14 |
nicklas |
if (schema && wellIndex < wellsInPool.length) |
2662 |
12 Sep 14 |
nicklas |
455 |
{ |
2662 |
12 Sep 14 |
nicklas |
protocol.createMissingRows(tbody, wellsInPool, wellIndex, null, barcodeVariant); |
2662 |
12 Sep 14 |
nicklas |
457 |
} |
2662 |
12 Sep 14 |
nicklas |
458 |
|
2662 |
12 Sep 14 |
nicklas |
var poolData = '<div class="pool-data">'; |
2662 |
12 Sep 14 |
nicklas |
poolData += pool.libraries.length + ' libs; '; |
2662 |
12 Sep 14 |
nicklas |
poolData += Numbers.formatNumber(pool.molarity, 2)+'nM; '; |
2662 |
12 Sep 14 |
nicklas |
poolData += Numbers.formatNumber(pool.volume, 1) + 'µl'; |
2662 |
12 Sep 14 |
nicklas |
poolData += '<br>Mixing strategy: ' + pool.mixingStrategy; |
2662 |
12 Sep 14 |
nicklas |
poolData += '</div>'; |
2662 |
12 Sep 14 |
nicklas |
Doc.element('molarity.'+pool.id).innerHTML = poolData; |
2662 |
12 Sep 14 |
nicklas |
Doc.element('eb-volume.'+pool.id).innerHTML = Numbers.formatNumber(Math.max(0, pool.extra.ebVolumeExtra), 1); |
2662 |
12 Sep 14 |
nicklas |
Doc.show('pool.'+pool.id); |
2662 |
12 Sep 14 |
nicklas |
468 |
} |
2662 |
12 Sep 14 |
nicklas |
469 |
|
2662 |
12 Sep 14 |
nicklas |
Doc.show('all-protocol'); |
2662 |
12 Sep 14 |
nicklas |
471 |
} |
2662 |
12 Sep 14 |
nicklas |
472 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.createMissingRows = function(table, wellsInPool, wellIndex, well, barcodeVariant) |
2662 |
12 Sep 14 |
nicklas |
474 |
{ |
2662 |
12 Sep 14 |
nicklas |
var wellAtIndex = wellsInPool[wellIndex]; // Empty?? |
2662 |
12 Sep 14 |
nicklas |
if (!well) well = {'row': -1, 'column': -1}; |
2662 |
12 Sep 14 |
nicklas |
while (wellAtIndex.row != well.row || wellAtIndex.column != well.column) |
2662 |
12 Sep 14 |
nicklas |
478 |
{ |
2662 |
12 Sep 14 |
nicklas |
var tr = document.createElement('tr'); |
2662 |
12 Sep 14 |
nicklas |
tr.className = 'empty'; |
2662 |
12 Sep 14 |
nicklas |
if (barcodeVariant) |
2662 |
12 Sep 14 |
nicklas |
482 |
{ |
2662 |
12 Sep 14 |
nicklas |
var indexSet = barcodeVariant.indexSets[wellAtIndex.column]; |
2662 |
12 Sep 14 |
nicklas |
if (indexSet) tr.className += ' ' + indexSet.color; |
2662 |
12 Sep 14 |
nicklas |
485 |
} |
2662 |
12 Sep 14 |
nicklas |
486 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'lib', 'not pooled'); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'remain', ''); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'molarity', ''); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'workplate', Reggie.wellToAlpha(wellAtIndex.row) + (wellAtIndex.column+1)); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'volume', ''); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'eb', ''); |
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn(tr, 'remarks', ''); |
2662 |
12 Sep 14 |
nicklas |
table.appendChild(tr); |
2662 |
12 Sep 14 |
nicklas |
wellIndex++; |
2662 |
12 Sep 14 |
nicklas |
if (wellIndex >= wellsInPool.length) break; |
2662 |
12 Sep 14 |
nicklas |
wellAtIndex = wellsInPool[wellIndex]; |
2662 |
12 Sep 14 |
nicklas |
498 |
} |
2662 |
12 Sep 14 |
nicklas |
return wellIndex+1; |
2662 |
12 Sep 14 |
nicklas |
500 |
} |
2662 |
12 Sep 14 |
nicklas |
501 |
|
2662 |
12 Sep 14 |
nicklas |
protocol.addColumn = function(tr, className, html) |
2662 |
12 Sep 14 |
nicklas |
503 |
{ |
2662 |
12 Sep 14 |
nicklas |
var td = document.createElement('td'); |
2662 |
12 Sep 14 |
nicklas |
td.className = className; |
2662 |
12 Sep 14 |
nicklas |
td.innerHTML = html; |
2662 |
12 Sep 14 |
nicklas |
tr.appendChild(td); |
2662 |
12 Sep 14 |
nicklas |
508 |
} |
2662 |
12 Sep 14 |
nicklas |
509 |
|
2662 |
12 Sep 14 |
nicklas |
510 |
|
2662 |
12 Sep 14 |
nicklas |
return protocol; |
2662 |
12 Sep 14 |
nicklas |
512 |
}(); |
2662 |
12 Sep 14 |
nicklas |
513 |
|
2662 |
12 Sep 14 |
nicklas |
Doc.onLoad(Protocol.initPage); |
2662 |
12 Sep 14 |
nicklas |
515 |
|
2662 |
12 Sep 14 |
nicklas |
516 |
|
2662 |
12 Sep 14 |
nicklas |
var WellPainter = function() |
2662 |
12 Sep 14 |
nicklas |
518 |
{ |
2662 |
12 Sep 14 |
nicklas |
var painter = {}; |
2662 |
12 Sep 14 |
nicklas |
520 |
|
2662 |
12 Sep 14 |
nicklas |
painter.getClassNameForWell = function(well, schema) |
2662 |
12 Sep 14 |
nicklas |
522 |
{ |
2662 |
12 Sep 14 |
nicklas |
var cls = ''; |
2662 |
12 Sep 14 |
nicklas |
var indexSet = painter.barcodeVariant.indexSets[well.column]; |
2662 |
12 Sep 14 |
nicklas |
if (indexSet) |
2662 |
12 Sep 14 |
nicklas |
526 |
{ |
2662 |
12 Sep 14 |
nicklas |
var lib = well.extract; |
2662 |
12 Sep 14 |
nicklas |
cls += lib && lib.barcode.modified ? 'bg-modified' : indexSet.color; |
3762 |
19 Feb 16 |
nicklas |
if (lib && lib.isYellow) cls += ' yellow-specimen'; |
2662 |
12 Sep 14 |
nicklas |
530 |
} |
2662 |
12 Sep 14 |
nicklas |
return cls; |
2662 |
12 Sep 14 |
nicklas |
532 |
} |
2662 |
12 Sep 14 |
nicklas |
533 |
|
2662 |
12 Sep 14 |
nicklas |
painter.getWellText = function(well, schema) |
2662 |
12 Sep 14 |
nicklas |
535 |
{ |
2662 |
12 Sep 14 |
nicklas |
var text = ''; |
2662 |
12 Sep 14 |
nicklas |
var lib = well.extract; |
2662 |
12 Sep 14 |
nicklas |
if (lib) |
2662 |
12 Sep 14 |
nicklas |
539 |
{ |
2662 |
12 Sep 14 |
nicklas |
var name = lib.name; |
2662 |
12 Sep 14 |
nicklas |
var mixFactor = lib.mixFactor || 1.0; |
2662 |
12 Sep 14 |
nicklas |
var i = name.indexOf('.m'); |
3310 |
07 May 15 |
nicklas |
var displayName = i == -1 ? Strings.encodeTags(name) : Strings.encodeTags(name.substring(0, i+1))+'<br> '+Strings.encodeTags(name.substring(i)); |
3762 |
19 Feb 16 |
nicklas |
text += '<div class="lib if-yellow">'+displayName+'</div>'; |
2662 |
12 Sep 14 |
nicklas |
text += '<div><span class="volume">'+Numbers.formatNumber(lib.actualVolume*mixFactor, 1)+'µl</span>'; |
2662 |
12 Sep 14 |
nicklas |
if (lib.mixingStrategy == 'fixed' || lib.mixFactor > 1) |
2662 |
12 Sep 14 |
nicklas |
547 |
{ |
2662 |
12 Sep 14 |
nicklas |
text += '<span class="eb">'+Numbers.formatNumber(lib.actualEb*mixFactor, 1)+'µl</span>'; |
2662 |
12 Sep 14 |
nicklas |
549 |
} |
2662 |
12 Sep 14 |
nicklas |
else |
2662 |
12 Sep 14 |
nicklas |
551 |
{ |
2662 |
12 Sep 14 |
nicklas |
text += '<span class="eb">—</span>'; |
2662 |
12 Sep 14 |
nicklas |
553 |
} |
2662 |
12 Sep 14 |
nicklas |
//text+=lib.eb+':'+lib.mixFactor; |
2662 |
12 Sep 14 |
nicklas |
text += '</div>'; |
2662 |
12 Sep 14 |
nicklas |
text += '<div class="remarks">'+ lib.remarks.join('; ') + '</div>'; |
2662 |
12 Sep 14 |
nicklas |
557 |
} |
2662 |
12 Sep 14 |
nicklas |
return text; |
2662 |
12 Sep 14 |
nicklas |
559 |
} |
2662 |
12 Sep 14 |
nicklas |
560 |
|
2662 |
12 Sep 14 |
nicklas |
return painter; |
2662 |
12 Sep 14 |
nicklas |
562 |
}(); |
2662 |
12 Sep 14 |
nicklas |
563 |
|
2662 |
12 Sep 14 |
nicklas |
564 |
|