3449 |
28 Jul 15 |
olle |
var Barcode = function() |
3449 |
28 Jul 15 |
olle |
2 |
{ |
3449 |
28 Jul 15 |
olle |
var barcode = {}; |
3449 |
28 Jul 15 |
olle |
var debug = 0; |
3449 |
28 Jul 15 |
olle |
5 |
|
3449 |
28 Jul 15 |
olle |
var barcodesByName = []; |
3449 |
28 Jul 15 |
olle |
7 |
|
3449 |
28 Jul 15 |
olle |
// Page initialization |
3449 |
28 Jul 15 |
olle |
barcode.initPage = function() |
3449 |
28 Jul 15 |
olle |
10 |
{ |
3449 |
28 Jul 15 |
olle |
// Step 1 |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('step-1', 'wizard-validate', barcode.validateStep1); |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('bioplate', 'change', barcode.bioPlateOnChange); |
3449 |
28 Jul 15 |
olle |
14 |
|
3449 |
28 Jul 15 |
olle |
// Step 2 |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('step-2', 'wizard-initialize', barcode.initializeStep2); |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('step-2', 'wizard-validate', barcode.validateStep2); |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('pool_schema', 'change', barcode.poolSchemaOnChange); |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('barcode_variant', 'change', barcode.barcodeVariantOnChange); |
3449 |
28 Jul 15 |
olle |
var wells = document.getElementsByClassName('well'); |
3449 |
28 Jul 15 |
olle |
for (var wellNo = 0; wellNo < wells.length; wellNo++) |
3449 |
28 Jul 15 |
olle |
22 |
{ |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler(wells[wellNo], 'click', barcode.selectBarcode); |
3449 |
28 Jul 15 |
olle |
24 |
} |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('select-barcode', 'click', barcode.barcodeSelected); |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('wizard', 'click', barcode.hideBarcodeSelection); |
3449 |
28 Jul 15 |
olle |
27 |
|
3449 |
28 Jul 15 |
olle |
// Navigation |
3449 |
28 Jul 15 |
olle |
Buttons.addClickHandler('gocancel', Wizard.cancelWizard); |
3449 |
28 Jul 15 |
olle |
Buttons.addClickHandler('gorestart', Wizard.restartWizard); |
3449 |
28 Jul 15 |
olle |
Buttons.addClickHandler('gonext', Wizard.goNextOnClick); |
3449 |
28 Jul 15 |
olle |
Buttons.addClickHandler('goregister', Wizard.goRegister); |
3449 |
28 Jul 15 |
olle |
33 |
|
3449 |
28 Jul 15 |
olle |
// Final registration |
3449 |
28 Jul 15 |
olle |
Events.addEventHandler('wizard', 'wizard-submit', barcode.submit); |
3449 |
28 Jul 15 |
olle |
36 |
|
3449 |
28 Jul 15 |
olle |
37 |
/* |
3449 |
28 Jul 15 |
olle |
var url = '../LibPrep.servlet?ID='+App.getSessionId(); |
3449 |
28 Jul 15 |
olle |
url += '&cmd=GetCDNAPlatesForBarcoding'; |
3449 |
28 Jul 15 |
olle |
Wizard.showLoadingAnimation('Loading cDNA plates...'); |
3449 |
28 Jul 15 |
olle |
Wizard.asyncJsonRequest(url, barcode.initializeStep1); |
3449 |
28 Jul 15 |
olle |
42 |
*/ |
3449 |
28 Jul 15 |
olle |
var url = '../LibPrep.servlet?ID='+App.getSessionId(); |
3449 |
28 Jul 15 |
olle |
44 |
/* |
3449 |
28 Jul 15 |
olle |
url += '&cmd=GetDNAPlatesForBarcoding'; |
3449 |
28 Jul 15 |
olle |
46 |
*/ |
3449 |
28 Jul 15 |
olle |
// Temporary plate selection for demonstration purposes |
3449 |
28 Jul 15 |
olle |
url += '&cmd=GetLibraryPlatesForLibPrep'; |
3449 |
28 Jul 15 |
olle |
Wizard.showLoadingAnimation('Loading DNA plates...'); |
3449 |
28 Jul 15 |
olle |
Wizard.asyncJsonRequest(url, barcode.initializeStep1); |
3449 |
28 Jul 15 |
olle |
51 |
|
3449 |
28 Jul 15 |
olle |
var url = '../LibPrep.servlet?ID='+App.getSessionId(); |
3449 |
28 Jul 15 |
olle |
url += '&cmd=GetAllBarcodeInfo'; |
3449 |
28 Jul 15 |
olle |
Wizard.asyncJsonRequest(url, barcode.barcodesLoaded); |
3449 |
28 Jul 15 |
olle |
55 |
} |
3449 |
28 Jul 15 |
olle |
56 |
|
3449 |
28 Jul 15 |
olle |
57 |
|
3449 |
28 Jul 15 |
olle |
barcode.initializeStep1 = function(response) |
3449 |
28 Jul 15 |
olle |
59 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
61 |
|
3449 |
28 Jul 15 |
olle |
var bioplates = response.bioplates; |
3449 |
28 Jul 15 |
olle |
var plates = frm.bioplate; |
3449 |
28 Jul 15 |
olle |
if (bioplates.length > 0) |
3449 |
28 Jul 15 |
olle |
65 |
{ |
3449 |
28 Jul 15 |
olle |
for (var i=0; i < bioplates.length; i++) |
3449 |
28 Jul 15 |
olle |
67 |
{ |
3449 |
28 Jul 15 |
olle |
var bioplate = bioplates[i]; |
3449 |
28 Jul 15 |
olle |
var option = new Option(bioplate.name, bioplate.id); |
3449 |
28 Jul 15 |
olle |
option.bioplate = bioplate; |
3449 |
28 Jul 15 |
olle |
plates.options[plates.length] = option; |
3449 |
28 Jul 15 |
olle |
72 |
} |
3449 |
28 Jul 15 |
olle |
73 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
75 |
{ |
3449 |
28 Jul 15 |
olle |
76 |
/* |
3449 |
28 Jul 15 |
olle |
Wizard.setFatalError('No cDNA bioplates available for processing.'); |
3449 |
28 Jul 15 |
olle |
78 |
*/ |
3449 |
28 Jul 15 |
olle |
Wizard.setFatalError('No DNA bioplates available for processing.'); |
3449 |
28 Jul 15 |
olle |
return; |
3449 |
28 Jul 15 |
olle |
81 |
} |
3449 |
28 Jul 15 |
olle |
82 |
|
3449 |
28 Jul 15 |
olle |
bioplateIsValid = true; |
3449 |
28 Jul 15 |
olle |
Wizard.setInputStatus('bioplate', 'valid'); |
3449 |
28 Jul 15 |
olle |
Events.sendChangeEvent('bioplate'); |
3449 |
28 Jul 15 |
olle |
86 |
|
3449 |
28 Jul 15 |
olle |
Doc.show('step-1'); |
3449 |
28 Jul 15 |
olle |
Doc.show('gonext'); |
3449 |
28 Jul 15 |
olle |
89 |
} |
3449 |
28 Jul 15 |
olle |
90 |
|
3449 |
28 Jul 15 |
olle |
barcode.bioPlateOnChange = function() |
3449 |
28 Jul 15 |
olle |
92 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
var bioplate = frm.bioplate[frm.bioplate.selectedIndex].bioplate; |
3449 |
28 Jul 15 |
olle |
Doc.element('dnaComments').innerHTML = Strings.encodeTags(bioplate.comments); |
3449 |
28 Jul 15 |
olle |
96 |
} |
3449 |
28 Jul 15 |
olle |
97 |
|
3449 |
28 Jul 15 |
olle |
barcode.barcodesLoaded = function(response) |
3449 |
28 Jul 15 |
olle |
99 |
{ |
3449 |
28 Jul 15 |
olle |
var barcodes = response.barcodes |
3449 |
28 Jul 15 |
olle |
var selectBarcodeHtml = ''; |
3449 |
28 Jul 15 |
olle |
102 |
|
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < barcodes.length; i++) |
3449 |
28 Jul 15 |
olle |
104 |
{ |
3449 |
28 Jul 15 |
olle |
105 |
/* |
3449 |
28 Jul 15 |
olle |
if (i % 8 == 0 && i > 0) |
3449 |
28 Jul 15 |
olle |
107 |
*/ |
3449 |
28 Jul 15 |
olle |
if (i == 8) |
3449 |
28 Jul 15 |
olle |
109 |
{ |
3449 |
28 Jul 15 |
olle |
selectBarcodeHtml += '<div class="menuseparator"></div>'; |
3449 |
28 Jul 15 |
olle |
111 |
} |
3449 |
28 Jul 15 |
olle |
var barcode = barcodes[i]; |
3449 |
28 Jul 15 |
olle |
barcodesByName[barcode.name] = barcode; |
3449 |
28 Jul 15 |
olle |
selectBarcodeHtml += '<div class="menuitem interactable enabled" id="bc-'+barcode.id+'" data-barcode-name="'+Strings.encodeTags(barcode.name)+'">'; |
3449 |
28 Jul 15 |
olle |
selectBarcodeHtml += Strings.encodeTags(barcode.name)+'</div>'; |
3449 |
28 Jul 15 |
olle |
116 |
} |
3449 |
28 Jul 15 |
olle |
Doc.element('select-barcode-all').innerHTML = selectBarcodeHtml; |
3449 |
28 Jul 15 |
olle |
118 |
} |
3449 |
28 Jul 15 |
olle |
119 |
|
3449 |
28 Jul 15 |
olle |
barcode.validateStep1 = function(event) |
3449 |
28 Jul 15 |
olle |
121 |
{} |
3449 |
28 Jul 15 |
olle |
122 |
|
3449 |
28 Jul 15 |
olle |
barcode.initializeStep2 = function() |
3449 |
28 Jul 15 |
olle |
124 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
126 |
|
3449 |
28 Jul 15 |
olle |
127 |
/* |
3449 |
28 Jul 15 |
olle |
var url = '../LibPrep.servlet?ID='+App.getSessionId(); |
3449 |
28 Jul 15 |
olle |
url += '&cmd=GetCDnaInfoForPlate&bioplate='+frm.bioplate.value; |
3449 |
28 Jul 15 |
olle |
Wizard.showLoadingAnimation('Loading cDNA bioplate information...'); |
3449 |
28 Jul 15 |
olle |
Wizard.asyncJsonRequest(url, barcode.dnaInfoLoaded); |
3449 |
28 Jul 15 |
olle |
132 |
*/ |
3449 |
28 Jul 15 |
olle |
var url = '../LibPrep.servlet?ID='+App.getSessionId(); |
3449 |
28 Jul 15 |
olle |
url += '&cmd=GetDnaInfoForPlate&bioplate='+frm.bioplate.value; |
3449 |
28 Jul 15 |
olle |
Wizard.showLoadingAnimation('Loading DNA bioplate information...'); |
3449 |
28 Jul 15 |
olle |
Wizard.asyncJsonRequest(url, barcode.dnaInfoLoaded); |
3449 |
28 Jul 15 |
olle |
137 |
} |
3449 |
28 Jul 15 |
olle |
138 |
|
3449 |
28 Jul 15 |
olle |
barcode.dnaInfoLoaded = function(response) |
3449 |
28 Jul 15 |
olle |
140 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
var dnaPlate = frm.bioplate[frm.bioplate.selectedIndex].bioplate; |
3449 |
28 Jul 15 |
olle |
143 |
|
3449 |
28 Jul 15 |
olle |
var schema = PoolSchema.getById(dnaPlate.poolSchema); |
3449 |
28 Jul 15 |
olle |
PoolSchema.initList(frm.pool_schema, schema.id, 'manual'); |
3449 |
28 Jul 15 |
olle |
PoolSchema.initVariantList(frm.barcode_variant, schema, dnaPlate.barcodeVariant); |
3449 |
28 Jul 15 |
olle |
147 |
|
3449 |
28 Jul 15 |
olle |
var list = response.dna; |
3449 |
28 Jul 15 |
olle |
// Pre-process the return DNA items |
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < list.length; i++) |
3449 |
28 Jul 15 |
olle |
151 |
{ |
3449 |
28 Jul 15 |
olle |
barcode.checkAndPreProcessDna(list[i]); |
3449 |
28 Jul 15 |
olle |
153 |
} |
3449 |
28 Jul 15 |
olle |
154 |
|
3449 |
28 Jul 15 |
olle |
barcode.viewAsPlate(list, schema); |
3449 |
28 Jul 15 |
olle |
Wizard.keepSessionAlive(); |
3449 |
28 Jul 15 |
olle |
157 |
|
3449 |
28 Jul 15 |
olle |
Wizard.setCurrentStep(2); |
3449 |
28 Jul 15 |
olle |
Doc.show('goregister'); |
3449 |
28 Jul 15 |
olle |
Doc.show('gocancel'); |
3449 |
28 Jul 15 |
olle |
161 |
} |
3449 |
28 Jul 15 |
olle |
162 |
|
3449 |
28 Jul 15 |
olle |
163 |
|
3449 |
28 Jul 15 |
olle |
barcode.checkAndPreProcessDna = function(dna) |
3449 |
28 Jul 15 |
olle |
165 |
{ |
3449 |
28 Jul 15 |
olle |
// Set the 'stratagene'/'external' flag |
3449 |
28 Jul 15 |
olle |
dna.stratagene = Meludi.isStratagene(dna.name); |
3449 |
28 Jul 15 |
olle |
dna.external = Meludi.isExternal(dna.name); |
3449 |
28 Jul 15 |
olle |
169 |
} |
3449 |
28 Jul 15 |
olle |
170 |
|
3449 |
28 Jul 15 |
olle |
barcode.viewAsPlate = function(list, schema) |
3449 |
28 Jul 15 |
olle |
172 |
{ |
3449 |
28 Jul 15 |
olle |
Plate.init(8, 12, schema, WellPainter); |
3449 |
28 Jul 15 |
olle |
174 |
|
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < list.length; i++) |
3449 |
28 Jul 15 |
olle |
176 |
{ |
3449 |
28 Jul 15 |
olle |
var dna = list[i]; |
3449 |
28 Jul 15 |
olle |
var well = dna.bioWell; |
3449 |
28 Jul 15 |
olle |
Plate.getWell(well.row, well.column).setExtract(dna); |
3449 |
28 Jul 15 |
olle |
180 |
} |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
182 |
|
3449 |
28 Jul 15 |
olle |
var barcodeVariant = PoolSchema.getBarcodeVariantByName(schema, frm.barcode_variant.value); |
3449 |
28 Jul 15 |
olle |
barcode.assignSchemaDefinedBarcodeVariant(schema, barcodeVariant); |
3449 |
28 Jul 15 |
olle |
185 |
|
3449 |
28 Jul 15 |
olle |
WellPainter.barcodeVariant = barcodeVariant; |
3449 |
28 Jul 15 |
olle |
Plate.paint(Plate.getWells()); |
3449 |
28 Jul 15 |
olle |
PoolSchema.buildPoolTableRow(schema, 12, false); |
3449 |
28 Jul 15 |
olle |
189 |
} |
3449 |
28 Jul 15 |
olle |
190 |
|
3449 |
28 Jul 15 |
olle |
barcode.assignSchemaDefinedBarcodeVariant = function(schema, barcodeVariant) |
3449 |
28 Jul 15 |
olle |
192 |
{ |
3449 |
28 Jul 15 |
olle |
var wells = Plate.getWells(); |
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < wells.length; i++) |
3449 |
28 Jul 15 |
olle |
195 |
{ |
3449 |
28 Jul 15 |
olle |
var well = wells[i]; |
3449 |
28 Jul 15 |
olle |
var row = well.row; |
3449 |
28 Jul 15 |
olle |
var column = well.column; |
3449 |
28 Jul 15 |
olle |
var dna = well.extract; |
3449 |
28 Jul 15 |
olle |
if (dna) |
3449 |
28 Jul 15 |
olle |
201 |
{ |
3449 |
28 Jul 15 |
olle |
202 |
/* |
3449 |
28 Jul 15 |
olle |
var indexSet = barcodeVariant ? barcodeVariant.indexSets[well.column] : null; |
3449 |
28 Jul 15 |
olle |
var barcode = null; |
3449 |
28 Jul 15 |
olle |
if (indexSet) |
3449 |
28 Jul 15 |
olle |
206 |
{ |
3449 |
28 Jul 15 |
olle |
var barcodeName = indexSet.barcodes[well.row]; |
3449 |
28 Jul 15 |
olle |
//alert("assign_barcode.js::assignSchemaDefinedBarcodeVariant(): i = " + i + " well = " + well + " barcodeName = " + barcodeName); |
3449 |
28 Jul 15 |
olle |
barcode = barcodesByName[barcodeName]; |
3449 |
28 Jul 15 |
olle |
210 |
} |
3449 |
28 Jul 15 |
olle |
dna.barcode = barcode; |
3449 |
28 Jul 15 |
olle |
dna.defaultBarcode = barcode; |
3449 |
28 Jul 15 |
olle |
213 |
*/ |
3449 |
28 Jul 15 |
olle |
// Illumina Index 1 Primers |
3449 |
28 Jul 15 |
olle |
var barcode = null; |
3449 |
28 Jul 15 |
olle |
var barcodeName = 'A7'; |
3449 |
28 Jul 15 |
olle |
if (column < 9) |
3449 |
28 Jul 15 |
olle |
218 |
{ |
3449 |
28 Jul 15 |
olle |
barcodeName += '0'; |
3449 |
28 Jul 15 |
olle |
220 |
} |
3449 |
28 Jul 15 |
olle |
barcodeName += (column + 1); |
3449 |
28 Jul 15 |
olle |
barcode = barcodesByName[barcodeName]; |
3449 |
28 Jul 15 |
olle |
dna.barcode1 = barcode; |
3449 |
28 Jul 15 |
olle |
dna.defaultBarcode1 = barcode; |
3449 |
28 Jul 15 |
olle |
225 |
|
3449 |
28 Jul 15 |
olle |
// Illumina Index 2 Primers |
3449 |
28 Jul 15 |
olle |
barcode = null; |
3449 |
28 Jul 15 |
olle |
barcodeName = 'A50'; |
3449 |
28 Jul 15 |
olle |
barcodeName += (row + 1); |
3449 |
28 Jul 15 |
olle |
barcode = barcodesByName[barcodeName]; |
3449 |
28 Jul 15 |
olle |
dna.barcode2 = barcode; |
3449 |
28 Jul 15 |
olle |
dna.defaultBarcode2 = barcode; |
3449 |
28 Jul 15 |
olle |
233 |
|
3449 |
28 Jul 15 |
olle |
well.duplicate = false; |
3449 |
28 Jul 15 |
olle |
235 |
} |
3449 |
28 Jul 15 |
olle |
236 |
} |
3449 |
28 Jul 15 |
olle |
237 |
} |
3449 |
28 Jul 15 |
olle |
238 |
|
3449 |
28 Jul 15 |
olle |
barcode.poolSchemaOnChange = function() |
3449 |
28 Jul 15 |
olle |
240 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
var schema = PoolSchema.getById(frm.pool_schema.value); |
3449 |
28 Jul 15 |
olle |
Plate.setPoolSchema(schema); |
3449 |
28 Jul 15 |
olle |
PoolSchema.initVariantList(frm.barcode_variant, schema); |
3449 |
28 Jul 15 |
olle |
245 |
|
3449 |
28 Jul 15 |
olle |
var barcodeVariant = PoolSchema.getBarcodeVariantByName(schema, frm.barcode_variant.value); |
3449 |
28 Jul 15 |
olle |
barcode.assignSchemaDefinedBarcodeVariant(schema, barcodeVariant); |
3449 |
28 Jul 15 |
olle |
248 |
|
3449 |
28 Jul 15 |
olle |
WellPainter.barcodeVariant = barcodeVariant; |
3449 |
28 Jul 15 |
olle |
Plate.paint(Plate.getWells()); |
3449 |
28 Jul 15 |
olle |
PoolSchema.buildPoolTableRow(schema, 12, false); |
3449 |
28 Jul 15 |
olle |
252 |
} |
3449 |
28 Jul 15 |
olle |
253 |
|
3449 |
28 Jul 15 |
olle |
barcode.barcodeVariantOnChange = function() |
3449 |
28 Jul 15 |
olle |
255 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
var schema = PoolSchema.getById(frm.pool_schema.value); |
3449 |
28 Jul 15 |
olle |
var barcodeVariant = PoolSchema.getBarcodeVariantByName(schema, frm.barcode_variant.value); |
3449 |
28 Jul 15 |
olle |
259 |
|
3449 |
28 Jul 15 |
olle |
barcode.assignSchemaDefinedBarcodeVariant(schema, barcodeVariant); |
3449 |
28 Jul 15 |
olle |
261 |
|
3449 |
28 Jul 15 |
olle |
WellPainter.barcodeVariant = barcodeVariant; |
3449 |
28 Jul 15 |
olle |
Plate.paint(Plate.getWells()); |
3449 |
28 Jul 15 |
olle |
264 |
} |
3449 |
28 Jul 15 |
olle |
265 |
|
3449 |
28 Jul 15 |
olle |
var currentWell; |
3449 |
28 Jul 15 |
olle |
var lastSelectedBarcode; |
3449 |
28 Jul 15 |
olle |
barcode.selectBarcode = function(event) |
3449 |
28 Jul 15 |
olle |
269 |
{ |
3449 |
28 Jul 15 |
olle |
var row = Data.int(event.currentTarget, 'row'); |
3449 |
28 Jul 15 |
olle |
var column = Data.int(event.currentTarget, 'col'); |
3449 |
28 Jul 15 |
olle |
272 |
|
3449 |
28 Jul 15 |
olle |
// Locate the barcode selection div so that the current |
3449 |
28 Jul 15 |
olle |
// barcode is positioned next to the current mouse position |
3449 |
28 Jul 15 |
olle |
// Initially set it to the right of the mouse so that the |
3449 |
28 Jul 15 |
olle |
// center is vertically aligned |
3449 |
28 Jul 15 |
olle |
277 |
|
3449 |
28 Jul 15 |
olle |
currentWell = Plate.getWell(row, column); |
3449 |
28 Jul 15 |
olle |
var dna = currentWell.extract; |
3449 |
28 Jul 15 |
olle |
var scroll = 0; |
3449 |
28 Jul 15 |
olle |
if (dna) |
3449 |
28 Jul 15 |
olle |
282 |
{ |
3449 |
28 Jul 15 |
olle |
// Reset 'current' selection |
3449 |
28 Jul 15 |
olle |
var menu = Doc.element('select-barcode'); |
3449 |
28 Jul 15 |
olle |
var selectAll = Doc.element('select-barcode-all'); |
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < selectAll.childNodes.length; i++) |
3449 |
28 Jul 15 |
olle |
287 |
{ |
3449 |
28 Jul 15 |
olle |
Doc.removeClass(selectAll.childNodes[i], 'current'); |
3449 |
28 Jul 15 |
olle |
289 |
} |
3449 |
28 Jul 15 |
olle |
menu.style.display = 'block'; |
3449 |
28 Jul 15 |
olle |
291 |
|
3449 |
28 Jul 15 |
olle |
var x = event.clientX+1; |
3449 |
28 Jul 15 |
olle |
var halfHeight = Math.floor(selectAll.offsetHeight/2) |
3449 |
28 Jul 15 |
olle |
var y = event.clientY-halfHeight; |
3449 |
28 Jul 15 |
olle |
var scroll = 0; |
3449 |
28 Jul 15 |
olle |
var barcodeDiv; |
3449 |
28 Jul 15 |
olle |
297 |
|
3449 |
28 Jul 15 |
olle |
var useBarcode = dna.barcode || lastSelectedBarcode; |
3449 |
28 Jul 15 |
olle |
if (useBarcode) |
3449 |
28 Jul 15 |
olle |
300 |
{ |
3449 |
28 Jul 15 |
olle |
var barcodeDiv = Doc.element('bc-'+useBarcode.id); |
3449 |
28 Jul 15 |
olle |
if (!dna.barcode && barcodeDiv.nextSibling) barcodeDiv = barcodeDiv.nextSibling; |
3449 |
28 Jul 15 |
olle |
// Try to scroll the current barcode so that it's baseline is at the center of the div |
3449 |
28 Jul 15 |
olle |
scroll = barcodeDiv.offsetTop + barcodeDiv.offsetHeight - halfHeight; |
3449 |
28 Jul 15 |
olle |
if (scroll < 0) |
3449 |
28 Jul 15 |
olle |
306 |
{ |
3449 |
28 Jul 15 |
olle |
// We get a negative scroll for the first few elements, shift the |
3449 |
28 Jul 15 |
olle |
// entire selection div down instead |
3449 |
28 Jul 15 |
olle |
y -= scroll; |
3449 |
28 Jul 15 |
olle |
scroll = 0; |
3449 |
28 Jul 15 |
olle |
311 |
} |
3449 |
28 Jul 15 |
olle |
else if (scroll > selectAll.scrollHeight - selectAll.offsetHeight) |
3449 |
28 Jul 15 |
olle |
313 |
{ |
3449 |
28 Jul 15 |
olle |
// We get a too large scroll value for the last few elements, shift |
3449 |
28 Jul 15 |
olle |
// the entire selection div up instead |
3449 |
28 Jul 15 |
olle |
y -= scroll - (selectAll.scrollHeight - selectAll.offsetHeight); |
3449 |
28 Jul 15 |
olle |
scroll = selectAll.scrollHeight - selectAll.offsetHeight; |
3449 |
28 Jul 15 |
olle |
318 |
} |
3449 |
28 Jul 15 |
olle |
if (dna.barcode) |
3449 |
28 Jul 15 |
olle |
320 |
{ |
3449 |
28 Jul 15 |
olle |
Doc.addClass(barcodeDiv, 'current'); |
3449 |
28 Jul 15 |
olle |
322 |
} |
3449 |
28 Jul 15 |
olle |
323 |
} |
3449 |
28 Jul 15 |
olle |
324 |
|
3449 |
28 Jul 15 |
olle |
// Default barcode |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode && dna.defaultBarcode != dna.barcode) |
3449 |
28 Jul 15 |
olle |
327 |
{ |
3449 |
28 Jul 15 |
olle |
var selectDefault = Doc.element('select-barcode-default'); |
3449 |
28 Jul 15 |
olle |
Data.set(selectDefault, 'barcode-name', dna.defaultBarcode.name); |
3449 |
28 Jul 15 |
olle |
selectDefault.innerHTML = 'Default: ' + Strings.encodeTags(dna.defaultBarcode.name); |
3449 |
28 Jul 15 |
olle |
Doc.show('select-barcode-default'); |
3449 |
28 Jul 15 |
olle |
Doc.show('select-barcode-default-separator'); |
3449 |
28 Jul 15 |
olle |
333 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
335 |
{ |
3449 |
28 Jul 15 |
olle |
Doc.hide('select-barcode-default'); |
3449 |
28 Jul 15 |
olle |
Doc.hide('select-barcode-default-separator'); |
3449 |
28 Jul 15 |
olle |
338 |
} |
3449 |
28 Jul 15 |
olle |
339 |
|
3449 |
28 Jul 15 |
olle |
// Position the selection div |
3449 |
28 Jul 15 |
olle |
selectAll.scrollTop = scroll; |
3449 |
28 Jul 15 |
olle |
menu.style.left = (x)+'px'; |
3449 |
28 Jul 15 |
olle |
menu.style.top = (y)+'px'; |
3449 |
28 Jul 15 |
olle |
event.stopPropagation(); |
3449 |
28 Jul 15 |
olle |
345 |
} |
3449 |
28 Jul 15 |
olle |
346 |
} |
3449 |
28 Jul 15 |
olle |
347 |
|
3449 |
28 Jul 15 |
olle |
barcode.barcodeSelected = function(event) |
3449 |
28 Jul 15 |
olle |
349 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
var schema = PoolSchema.getById(frm.pool_schema.value); |
3449 |
28 Jul 15 |
olle |
var target = event.target; |
3449 |
28 Jul 15 |
olle |
if (currentWell && currentWell.extract) |
3449 |
28 Jul 15 |
olle |
354 |
{ |
3449 |
28 Jul 15 |
olle |
lastSelectedBarcode = barcodesByName[Data.get(target, 'barcode-name')]; |
3449 |
28 Jul 15 |
olle |
currentWell.extract.barcode = lastSelectedBarcode; |
3449 |
28 Jul 15 |
olle |
var poolNum = schema.getPoolNumForColumn(currentWell.column); |
3449 |
28 Jul 15 |
olle |
if (poolNum >= 0) |
3449 |
28 Jul 15 |
olle |
359 |
{ |
3449 |
28 Jul 15 |
olle |
barcode.checkDuplicateBarcode(poolNum); |
3449 |
28 Jul 15 |
olle |
Plate.paint(schema.getWellsInPool(Plate, poolNum)); |
3449 |
28 Jul 15 |
olle |
362 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
364 |
{ |
3449 |
28 Jul 15 |
olle |
Plate.paint([currentWell]); |
3449 |
28 Jul 15 |
olle |
366 |
} |
3449 |
28 Jul 15 |
olle |
367 |
} |
3449 |
28 Jul 15 |
olle |
368 |
} |
3449 |
28 Jul 15 |
olle |
369 |
|
3449 |
28 Jul 15 |
olle |
barcode.hideBarcodeSelection = function() |
3449 |
28 Jul 15 |
olle |
371 |
{ |
3449 |
28 Jul 15 |
olle |
Doc.hide('select-barcode'); |
3449 |
28 Jul 15 |
olle |
373 |
} |
3449 |
28 Jul 15 |
olle |
374 |
|
3449 |
28 Jul 15 |
olle |
barcode.checkDuplicateBarcode = function(poolNum) |
3449 |
28 Jul 15 |
olle |
376 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
var schema = PoolSchema.getById(frm.pool_schema.value); |
3449 |
28 Jul 15 |
olle |
379 |
|
3449 |
28 Jul 15 |
olle |
var wells = schema.getWellsInPool(Plate, poolNum); |
3449 |
28 Jul 15 |
olle |
var wellByBarcodeName = []; |
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < wells.length; i++) |
3449 |
28 Jul 15 |
olle |
383 |
{ |
3449 |
28 Jul 15 |
olle |
var well = wells[i]; |
3449 |
28 Jul 15 |
olle |
var dna = well.extract; |
3449 |
28 Jul 15 |
olle |
if (dna && dna.barcode) |
3449 |
28 Jul 15 |
olle |
387 |
{ |
3449 |
28 Jul 15 |
olle |
if (wellByBarcodeName[dna.barcode.name]) |
3449 |
28 Jul 15 |
olle |
389 |
{ |
3449 |
28 Jul 15 |
olle |
well.duplicate = true; |
3449 |
28 Jul 15 |
olle |
wellByBarcodeName[dna.barcode.name].duplicate = true; |
3449 |
28 Jul 15 |
olle |
392 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
394 |
{ |
3449 |
28 Jul 15 |
olle |
wellByBarcodeName[dna.barcode.name] = well; |
3449 |
28 Jul 15 |
olle |
well.duplicate = false; |
3449 |
28 Jul 15 |
olle |
397 |
} |
3449 |
28 Jul 15 |
olle |
398 |
} |
3449 |
28 Jul 15 |
olle |
399 |
} |
3449 |
28 Jul 15 |
olle |
400 |
} |
3449 |
28 Jul 15 |
olle |
401 |
|
3449 |
28 Jul 15 |
olle |
barcode.validateStep2 = function(event) |
3449 |
28 Jul 15 |
olle |
403 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
405 |
|
3449 |
28 Jul 15 |
olle |
var wells = Plate.getWells(); |
3449 |
28 Jul 15 |
olle |
var numErrors = 0; |
3449 |
28 Jul 15 |
olle |
var numWarnings = 0; |
3449 |
28 Jul 15 |
olle |
var numDna = 0; |
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < wells.length; i++) |
3449 |
28 Jul 15 |
olle |
411 |
{ |
3449 |
28 Jul 15 |
olle |
var well = wells[i]; |
3449 |
28 Jul 15 |
olle |
if (well.hasWarning()) |
3449 |
28 Jul 15 |
olle |
414 |
{ |
3449 |
28 Jul 15 |
olle |
numWarnings++; |
3449 |
28 Jul 15 |
olle |
416 |
} |
3449 |
28 Jul 15 |
olle |
if (well.hasError()) |
3449 |
28 Jul 15 |
olle |
418 |
{ |
3449 |
28 Jul 15 |
olle |
numErrors++; |
3449 |
28 Jul 15 |
olle |
420 |
} |
3449 |
28 Jul 15 |
olle |
else if (well.extract && well.extract.id) |
3449 |
28 Jul 15 |
olle |
422 |
{ |
3449 |
28 Jul 15 |
olle |
numDna++; |
3449 |
28 Jul 15 |
olle |
424 |
} |
3449 |
28 Jul 15 |
olle |
425 |
} |
3449 |
28 Jul 15 |
olle |
426 |
|
3449 |
28 Jul 15 |
olle |
if (numErrors > 0) |
3449 |
28 Jul 15 |
olle |
428 |
{ |
3449 |
28 Jul 15 |
olle |
event.preventDefault(); |
3449 |
28 Jul 15 |
olle |
return; |
3449 |
28 Jul 15 |
olle |
431 |
} |
3449 |
28 Jul 15 |
olle |
else if (numDna == 0) |
3449 |
28 Jul 15 |
olle |
433 |
{ |
3449 |
28 Jul 15 |
olle |
alert('There is no DNA in any wells'); |
3449 |
28 Jul 15 |
olle |
event.preventDefault(); |
3449 |
28 Jul 15 |
olle |
return; |
3449 |
28 Jul 15 |
olle |
437 |
} |
3449 |
28 Jul 15 |
olle |
else if (numWarnings > 0) |
3449 |
28 Jul 15 |
olle |
439 |
{ |
3449 |
28 Jul 15 |
olle |
if (!frm.verifyGoNext || !frm.verifyGoNext.checked) |
3449 |
28 Jul 15 |
olle |
441 |
{ |
3449 |
28 Jul 15 |
olle |
Wizard.showGoNextConfirmation(true, 'There are ' + numWarnings + ' wells with a warning. Continue anyway?'); |
3449 |
28 Jul 15 |
olle |
event.preventDefault(); |
3449 |
28 Jul 15 |
olle |
444 |
} |
3449 |
28 Jul 15 |
olle |
445 |
} |
3449 |
28 Jul 15 |
olle |
446 |
} |
3449 |
28 Jul 15 |
olle |
447 |
|
3449 |
28 Jul 15 |
olle |
barcode.submit = function() |
3449 |
28 Jul 15 |
olle |
449 |
{ |
3449 |
28 Jul 15 |
olle |
var frm = document.forms['meludi']; |
3449 |
28 Jul 15 |
olle |
451 |
|
3449 |
28 Jul 15 |
olle |
var submitInfo = {}; |
3449 |
28 Jul 15 |
olle |
var plateInfo = {}; |
3449 |
28 Jul 15 |
olle |
454 |
|
3449 |
28 Jul 15 |
olle |
submitInfo.bioplate = plateInfo; |
3449 |
28 Jul 15 |
olle |
plateInfo.id = parseInt(frm.bioplate.value); |
3449 |
28 Jul 15 |
olle |
plateInfo.poolSchema = frm.pool_schema.value; |
3449 |
28 Jul 15 |
olle |
plateInfo.barcodeVariant = frm.barcode_variant.value; |
3449 |
28 Jul 15 |
olle |
plateInfo.comments = frm.comments.value; |
3449 |
28 Jul 15 |
olle |
plateInfo.wells = []; |
3449 |
28 Jul 15 |
olle |
461 |
|
3449 |
28 Jul 15 |
olle |
var wells = Plate.getWells(); |
3449 |
28 Jul 15 |
olle |
for (var i = 0; i < wells.length; i++) |
3449 |
28 Jul 15 |
olle |
464 |
{ |
3449 |
28 Jul 15 |
olle |
var well = wells[i]; |
3449 |
28 Jul 15 |
olle |
if (well.extract && well.extract.id) |
3449 |
28 Jul 15 |
olle |
467 |
{ |
3449 |
28 Jul 15 |
olle |
var tmp = {}; |
3449 |
28 Jul 15 |
olle |
tmp.row = well.row; |
3449 |
28 Jul 15 |
olle |
tmp.column = well.column; |
3449 |
28 Jul 15 |
olle |
tmp.dna = {}; |
3449 |
28 Jul 15 |
olle |
tmp.dna.id = well.extract.id; |
3449 |
28 Jul 15 |
olle |
473 |
/* |
3449 |
28 Jul 15 |
olle |
tmp.dna.barcode = {}; |
3449 |
28 Jul 15 |
olle |
tmp.dna.barcode.id = well.extract.barcode.id; |
3449 |
28 Jul 15 |
olle |
476 |
*/ |
3449 |
28 Jul 15 |
olle |
tmp.dna.barcode1 = {}; |
3449 |
28 Jul 15 |
olle |
tmp.dna.barcode1.id = well.extract.barcode1.id; |
3449 |
28 Jul 15 |
olle |
tmp.dna.barcode2 = {}; |
3449 |
28 Jul 15 |
olle |
tmp.dna.barcode2.id = well.extract.barcode2.id; |
3449 |
28 Jul 15 |
olle |
plateInfo.wells[plateInfo.wells.length] = tmp; |
3449 |
28 Jul 15 |
olle |
482 |
} |
3449 |
28 Jul 15 |
olle |
483 |
} |
3449 |
28 Jul 15 |
olle |
484 |
|
3449 |
28 Jul 15 |
olle |
var url = '../LibPrep.servlet?ID='+App.getSessionId(); |
3449 |
28 Jul 15 |
olle |
url += '&cmd=CreateBarcodedLibraries'; |
3449 |
28 Jul 15 |
olle |
Wizard.showLoadingAnimation('Performing registration...'); |
3449 |
28 Jul 15 |
olle |
Wizard.asyncJsonRequest(url, barcode.submissionResults, 'POST', JSON.stringify(submitInfo)); |
3449 |
28 Jul 15 |
olle |
489 |
} |
3449 |
28 Jul 15 |
olle |
490 |
|
3449 |
28 Jul 15 |
olle |
barcode.submissionResults = function(response) |
3449 |
28 Jul 15 |
olle |
492 |
{ |
3449 |
28 Jul 15 |
olle |
Wizard.showFinalMessage(response.messages); |
3449 |
28 Jul 15 |
olle |
Doc.show('gorestart'); |
3449 |
28 Jul 15 |
olle |
495 |
} |
3449 |
28 Jul 15 |
olle |
496 |
|
3449 |
28 Jul 15 |
olle |
return barcode; |
3449 |
28 Jul 15 |
olle |
498 |
}(); |
3449 |
28 Jul 15 |
olle |
499 |
|
3449 |
28 Jul 15 |
olle |
Doc.onLoad(Barcode.initPage); |
3449 |
28 Jul 15 |
olle |
501 |
|
3449 |
28 Jul 15 |
olle |
var WellPainter = function() |
3449 |
28 Jul 15 |
olle |
503 |
{ |
3449 |
28 Jul 15 |
olle |
var painter = {}; |
3449 |
28 Jul 15 |
olle |
505 |
|
3449 |
28 Jul 15 |
olle |
painter.getClassNameForWell = function(well, schema) |
3449 |
28 Jul 15 |
olle |
507 |
{ |
3449 |
28 Jul 15 |
olle |
var cls = ''; |
3449 |
28 Jul 15 |
olle |
var indexSet = painter.barcodeVariant ? painter.barcodeVariant.indexSets[well.column] : null; |
3449 |
28 Jul 15 |
olle |
if (indexSet) |
3449 |
28 Jul 15 |
olle |
511 |
{ |
3449 |
28 Jul 15 |
olle |
cls += indexSet.color; |
3449 |
28 Jul 15 |
olle |
513 |
} |
3449 |
28 Jul 15 |
olle |
var dna = well.extract; |
3449 |
28 Jul 15 |
olle |
515 |
/* |
3449 |
28 Jul 15 |
olle |
if (dna && dna.barcode) |
3449 |
28 Jul 15 |
olle |
517 |
{ |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode && dna.barcode != dna.defaultBarcode) |
3449 |
28 Jul 15 |
olle |
519 |
{ |
3449 |
28 Jul 15 |
olle |
cls += ' bg-modified'; |
3449 |
28 Jul 15 |
olle |
521 |
} |
3449 |
28 Jul 15 |
olle |
522 |
} |
3449 |
28 Jul 15 |
olle |
523 |
*/ |
3449 |
28 Jul 15 |
olle |
if (dna && dna.barcode1) |
3449 |
28 Jul 15 |
olle |
525 |
{ |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode1 && dna.barcode1 != dna.defaultBarcode1) |
3449 |
28 Jul 15 |
olle |
527 |
{ |
3449 |
28 Jul 15 |
olle |
cls += ' bg-modified'; |
3449 |
28 Jul 15 |
olle |
529 |
} |
3449 |
28 Jul 15 |
olle |
530 |
} |
3449 |
28 Jul 15 |
olle |
if (dna && dna.barcode2) |
3449 |
28 Jul 15 |
olle |
532 |
{ |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode2 && dna.barcode2 != dna.defaultBarcode2) |
3449 |
28 Jul 15 |
olle |
534 |
{ |
3449 |
28 Jul 15 |
olle |
cls += ' bg-modified'; |
3449 |
28 Jul 15 |
olle |
536 |
} |
3449 |
28 Jul 15 |
olle |
537 |
} |
3449 |
28 Jul 15 |
olle |
if (well.duplicate) |
3449 |
28 Jul 15 |
olle |
539 |
{ |
3449 |
28 Jul 15 |
olle |
cls += ' duplicate'; |
3449 |
28 Jul 15 |
olle |
541 |
} |
3449 |
28 Jul 15 |
olle |
return cls; |
3449 |
28 Jul 15 |
olle |
543 |
} |
3449 |
28 Jul 15 |
olle |
544 |
|
3449 |
28 Jul 15 |
olle |
painter.getWellText = function(well, schema) |
3449 |
28 Jul 15 |
olle |
546 |
{ |
3449 |
28 Jul 15 |
olle |
var text = ''; |
3449 |
28 Jul 15 |
olle |
var dna = well.extract; |
3449 |
28 Jul 15 |
olle |
if (dna) |
3449 |
28 Jul 15 |
olle |
550 |
{ |
3449 |
28 Jul 15 |
olle |
var name = dna.name; |
3449 |
28 Jul 15 |
olle |
552 |
/* |
3449 |
28 Jul 15 |
olle |
var i = name.indexOf('.m'); |
3449 |
28 Jul 15 |
olle |
text += '<div class="name">'+name.substring(0, i)+'.<br> '+name.substring(i)+'</div>'; |
3449 |
28 Jul 15 |
olle |
555 |
*/ |
3449 |
28 Jul 15 |
olle |
text += '<div class="name">'+name+'</div>'; |
3449 |
28 Jul 15 |
olle |
557 |
/* |
3449 |
28 Jul 15 |
olle |
if (dna.barcode) |
3449 |
28 Jul 15 |
olle |
559 |
{ |
3449 |
28 Jul 15 |
olle |
text += '<div class="barcode">'+dna.barcode.name+'</div>'; |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode && dna.barcode != dna.defaultBarcode) |
3449 |
28 Jul 15 |
olle |
562 |
{ |
3449 |
28 Jul 15 |
olle |
text += '<div class="warn-msg">Modified barcode</div>'; |
3449 |
28 Jul 15 |
olle |
564 |
} |
3449 |
28 Jul 15 |
olle |
565 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
567 |
{ |
3449 |
28 Jul 15 |
olle |
well.setError('No barcode'); |
3449 |
28 Jul 15 |
olle |
569 |
} |
3449 |
28 Jul 15 |
olle |
570 |
*/ |
3449 |
28 Jul 15 |
olle |
if (dna.barcode2) |
3449 |
28 Jul 15 |
olle |
572 |
{ |
3449 |
28 Jul 15 |
olle |
text += '<div class="barcode">'+dna.barcode2.name+'</div>'; |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode2 && dna.barcode2 != dna.defaultBarcode2) |
3449 |
28 Jul 15 |
olle |
575 |
{ |
3449 |
28 Jul 15 |
olle |
text += '<div class="warn-msg">Modified barcode 2</div>'; |
3449 |
28 Jul 15 |
olle |
577 |
} |
3449 |
28 Jul 15 |
olle |
578 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
580 |
{ |
3449 |
28 Jul 15 |
olle |
well.setError('No barcode 2'); |
3449 |
28 Jul 15 |
olle |
582 |
} |
3449 |
28 Jul 15 |
olle |
if (dna.barcode1) |
3449 |
28 Jul 15 |
olle |
584 |
{ |
3449 |
28 Jul 15 |
olle |
text += '<div class="barcode">'+dna.barcode1.name+'</div>'; |
3449 |
28 Jul 15 |
olle |
if (dna.defaultBarcode1 && dna.barcode1 != dna.defaultBarcode1) |
3449 |
28 Jul 15 |
olle |
587 |
{ |
3449 |
28 Jul 15 |
olle |
text += '<div class="warn-msg">Modified barcode 1</div>'; |
3449 |
28 Jul 15 |
olle |
589 |
} |
3449 |
28 Jul 15 |
olle |
590 |
} |
3449 |
28 Jul 15 |
olle |
else |
3449 |
28 Jul 15 |
olle |
592 |
{ |
3449 |
28 Jul 15 |
olle |
well.setError('No barcode 1'); |
3449 |
28 Jul 15 |
olle |
594 |
} |
3449 |
28 Jul 15 |
olle |
595 |
} |
3449 |
28 Jul 15 |
olle |
if (well.duplicate) |
3449 |
28 Jul 15 |
olle |
597 |
{ |
3449 |
28 Jul 15 |
olle |
well.setError('Duplicate barcode'); |
3449 |
28 Jul 15 |
olle |
599 |
} |
3449 |
28 Jul 15 |
olle |
return text; |
3449 |
28 Jul 15 |
olle |
601 |
} |
3449 |
28 Jul 15 |
olle |
602 |
|
3449 |
28 Jul 15 |
olle |
return painter; |
3449 |
28 Jul 15 |
olle |
604 |
}(); |
3449 |
28 Jul 15 |
olle |
605 |
|
3449 |
28 Jul 15 |
olle |
606 |
|