3560 |
27 Oct 15 |
olle |
var Details = function() |
3560 |
27 Oct 15 |
olle |
2 |
{ |
3560 |
27 Oct 15 |
olle |
var details = {}; |
3560 |
27 Oct 15 |
olle |
var debug = 0; |
3560 |
27 Oct 15 |
olle |
5 |
|
3560 |
27 Oct 15 |
olle |
var jsonConsumables = {}; |
3560 |
27 Oct 15 |
olle |
7 |
|
3560 |
27 Oct 15 |
olle |
var jsonKitName = []; |
3560 |
27 Oct 15 |
olle |
var jsonLibraryPrepBox1 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexKit = []; |
3560 |
27 Oct 15 |
olle |
var jsonContentSetBox3 = []; |
3560 |
27 Oct 15 |
olle |
var jsonOligoPoolA_FPA = []; |
3560 |
27 Oct 15 |
olle |
var jsonOligoPoolB_FPB = []; |
3560 |
27 Oct 15 |
olle |
var jsonOligoHybridizationSequencingReagent3 = []; |
3560 |
27 Oct 15 |
olle |
var jsonStringentWash1_SW1 = []; |
3560 |
27 Oct 15 |
olle |
var jsonExtensionLigationMix3 = []; |
3560 |
27 Oct 15 |
olle |
var jsonPcrMasterMix2_PMM2 = []; |
3560 |
27 Oct 15 |
olle |
var jsonUB1 = []; |
3560 |
27 Oct 15 |
olle |
var jsonTDP = []; |
3560 |
27 Oct 15 |
olle |
var jsonFilterplate = []; |
3560 |
27 Oct 15 |
olle |
21 |
|
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA701 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA702 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA703 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA704 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA705 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA706 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA707 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA708 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA709 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA710 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA711 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA712 = []; |
3560 |
27 Oct 15 |
olle |
34 |
|
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA501 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA502 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA503 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA504 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA505 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA506 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA507 = []; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA508 = []; |
3560 |
27 Oct 15 |
olle |
43 |
|
3560 |
27 Oct 15 |
olle |
var jsonRegistrationDate = []; |
3560 |
27 Oct 15 |
olle |
var jsonLastUpdatedDate = []; |
3560 |
27 Oct 15 |
olle |
var jsonExpirationDate = []; |
3610 |
20 Nov 15 |
olle |
var jsonActive = []; |
3560 |
27 Oct 15 |
olle |
var jsonTimesUsed = []; |
3560 |
27 Oct 15 |
olle |
var jsonUnusedFpaPlateLocs = []; |
3560 |
27 Oct 15 |
olle |
var jsonComment = []; |
3560 |
27 Oct 15 |
olle |
51 |
|
4206 |
04 Nov 16 |
olle |
var bioplateGlobal; |
4206 |
04 Nov 16 |
olle |
53 |
|
3560 |
27 Oct 15 |
olle |
// Page initialization |
3560 |
27 Oct 15 |
olle |
details.initPage = function() |
3560 |
27 Oct 15 |
olle |
56 |
{ |
3560 |
27 Oct 15 |
olle |
Buttons.addClickHandler('close', App.closeWindow); |
3560 |
27 Oct 15 |
olle |
Buttons.addClickHandler('btnSave', details.saveDetails); |
3560 |
27 Oct 15 |
olle |
59 |
|
3560 |
27 Oct 15 |
olle |
Events.addEventHandler('expirationDate', 'change', details.expirationDateOnChange); |
3560 |
27 Oct 15 |
olle |
Events.addEventHandler('numTimesUsed', 'keypress', Events.numberOnly); |
3560 |
27 Oct 15 |
olle |
62 |
|
3560 |
27 Oct 15 |
olle |
var index = Data.int('page-data', 'index'); |
3560 |
27 Oct 15 |
olle |
var frm = document.forms['details']; |
3560 |
27 Oct 15 |
olle |
var pfrm = window.opener.document.forms['meludi']; |
3560 |
27 Oct 15 |
olle |
66 |
|
3560 |
27 Oct 15 |
olle |
// Get JSONObject with kit component JSONArrays for all kits |
3560 |
27 Oct 15 |
olle |
jsonConsumables = window.opener.ExtractionReg.fetchJsonConsumables(); |
3560 |
27 Oct 15 |
olle |
//alert("edit_libprep_kit_details.js::initPage(): jsonConsumables = " + JSON.stringify(jsonConsumables)); |
3560 |
27 Oct 15 |
olle |
70 |
|
3560 |
27 Oct 15 |
olle |
71 |
/* |
3560 |
27 Oct 15 |
olle |
// Get kit component JSONArrays for all kits |
3560 |
27 Oct 15 |
olle |
var jsonKitName = jsonConsumables['KitName']; |
3560 |
27 Oct 15 |
olle |
var jsonLibraryPrepBox1 = jsonConsumables['LibraryPrepBox1']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexKit = jsonConsumables['IndexKit']; |
3560 |
27 Oct 15 |
olle |
var jsonContentSetBox3 = jsonConsumables['ContentSetBox3']; |
3560 |
27 Oct 15 |
olle |
var jsonOligoPoolA_FPA = jsonConsumables['OligoPoolA_FPA']; |
3560 |
27 Oct 15 |
olle |
var jsonOligoPoolB_FPB = jsonConsumables['OligoPoolB_FPB']; |
3560 |
27 Oct 15 |
olle |
var jsonOligoHybridizationSequencingReagent3 = jsonConsumables['OligoHybridizationSequencingReagent3']; |
3560 |
27 Oct 15 |
olle |
var jsonStringentWash1_SW1 = jsonConsumables['StringentWash1_SW1']; |
3560 |
27 Oct 15 |
olle |
var jsonExtensionLigationMix3 = jsonConsumables['ExtensionLigationMix3']; |
3560 |
27 Oct 15 |
olle |
var jsonPcrMasterMix2_PMM2 = jsonConsumables['PcrMasterMix2_PMM2']; |
3560 |
27 Oct 15 |
olle |
var jsonUB1 = jsonConsumables['UB1']; |
3560 |
27 Oct 15 |
olle |
var jsonTDP = jsonConsumables['TDP']; |
3560 |
27 Oct 15 |
olle |
var jsonFilterplate = jsonConsumables['Filterplate']; |
3560 |
27 Oct 15 |
olle |
86 |
|
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA701 = jsonConsumables['IndexPrimerA701']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA702 = jsonConsumables['IndexPrimerA702']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA703 = jsonConsumables['IndexPrimerA703']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA704 = jsonConsumables['IndexPrimerA704']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA705 = jsonConsumables['IndexPrimerA705']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA706 = jsonConsumables['IndexPrimerA706']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA707 = jsonConsumables['IndexPrimerA707']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA708 = jsonConsumables['IndexPrimerA708']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA709 = jsonConsumables['IndexPrimerA709']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA710 = jsonConsumables['IndexPrimerA710']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA711 = jsonConsumables['IndexPrimerA711']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA712 = jsonConsumables['IndexPrimerA712']; |
3560 |
27 Oct 15 |
olle |
99 |
|
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA501 = jsonConsumables['IndexPrimerA501']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA502 = jsonConsumables['IndexPrimerA502']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA503 = jsonConsumables['IndexPrimerA503']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA504 = jsonConsumables['IndexPrimerA504']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA505 = jsonConsumables['IndexPrimerA505']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA506 = jsonConsumables['IndexPrimerA506']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA507 = jsonConsumables['IndexPrimerA507']; |
3560 |
27 Oct 15 |
olle |
var jsonIndexPrimerA508 = jsonConsumables['IndexPrimerA508']; |
3560 |
27 Oct 15 |
olle |
108 |
|
3560 |
27 Oct 15 |
olle |
var jsonRegistrationDate = jsonConsumables['RegistrationDate']; |
3560 |
27 Oct 15 |
olle |
var jsonLastUpdatedDate = jsonConsumables['LastUpdatedDate']; |
3560 |
27 Oct 15 |
olle |
var jsonExpirationDate = jsonConsumables['ExpirationDate']; |
3610 |
20 Nov 15 |
olle |
var jsonActive = jsonConsumables['Active']; |
3560 |
27 Oct 15 |
olle |
var jsonTimesUsed = jsonConsumables['TimesUsed']; |
3560 |
27 Oct 15 |
olle |
var jsonUnusedFpaPlateLocs = jsonConsumables['UnusedFpaPlateLocs']; |
3560 |
27 Oct 15 |
olle |
var jsonComment = jsonConsumables['Comment']; |
3560 |
27 Oct 15 |
olle |
116 |
*/ |
3610 |
20 Nov 15 |
olle |
117 |
|
3560 |
27 Oct 15 |
olle |
// Get kit component JSONArrays for all kits |
3560 |
27 Oct 15 |
olle |
jsonKitName = jsonConsumables['KitName']; |
3560 |
27 Oct 15 |
olle |
jsonLibraryPrepBox1 = jsonConsumables['LibraryPrepBox1']; |
3560 |
27 Oct 15 |
olle |
jsonIndexKit = jsonConsumables['IndexKit']; |
3560 |
27 Oct 15 |
olle |
jsonContentSetBox3 = jsonConsumables['ContentSetBox3']; |
3560 |
27 Oct 15 |
olle |
jsonOligoPoolA_FPA = jsonConsumables['OligoPoolA_FPA']; |
3560 |
27 Oct 15 |
olle |
jsonOligoPoolB_FPB = jsonConsumables['OligoPoolB_FPB']; |
3560 |
27 Oct 15 |
olle |
jsonOligoHybridizationSequencingReagent3 = jsonConsumables['OligoHybridizationSequencingReagent3']; |
3560 |
27 Oct 15 |
olle |
jsonStringentWash1_SW1 = jsonConsumables['StringentWash1_SW1']; |
3560 |
27 Oct 15 |
olle |
jsonExtensionLigationMix3 = jsonConsumables['ExtensionLigationMix3']; |
3560 |
27 Oct 15 |
olle |
jsonPcrMasterMix2_PMM2 = jsonConsumables['PcrMasterMix2_PMM2']; |
3560 |
27 Oct 15 |
olle |
jsonUB1 = jsonConsumables['UB1']; |
3560 |
27 Oct 15 |
olle |
jsonTDP = jsonConsumables['TDP']; |
3560 |
27 Oct 15 |
olle |
jsonFilterplate = jsonConsumables['Filterplate']; |
3560 |
27 Oct 15 |
olle |
132 |
|
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA701 = jsonConsumables['IndexPrimerA701']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA702 = jsonConsumables['IndexPrimerA702']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA703 = jsonConsumables['IndexPrimerA703']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA704 = jsonConsumables['IndexPrimerA704']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA705 = jsonConsumables['IndexPrimerA705']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA706 = jsonConsumables['IndexPrimerA706']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA707 = jsonConsumables['IndexPrimerA707']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA708 = jsonConsumables['IndexPrimerA708']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA709 = jsonConsumables['IndexPrimerA709']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA710 = jsonConsumables['IndexPrimerA710']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA711 = jsonConsumables['IndexPrimerA711']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA712 = jsonConsumables['IndexPrimerA712']; |
3560 |
27 Oct 15 |
olle |
145 |
|
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA501 = jsonConsumables['IndexPrimerA501']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA502 = jsonConsumables['IndexPrimerA502']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA503 = jsonConsumables['IndexPrimerA503']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA504 = jsonConsumables['IndexPrimerA504']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA505 = jsonConsumables['IndexPrimerA505']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA506 = jsonConsumables['IndexPrimerA506']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA507 = jsonConsumables['IndexPrimerA507']; |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA508 = jsonConsumables['IndexPrimerA508']; |
3560 |
27 Oct 15 |
olle |
154 |
|
3560 |
27 Oct 15 |
olle |
jsonRegistrationDate = jsonConsumables['RegistrationDate']; |
3560 |
27 Oct 15 |
olle |
jsonLastUpdatedDate = jsonConsumables['LastUpdatedDate']; |
3560 |
27 Oct 15 |
olle |
jsonExpirationDate = jsonConsumables['ExpirationDate']; |
3610 |
20 Nov 15 |
olle |
jsonActive = jsonConsumables['Active']; |
3560 |
27 Oct 15 |
olle |
jsonTimesUsed = jsonConsumables['TimesUsed']; |
3560 |
27 Oct 15 |
olle |
jsonUnusedFpaPlateLocs = jsonConsumables['UnusedFpaPlateLocs']; |
3560 |
27 Oct 15 |
olle |
jsonComment = jsonConsumables['Comment']; |
3560 |
27 Oct 15 |
olle |
// Get kit component values for current kit |
3560 |
27 Oct 15 |
olle |
var kitName = jsonKitName[index]; |
3560 |
27 Oct 15 |
olle |
var expirationDate = jsonExpirationDate[index]; |
3610 |
20 Nov 15 |
olle |
var active = jsonActive[index]; |
3560 |
27 Oct 15 |
olle |
var numTimesUsed = jsonTimesUsed[index]; |
3560 |
27 Oct 15 |
olle |
var unusedFpaPlateLocs = jsonUnusedFpaPlateLocs[index]; |
3560 |
27 Oct 15 |
olle |
var comment = jsonComment[index]; |
3560 |
27 Oct 15 |
olle |
169 |
|
3610 |
20 Nov 15 |
olle |
var activeStr = 'yes'; |
3610 |
20 Nov 15 |
olle |
if (!jsonActive[index]) |
3610 |
20 Nov 15 |
olle |
172 |
{ |
3610 |
20 Nov 15 |
olle |
activeStr = 'no'; |
3610 |
20 Nov 15 |
olle |
174 |
} |
3610 |
20 Nov 15 |
olle |
var timesUsed = '' + jsonTimesUsed[index]; |
3610 |
20 Nov 15 |
olle |
176 |
|
3560 |
27 Oct 15 |
olle |
// Enter default values for input fields |
3560 |
27 Oct 15 |
olle |
178 |
// |
3560 |
27 Oct 15 |
olle |
frm.expirationDate.value = Strings.encodeTags(expirationDate); |
3610 |
20 Nov 15 |
olle |
frm.active.value = activeStr; |
3610 |
20 Nov 15 |
olle |
frm.numTimesUsed.value = Strings.encodeTags(timesUsed); |
4206 |
04 Nov 16 |
olle |
//frm.unusedFpaLocs.value = Strings.encodeTags(unusedFpaPlateLocs); |
3560 |
27 Oct 15 |
olle |
frm.kitComment.value = Strings.encodeTags(comment); |
3560 |
27 Oct 15 |
olle |
184 |
// |
3560 |
27 Oct 15 |
olle |
Doc.element('libraryPrepBox1.default').innerHTML = Strings.encodeTags(jsonLibraryPrepBox1[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexKit.default').innerHTML = Strings.encodeTags(jsonIndexKit[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('contentSetBox3.default').innerHTML = Strings.encodeTags(jsonContentSetBox3[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('oligoPoolA_FPA.default').innerHTML = Strings.encodeTags(jsonOligoPoolA_FPA[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('oligoPoolB_FPB.default').innerHTML = Strings.encodeTags(jsonOligoPoolB_FPB[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('oligoHybridizationSequencingReagent3.default').innerHTML = Strings.encodeTags(jsonOligoHybridizationSequencingReagent3[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('stringentWash1_SW1.default').innerHTML = Strings.encodeTags(jsonStringentWash1_SW1[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('extensionLigationMix3.default').innerHTML = Strings.encodeTags(jsonExtensionLigationMix3[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('pcrMasterMix2_PMM2.default').innerHTML = Strings.encodeTags(jsonPcrMasterMix2_PMM2[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('ub1.default').innerHTML = Strings.encodeTags(jsonUB1[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('tdp.default').innerHTML = Strings.encodeTags(jsonTDP[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('filterplate.default').innerHTML = Strings.encodeTags(jsonFilterplate[index]); |
3560 |
27 Oct 15 |
olle |
197 |
// |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA701.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA701[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA702.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA702[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA703.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA703[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA704.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA704[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA705.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA705[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA706.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA706[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA707.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA707[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA708.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA708[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA709.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA709[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA710.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA710[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA711.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA711[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA712.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA712[index]); |
3560 |
27 Oct 15 |
olle |
210 |
// |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA501.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA501[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA502.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA502[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA503.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA503[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA504.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA504[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA505.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA505[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA506.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA506[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA507.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA507[index]); |
3560 |
27 Oct 15 |
olle |
Doc.element('indexPrimerA508.default').innerHTML = Strings.encodeTags(jsonIndexPrimerA508[index]); |
3560 |
27 Oct 15 |
olle |
219 |
|
3560 |
27 Oct 15 |
olle |
220 |
/* |
3560 |
27 Oct 15 |
olle |
var reagents = window.opener.ExtractionReg.REAGENTS; |
3560 |
27 Oct 15 |
olle |
for (var i = 0; i < reagents.length; i++) |
3560 |
27 Oct 15 |
olle |
223 |
{ |
3560 |
27 Oct 15 |
olle |
var rg = reagents[i]; |
3560 |
27 Oct 15 |
olle |
frm[rg].value = specimen[rg] || ''; |
3560 |
27 Oct 15 |
olle |
Doc.element(rg+'.default').innerHTML = Strings.encodeTags(pfrm[rg].value); |
3560 |
27 Oct 15 |
olle |
227 |
} |
3560 |
27 Oct 15 |
olle |
228 |
*/ |
3560 |
27 Oct 15 |
olle |
//details.checkForm(); |
4206 |
04 Nov 16 |
olle |
230 |
|
4206 |
04 Nov 16 |
olle |
// Get JSONObject with plate info for selected kit |
4206 |
04 Nov 16 |
olle |
details.kitPlateInfoLoaded(); |
4206 |
04 Nov 16 |
olle |
233 |
} |
4206 |
04 Nov 16 |
olle |
234 |
|
4206 |
04 Nov 16 |
olle |
details.kitPlateInfoLoaded = function() |
4206 |
04 Nov 16 |
olle |
236 |
{ |
4206 |
04 Nov 16 |
olle |
var frm = document.forms['meludi']; |
4206 |
04 Nov 16 |
olle |
// Get JSONObject with plate info for selected kit |
4206 |
04 Nov 16 |
olle |
var plateInfo = window.opener.ExtractionReg.fetchKitPlateInfo(); |
4206 |
04 Nov 16 |
olle |
if (plateInfo) |
4206 |
04 Nov 16 |
olle |
241 |
{ |
4206 |
04 Nov 16 |
olle |
// Display half plate chart of unused wells for FPA aliquots |
4206 |
04 Nov 16 |
olle |
bioplateGlobal = plateInfo; |
4206 |
04 Nov 16 |
olle |
var bioplate = bioplateGlobal; |
4206 |
04 Nov 16 |
olle |
// Editable plate table with checkboxes |
4206 |
04 Nov 16 |
olle |
var addCheckboxes = true; |
4206 |
04 Nov 16 |
olle |
var html = ''; |
4206 |
04 Nov 16 |
olle |
html += '<br>'; |
4206 |
04 Nov 16 |
olle |
html += details.buildKitInfoPlate(bioplate, addCheckboxes); |
4206 |
04 Nov 16 |
olle |
html += '<br>'; |
4206 |
04 Nov 16 |
olle |
Doc.element('kitplatetablecontent').innerHTML = html; |
4206 |
04 Nov 16 |
olle |
Doc.show('kitplatetablecontent'); |
4206 |
04 Nov 16 |
olle |
// Default plate table |
4206 |
04 Nov 16 |
olle |
addCheckboxes = false; |
4206 |
04 Nov 16 |
olle |
html = ''; |
4206 |
04 Nov 16 |
olle |
html += '<br>'; |
4206 |
04 Nov 16 |
olle |
html += details.buildKitInfoPlate(bioplate, addCheckboxes); |
4206 |
04 Nov 16 |
olle |
html += '<br>'; |
4206 |
04 Nov 16 |
olle |
Doc.element('kitplatetablecontentdefault').innerHTML = html; |
4206 |
04 Nov 16 |
olle |
Doc.show('kitplatetablecontentdefault'); |
4206 |
04 Nov 16 |
olle |
261 |
} |
3560 |
27 Oct 15 |
olle |
frm.kitComment.focus(); |
3560 |
27 Oct 15 |
olle |
263 |
} |
4206 |
04 Nov 16 |
olle |
264 |
|
4206 |
04 Nov 16 |
olle |
details.buildKitInfoPlate = function(plate, addCheckboxes) |
4206 |
04 Nov 16 |
olle |
266 |
{ |
4206 |
04 Nov 16 |
olle |
// Table with kit FPA plate location data |
4206 |
04 Nov 16 |
olle |
268 |
|
4206 |
04 Nov 16 |
olle |
// Added data for kit |
4206 |
04 Nov 16 |
olle |
var kitName = plate.kitName; |
4206 |
04 Nov 16 |
olle |
var expirationDate = plate.expirationDate; |
4206 |
04 Nov 16 |
olle |
var timesUsed = plate.timesUsed; |
4206 |
04 Nov 16 |
olle |
273 |
// |
4206 |
04 Nov 16 |
olle |
var unusedWellsJsonArr = plate.unusedWells; |
4206 |
04 Nov 16 |
olle |
var effUnusedWellsJsonArr = plate.effUnusedWells; |
4206 |
04 Nov 16 |
olle |
var reservedWellsJsonArr = plate.reservedWells; |
4206 |
04 Nov 16 |
olle |
277 |
|
4206 |
04 Nov 16 |
olle |
// Kit as plate |
4206 |
04 Nov 16 |
olle |
// Only show FPA columns, i.e. columns 0-5 |
4206 |
04 Nov 16 |
olle |
var colNoEnd = 5; |
4206 |
04 Nov 16 |
olle |
if (plate.geometry.columns < colNoEnd) |
4206 |
04 Nov 16 |
olle |
282 |
{ |
4206 |
04 Nov 16 |
olle |
colNoEnd = plate.geometry.columns; |
4206 |
04 Nov 16 |
olle |
284 |
} |
4206 |
04 Nov 16 |
olle |
285 |
|
4206 |
04 Nov 16 |
olle |
// Create HTML table header row |
4206 |
04 Nov 16 |
olle |
var html = ''; |
4206 |
04 Nov 16 |
olle |
html += '<table class="plate">'; |
4206 |
04 Nov 16 |
olle |
html += '<tr class="header"><th></th>'; |
4206 |
04 Nov 16 |
olle |
for (var colNo = 0; colNo <= colNoEnd; colNo++) |
4206 |
04 Nov 16 |
olle |
291 |
{ |
4206 |
04 Nov 16 |
olle |
html += '<th>'+(colNo+1)+'</th>'; |
4206 |
04 Nov 16 |
olle |
293 |
} |
4206 |
04 Nov 16 |
olle |
html += '</tr>'; |
4206 |
04 Nov 16 |
olle |
295 |
|
4206 |
04 Nov 16 |
olle |
var wells = plate.bioWells; |
4206 |
04 Nov 16 |
olle |
var wellNo = 0; |
4206 |
04 Nov 16 |
olle |
for (var rowNo = 0; rowNo < plate.geometry.rows; rowNo++) |
4206 |
04 Nov 16 |
olle |
299 |
{ |
4206 |
04 Nov 16 |
olle |
html += '<tr class="row-'+rowNo+'">'; |
4206 |
04 Nov 16 |
olle |
html += '<th>'+Meludi.wellToAlpha(rowNo)+'</th>'; |
4206 |
04 Nov 16 |
olle |
for (var colNo = 0; colNo <= colNoEnd; colNo++) |
4206 |
04 Nov 16 |
olle |
303 |
{ |
4206 |
04 Nov 16 |
olle |
var well = wells[wellNo]; |
4206 |
04 Nov 16 |
olle |
well.extraVolume = 0; |
4206 |
04 Nov 16 |
olle |
well.comment = ''; |
4206 |
04 Nov 16 |
olle |
307 |
|
4206 |
04 Nov 16 |
olle |
if (well.bioMaterial) |
4206 |
04 Nov 16 |
olle |
309 |
{ |
4206 |
04 Nov 16 |
olle |
html += '<td id="well-'+well.id+'"'; |
4206 |
04 Nov 16 |
olle |
html += ' class="well selectable col-'+colNo+'"'; |
4206 |
04 Nov 16 |
olle |
html += ' title="'+Strings.encodeTags(well.bioMaterial.name)+'" data-well-id="'+well.id+'"'; |
4206 |
04 Nov 16 |
olle |
html += '>0'+THIN_SPACE+'µl</td>'; |
4206 |
04 Nov 16 |
olle |
314 |
} |
4206 |
04 Nov 16 |
olle |
else |
4206 |
04 Nov 16 |
olle |
316 |
{ |
4206 |
04 Nov 16 |
olle |
// Check if kit is used for current well |
4206 |
04 Nov 16 |
olle |
var wellName = Meludi.wellToAlpha(rowNo) + (colNo+1); |
4206 |
04 Nov 16 |
olle |
var usedWell = true; |
4206 |
04 Nov 16 |
olle |
for (var i = 0; i < unusedWellsJsonArr.length; i++) |
4206 |
04 Nov 16 |
olle |
321 |
{ |
4206 |
04 Nov 16 |
olle |
var nameOfUnusedWell = unusedWellsJsonArr[i]; |
4206 |
04 Nov 16 |
olle |
if (wellName == nameOfUnusedWell) |
4206 |
04 Nov 16 |
olle |
324 |
{ |
4206 |
04 Nov 16 |
olle |
usedWell = false; |
4206 |
04 Nov 16 |
olle |
326 |
} |
4206 |
04 Nov 16 |
olle |
327 |
} |
4206 |
04 Nov 16 |
olle |
var effUsedWell = true; |
4206 |
04 Nov 16 |
olle |
for (var i = 0; i < effUnusedWellsJsonArr.length; i++) |
4206 |
04 Nov 16 |
olle |
330 |
{ |
4206 |
04 Nov 16 |
olle |
var nameOfUnusedWell = effUnusedWellsJsonArr[i]; |
4206 |
04 Nov 16 |
olle |
if (wellName == nameOfUnusedWell) |
4206 |
04 Nov 16 |
olle |
333 |
{ |
4206 |
04 Nov 16 |
olle |
effUsedWell = false; |
4206 |
04 Nov 16 |
olle |
335 |
} |
4206 |
04 Nov 16 |
olle |
336 |
} |
4206 |
04 Nov 16 |
olle |
var reservedWell = false; |
4206 |
04 Nov 16 |
olle |
for (var i = 0; i < reservedWellsJsonArr.length; i++) |
4206 |
04 Nov 16 |
olle |
339 |
{ |
4206 |
04 Nov 16 |
olle |
var nameOfReservedWell = reservedWellsJsonArr[i]; |
4206 |
04 Nov 16 |
olle |
if (wellName == nameOfReservedWell) |
4206 |
04 Nov 16 |
olle |
342 |
{ |
4206 |
04 Nov 16 |
olle |
reservedWell = true; |
4206 |
04 Nov 16 |
olle |
344 |
} |
4206 |
04 Nov 16 |
olle |
345 |
} |
4206 |
04 Nov 16 |
olle |
var wellType = ''; |
4206 |
04 Nov 16 |
olle |
if (usedWell) |
4206 |
04 Nov 16 |
olle |
348 |
{ |
4206 |
04 Nov 16 |
olle |
// Empty well |
4206 |
04 Nov 16 |
olle |
wellType = 'empty'; |
4206 |
04 Nov 16 |
olle |
351 |
} |
4206 |
04 Nov 16 |
olle |
else |
4206 |
04 Nov 16 |
olle |
353 |
{ |
4206 |
04 Nov 16 |
olle |
// Unused well |
4206 |
04 Nov 16 |
olle |
if (effUsedWell) |
4206 |
04 Nov 16 |
olle |
356 |
{ |
4206 |
04 Nov 16 |
olle |
wellType = 'unused'; |
4206 |
04 Nov 16 |
olle |
358 |
} |
4206 |
04 Nov 16 |
olle |
else |
4206 |
04 Nov 16 |
olle |
360 |
{ |
4206 |
04 Nov 16 |
olle |
if (reservedWell) |
4206 |
04 Nov 16 |
olle |
362 |
{ |
4206 |
04 Nov 16 |
olle |
wellType = 'reserved'; |
4206 |
04 Nov 16 |
olle |
364 |
} |
4206 |
04 Nov 16 |
olle |
else |
4206 |
04 Nov 16 |
olle |
366 |
{ |
4206 |
04 Nov 16 |
olle |
wellType = 'effunused'; |
4206 |
04 Nov 16 |
olle |
368 |
} |
4206 |
04 Nov 16 |
olle |
369 |
} |
4206 |
04 Nov 16 |
olle |
370 |
} |
4206 |
04 Nov 16 |
olle |
371 |
|
4206 |
04 Nov 16 |
olle |
// Add HTML for table column cell (one plate well) |
4206 |
04 Nov 16 |
olle |
if (addCheckboxes) |
4206 |
04 Nov 16 |
olle |
374 |
{ |
4206 |
04 Nov 16 |
olle |
var checkDefault = ''; |
4206 |
04 Nov 16 |
olle |
if (!usedWell) |
4206 |
04 Nov 16 |
olle |
377 |
{ |
4206 |
04 Nov 16 |
olle |
checkDefault = 'checked'; |
4206 |
04 Nov 16 |
olle |
379 |
} |
4206 |
04 Nov 16 |
olle |
//html += '<td class="kitwell ' + wellType + '">'; |
4206 |
04 Nov 16 |
olle |
html += '<td class="kitwell">'; |
4206 |
04 Nov 16 |
olle |
html += '<input type="checkbox" id="fpaWellCb-' + wellName + '" ' + checkDefault + ' />'; |
4206 |
04 Nov 16 |
olle |
383 |
} |
4206 |
04 Nov 16 |
olle |
else |
4206 |
04 Nov 16 |
olle |
385 |
{ |
4206 |
04 Nov 16 |
olle |
html += '<td class="kitwell ' + wellType + ' col-' + colNo + '">'; |
4206 |
04 Nov 16 |
olle |
387 |
} |
4206 |
04 Nov 16 |
olle |
html += '</td>'; |
4206 |
04 Nov 16 |
olle |
389 |
} |
4206 |
04 Nov 16 |
olle |
wellNo++; |
4206 |
04 Nov 16 |
olle |
391 |
} |
4206 |
04 Nov 16 |
olle |
html += '</tr>'; |
4206 |
04 Nov 16 |
olle |
393 |
} |
4206 |
04 Nov 16 |
olle |
html += '</table>'; |
4206 |
04 Nov 16 |
olle |
395 |
|
4206 |
04 Nov 16 |
olle |
return html; |
4206 |
04 Nov 16 |
olle |
397 |
} |
4206 |
04 Nov 16 |
olle |
398 |
|
3560 |
27 Oct 15 |
olle |
details.checkForm = function() |
3560 |
27 Oct 15 |
olle |
400 |
{ |
3560 |
27 Oct 15 |
olle |
var frm = document.forms['details']; |
3560 |
27 Oct 15 |
olle |
402 |
|
3560 |
27 Oct 15 |
olle |
var index = Data.int('page-data', 'index'); |
3560 |
27 Oct 15 |
olle |
404 |
/* |
3560 |
27 Oct 15 |
olle |
var selItemsList = getSelectedItemsList(); |
3560 |
27 Oct 15 |
olle |
var item = selItemsList[index]; |
3560 |
27 Oct 15 |
olle |
407 |
|
3560 |
27 Oct 15 |
olle |
// DNA |
3560 |
27 Oct 15 |
olle |
var dnaVolume = parseFloat(frm.dnaVolume.value); |
3560 |
27 Oct 15 |
olle |
if (!(dnaVolume > 0)) |
3560 |
27 Oct 15 |
olle |
411 |
{ |
3560 |
27 Oct 15 |
olle |
Forms.showNotification('dnaVolume', 'Invalid value for DNA volume.'); |
3560 |
27 Oct 15 |
olle |
return false; |
3560 |
27 Oct 15 |
olle |
414 |
} |
3560 |
27 Oct 15 |
olle |
415 |
|
3560 |
27 Oct 15 |
olle |
// RNA |
3560 |
27 Oct 15 |
olle |
var rnaVolume = parseFloat(frm.rnaVolume.value); |
3560 |
27 Oct 15 |
olle |
if (!(rnaVolume > 0)) |
3560 |
27 Oct 15 |
olle |
419 |
{ |
3560 |
27 Oct 15 |
olle |
Forms.showNotification('rnaVolume', 'Invalid value for RNA volume.'); |
3560 |
27 Oct 15 |
olle |
showError('Invalid value for RNA volume.'); |
3560 |
27 Oct 15 |
olle |
return false; |
3560 |
27 Oct 15 |
olle |
423 |
} |
3560 |
27 Oct 15 |
olle |
424 |
*/ |
3560 |
27 Oct 15 |
olle |
return true; |
3560 |
27 Oct 15 |
olle |
426 |
} |
3560 |
27 Oct 15 |
olle |
427 |
|
3560 |
27 Oct 15 |
olle |
details.expirationDateOnChange = function() |
3560 |
27 Oct 15 |
olle |
429 |
{ |
3560 |
27 Oct 15 |
olle |
var frm = document.forms['details']; |
3560 |
27 Oct 15 |
olle |
431 |
|
3560 |
27 Oct 15 |
olle |
var expirationDateIsValid = Wizard.isValid('expirationDate'); |
3560 |
27 Oct 15 |
olle |
//alert("edit_libprep_kit_details.js::expirationDateOnChange(): expirationDateIsValid = " + expirationDateIsValid); |
3560 |
27 Oct 15 |
olle |
434 |
|
3560 |
27 Oct 15 |
olle |
if (!expirationDateIsValid) return; |
3560 |
27 Oct 15 |
olle |
436 |
|
3560 |
27 Oct 15 |
olle |
var expirationDate = Dates.parseString(frm.expirationDate.value, 'yyyyMMdd'); |
3560 |
27 Oct 15 |
olle |
if (expirationDate == null) |
3560 |
27 Oct 15 |
olle |
439 |
{ |
3560 |
27 Oct 15 |
olle |
Forms.showNotification('expirationDate', 'Not a valid date.'); |
3560 |
27 Oct 15 |
olle |
//Wizard.setInputStatus('expirationDate', 'invalid', 'Not a valid date'); |
3560 |
27 Oct 15 |
olle |
return; |
3560 |
27 Oct 15 |
olle |
443 |
} |
3560 |
27 Oct 15 |
olle |
var currentDate = Dates.parseString(details.getTodaysDate(), 'yyyyMMdd'); |
3560 |
27 Oct 15 |
olle |
if (currentDate > expirationDate) |
3560 |
27 Oct 15 |
olle |
446 |
{ |
3560 |
27 Oct 15 |
olle |
Forms.showNotification('expirationDate', 'Expiration date is already passed!'); |
3560 |
27 Oct 15 |
olle |
//Wizard.setInputStatus('expirationDate', 'warning', 'Expiration date is already passed!'); |
3560 |
27 Oct 15 |
olle |
return; |
3560 |
27 Oct 15 |
olle |
450 |
} |
3560 |
27 Oct 15 |
olle |
451 |
|
3560 |
27 Oct 15 |
olle |
//Wizard.setInputStatus('expirationDate', 'valid'); |
3560 |
27 Oct 15 |
olle |
453 |
} |
3560 |
27 Oct 15 |
olle |
454 |
|
3560 |
27 Oct 15 |
olle |
details.getTodaysDate = function() |
3560 |
27 Oct 15 |
olle |
456 |
{ |
3560 |
27 Oct 15 |
olle |
// Get current time stamp |
3560 |
27 Oct 15 |
olle |
var now = new Date(); |
3560 |
27 Oct 15 |
olle |
return exreg.timestampToDateString(now); |
3560 |
27 Oct 15 |
olle |
460 |
} |
3560 |
27 Oct 15 |
olle |
461 |
|
3560 |
27 Oct 15 |
olle |
details.timestampToDateString = function(timestamp) |
3560 |
27 Oct 15 |
olle |
463 |
{ |
3560 |
27 Oct 15 |
olle |
// Get date in components yyyy, mm, dd |
3560 |
27 Oct 15 |
olle |
var yyyy = timestamp.getFullYear(); |
3560 |
27 Oct 15 |
olle |
var mm = timestamp.getMonth()+1; //January is 0! |
3560 |
27 Oct 15 |
olle |
if (mm < 10) |
3560 |
27 Oct 15 |
olle |
468 |
{ |
3560 |
27 Oct 15 |
olle |
mm = '0' + mm; |
3560 |
27 Oct 15 |
olle |
470 |
} |
3560 |
27 Oct 15 |
olle |
var dd = timestamp.getDate(); |
3560 |
27 Oct 15 |
olle |
if (dd < 10) |
3560 |
27 Oct 15 |
olle |
473 |
{ |
3560 |
27 Oct 15 |
olle |
dd = '0' + dd; |
3560 |
27 Oct 15 |
olle |
475 |
} |
3560 |
27 Oct 15 |
olle |
var dateString = '' + yyyy + mm + dd; |
3560 |
27 Oct 15 |
olle |
477 |
|
3560 |
27 Oct 15 |
olle |
return dateString; |
3560 |
27 Oct 15 |
olle |
479 |
} |
3560 |
27 Oct 15 |
olle |
480 |
|
4206 |
04 Nov 16 |
olle |
details.fetchUnusedFpaPlateLocations = function() |
4206 |
04 Nov 16 |
olle |
482 |
{ |
4206 |
04 Nov 16 |
olle |
var frm = document.forms['details']; |
4206 |
04 Nov 16 |
olle |
484 |
|
4206 |
04 Nov 16 |
olle |
// Fetch unused FPA plate locations from check box values in fpa locs table |
4206 |
04 Nov 16 |
olle |
var unusedFpaPlateLocations = ""; |
4206 |
04 Nov 16 |
olle |
// Only use FPA columns, i.e. columns 0-5 |
4206 |
04 Nov 16 |
olle |
var bioplate = bioplateGlobal; |
4206 |
04 Nov 16 |
olle |
var colNoEnd = 5; |
4206 |
04 Nov 16 |
olle |
if (bioplate.geometry.columns < colNoEnd) |
4206 |
04 Nov 16 |
olle |
491 |
{ |
4206 |
04 Nov 16 |
olle |
colNoEnd = bioplate.geometry.columns; |
4206 |
04 Nov 16 |
olle |
493 |
} |
4206 |
04 Nov 16 |
olle |
// Unused FPA plate locations are stored column after column, from top |
4206 |
04 Nov 16 |
olle |
for (var colNo = 0; colNo <= colNoEnd; colNo++) |
4206 |
04 Nov 16 |
olle |
496 |
{ |
4206 |
04 Nov 16 |
olle |
for (var rowNo = 0; rowNo < bioplate.geometry.rows; rowNo++) |
4206 |
04 Nov 16 |
olle |
498 |
{ |
4206 |
04 Nov 16 |
olle |
var wellName = Meludi.wellToAlpha(rowNo) + (colNo+1); |
4206 |
04 Nov 16 |
olle |
var checkboxId = 'fpaWellCb-' + wellName; |
4206 |
04 Nov 16 |
olle |
var unusedWell = frm[checkboxId].checked; |
4206 |
04 Nov 16 |
olle |
if (unusedWell) |
4206 |
04 Nov 16 |
olle |
503 |
{ |
4206 |
04 Nov 16 |
olle |
// Add well name to comma-separated list after optional comma |
4206 |
04 Nov 16 |
olle |
if (unusedFpaPlateLocations != "") |
4206 |
04 Nov 16 |
olle |
506 |
{ |
4206 |
04 Nov 16 |
olle |
unusedFpaPlateLocations += ","; |
4206 |
04 Nov 16 |
olle |
508 |
} |
4206 |
04 Nov 16 |
olle |
unusedFpaPlateLocations += wellName; |
4206 |
04 Nov 16 |
olle |
510 |
} |
4206 |
04 Nov 16 |
olle |
511 |
} |
4206 |
04 Nov 16 |
olle |
512 |
} |
4206 |
04 Nov 16 |
olle |
return unusedFpaPlateLocations; |
4206 |
04 Nov 16 |
olle |
514 |
} |
4206 |
04 Nov 16 |
olle |
515 |
|
4206 |
04 Nov 16 |
olle |
516 |
|
3560 |
27 Oct 15 |
olle |
details.saveDetails = function() |
3560 |
27 Oct 15 |
olle |
518 |
{ |
3560 |
27 Oct 15 |
olle |
if (!details.checkForm()) return; |
3560 |
27 Oct 15 |
olle |
520 |
|
3560 |
27 Oct 15 |
olle |
var index = Data.int('page-data', 'index'); |
3560 |
27 Oct 15 |
olle |
//var mode = Data.get('page-data', 'mode'); |
3560 |
27 Oct 15 |
olle |
523 |
|
3560 |
27 Oct 15 |
olle |
// Update JSONObject jsonConsumables |
3560 |
27 Oct 15 |
olle |
525 |
|
3560 |
27 Oct 15 |
olle |
var frm = document.forms['details']; |
3560 |
27 Oct 15 |
olle |
527 |
|
3610 |
20 Nov 15 |
olle |
// Convert 'active' string value to boolean |
3610 |
20 Nov 15 |
olle |
var activeStr = frm.active.value; |
3610 |
20 Nov 15 |
olle |
var active = true; |
3610 |
20 Nov 15 |
olle |
if (activeStr == 'no') |
3610 |
20 Nov 15 |
olle |
532 |
{ |
3610 |
20 Nov 15 |
olle |
active = false; |
3610 |
20 Nov 15 |
olle |
534 |
} |
3560 |
27 Oct 15 |
olle |
// Update kit component values for current kit |
3560 |
27 Oct 15 |
olle |
536 |
// |
3560 |
27 Oct 15 |
olle |
jsonLibraryPrepBox1[index] = valueToUse(jsonLibraryPrepBox1[index], frm.libraryPrepBox1.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexKit[index] = valueToUse(jsonIndexKit[index], frm.indexKit.value); |
3560 |
27 Oct 15 |
olle |
jsonContentSetBox3[index] = valueToUse(jsonContentSetBox3[index], frm.contentSetBox3.value); |
3560 |
27 Oct 15 |
olle |
jsonOligoPoolA_FPA[index] = valueToUse(jsonOligoPoolA_FPA[index], frm.oligoPoolA_FPA.value); |
3560 |
27 Oct 15 |
olle |
jsonOligoPoolB_FPB[index] = valueToUse(jsonOligoPoolB_FPB[index], frm.oligoPoolB_FPB.value); |
3560 |
27 Oct 15 |
olle |
jsonOligoHybridizationSequencingReagent3[index] = valueToUse(jsonOligoHybridizationSequencingReagent3[index], frm.oligoHybridizationSequencingReagent3.value); |
3560 |
27 Oct 15 |
olle |
jsonStringentWash1_SW1[index] = valueToUse(jsonStringentWash1_SW1[index], frm.stringentWash1_SW1.value); |
3560 |
27 Oct 15 |
olle |
jsonExtensionLigationMix3[index] = valueToUse(jsonExtensionLigationMix3[index], frm.extensionLigationMix3.value); |
3560 |
27 Oct 15 |
olle |
jsonPcrMasterMix2_PMM2[index] = valueToUse(jsonPcrMasterMix2_PMM2[index], frm.pcrMasterMix2_PMM2.value); |
3560 |
27 Oct 15 |
olle |
jsonUB1[index] = valueToUse(jsonUB1[index], frm.ub1.value); |
3560 |
27 Oct 15 |
olle |
jsonTDP[index] = valueToUse(jsonTDP[index], frm.tdp.value); |
3560 |
27 Oct 15 |
olle |
jsonFilterplate[index] = valueToUse(jsonFilterplate[index], frm.filterplate.value); |
3560 |
27 Oct 15 |
olle |
549 |
// |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA701[index] = valueToUse(jsonIndexPrimerA701[index], frm.indexPrimerA701.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA702[index] = valueToUse(jsonIndexPrimerA702[index], frm.indexPrimerA702.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA703[index] = valueToUse(jsonIndexPrimerA703[index], frm.indexPrimerA703.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA704[index] = valueToUse(jsonIndexPrimerA704[index], frm.indexPrimerA704.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA705[index] = valueToUse(jsonIndexPrimerA705[index], frm.indexPrimerA705.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA706[index] = valueToUse(jsonIndexPrimerA706[index], frm.indexPrimerA706.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA707[index] = valueToUse(jsonIndexPrimerA707[index], frm.indexPrimerA707.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA708[index] = valueToUse(jsonIndexPrimerA708[index], frm.indexPrimerA708.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA709[index] = valueToUse(jsonIndexPrimerA709[index], frm.indexPrimerA709.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA710[index] = valueToUse(jsonIndexPrimerA710[index], frm.indexPrimerA710.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA711[index] = valueToUse(jsonIndexPrimerA711[index], frm.indexPrimerA711.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA712[index] = valueToUse(jsonIndexPrimerA712[index], frm.indexPrimerA712.value); |
3560 |
27 Oct 15 |
olle |
562 |
// |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA501[index] = valueToUse(jsonIndexPrimerA501[index], frm.indexPrimerA501.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA502[index] = valueToUse(jsonIndexPrimerA502[index], frm.indexPrimerA502.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA503[index] = valueToUse(jsonIndexPrimerA503[index], frm.indexPrimerA503.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA504[index] = valueToUse(jsonIndexPrimerA504[index], frm.indexPrimerA504.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA505[index] = valueToUse(jsonIndexPrimerA505[index], frm.indexPrimerA505.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA506[index] = valueToUse(jsonIndexPrimerA506[index], frm.indexPrimerA506.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA507[index] = valueToUse(jsonIndexPrimerA507[index], frm.indexPrimerA507.value); |
3560 |
27 Oct 15 |
olle |
jsonIndexPrimerA508[index] = valueToUse(jsonIndexPrimerA508[index], frm.indexPrimerA508.value); |
3560 |
27 Oct 15 |
olle |
571 |
// |
3560 |
27 Oct 15 |
olle |
jsonExpirationDate[index] = frm.expirationDate.value; |
3610 |
20 Nov 15 |
olle |
jsonActive[index] = active; |
3560 |
27 Oct 15 |
olle |
jsonTimesUsed[index] = frm.numTimesUsed.value; |
4206 |
04 Nov 16 |
olle |
//jsonUnusedFpaPlateLocs[index] = frm.unusedFpaLocs.value; |
4206 |
04 Nov 16 |
olle |
jsonUnusedFpaPlateLocs[index] = details.fetchUnusedFpaPlateLocations(); |
3560 |
27 Oct 15 |
olle |
jsonComment[index] = frm.kitComment.value; |
3560 |
27 Oct 15 |
olle |
578 |
|
3560 |
27 Oct 15 |
olle |
// Set kit component JSONArrays for all kits |
3560 |
27 Oct 15 |
olle |
//jsonConsumables['KitName'] = ; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['LibraryPrepBox1'] = jsonLibraryPrepBox1; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexKit'] = jsonIndexKit; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['ContentSetBox3'] = jsonContentSetBox3; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['OligoPoolA_FPA'] = jsonOligoPoolA_FPA; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['OligoPoolB_FPB'] = jsonOligoPoolB_FPB; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['OligoHybridizationSequencingReagent3'] = jsonOligoHybridizationSequencingReagent3; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['StringentWash1_SW1'] = jsonStringentWash1_SW1; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['ExtensionLigationMix3'] = jsonExtensionLigationMix3; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['PcrMasterMix2_PMM2'] = jsonPcrMasterMix2_PMM2; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['UB1'] = jsonUB1; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['TDP'] = jsonTDP; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['Filterplate'] = jsonFilterplate; |
3560 |
27 Oct 15 |
olle |
593 |
|
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA701'] = jsonIndexPrimerA701; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA702'] = jsonIndexPrimerA702; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA703'] = jsonIndexPrimerA703; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA704'] = jsonIndexPrimerA704; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA705'] = jsonIndexPrimerA705; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA706'] = jsonIndexPrimerA706; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA707'] = jsonIndexPrimerA707; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA708'] = jsonIndexPrimerA708; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA709'] = jsonIndexPrimerA709; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA710'] = jsonIndexPrimerA710; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA711'] = jsonIndexPrimerA711; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA712'] = jsonIndexPrimerA712; |
3560 |
27 Oct 15 |
olle |
606 |
|
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA501'] = jsonIndexPrimerA501; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA502'] = jsonIndexPrimerA502; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA503'] = jsonIndexPrimerA503; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA504'] = jsonIndexPrimerA504; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA505'] = jsonIndexPrimerA505; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA506'] = jsonIndexPrimerA506; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA507'] = jsonIndexPrimerA507; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['IndexPrimerA508'] = jsonIndexPrimerA508; |
3560 |
27 Oct 15 |
olle |
615 |
|
3560 |
27 Oct 15 |
olle |
//jsonConsumables['RegistrationDate'] = ; |
3560 |
27 Oct 15 |
olle |
//jsonConsumables['LastUpdatedDate'] = ; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['ExpirationDate'] = jsonExpirationDate; |
3610 |
20 Nov 15 |
olle |
jsonConsumables['Active'] = jsonActive; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['TimesUsed'] = jsonTimesUsed; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['UnusedFpaPlateLocs'] = jsonUnusedFpaPlateLocs; |
3560 |
27 Oct 15 |
olle |
jsonConsumables['Comment'] = jsonComment; |
3560 |
27 Oct 15 |
olle |
623 |
|
3560 |
27 Oct 15 |
olle |
624 |
/* |
3560 |
27 Oct 15 |
olle |
if (mode != null && mode == 'ExtractionReg') |
3560 |
27 Oct 15 |
olle |
626 |
{ |
3560 |
27 Oct 15 |
olle |
var reagents = window.opener.ExtractionReg.REAGENTS; |
3560 |
27 Oct 15 |
olle |
for (var i = 0; i < reagents.length; i++) |
3560 |
27 Oct 15 |
olle |
629 |
{ |
3560 |
27 Oct 15 |
olle |
var rg = reagents[i]; |
3560 |
27 Oct 15 |
olle |
specimen[rg] = frm[rg].value || null; |
3560 |
27 Oct 15 |
olle |
632 |
} |
3560 |
27 Oct 15 |
olle |
633 |
} |
3560 |
27 Oct 15 |
olle |
634 |
*/ |
3560 |
27 Oct 15 |
olle |
635 |
|
3560 |
27 Oct 15 |
olle |
636 |
/* |
3560 |
27 Oct 15 |
olle |
if (mode != null && mode == 'ExtractionReg') |
3560 |
27 Oct 15 |
olle |
638 |
{ |
3560 |
27 Oct 15 |
olle |
window.opener.ExtractionReg.updateDetailsTable(); |
3560 |
27 Oct 15 |
olle |
640 |
} |
3560 |
27 Oct 15 |
olle |
else |
3560 |
27 Oct 15 |
olle |
642 |
{ |
3560 |
27 Oct 15 |
olle |
window.opener.ExtractionPrep.updateDetailsTable(); |
3560 |
27 Oct 15 |
olle |
644 |
} |
3560 |
27 Oct 15 |
olle |
645 |
*/ |
3560 |
27 Oct 15 |
olle |
window.opener.ExtractionReg.updateDetailsTable(); |
3560 |
27 Oct 15 |
olle |
window.close(); |
3560 |
27 Oct 15 |
olle |
648 |
} |
3560 |
27 Oct 15 |
olle |
649 |
|
3560 |
27 Oct 15 |
olle |
valueToUse = function(oldValue, newValue) |
3560 |
27 Oct 15 |
olle |
651 |
{ |
3560 |
27 Oct 15 |
olle |
var value = oldValue; |
3560 |
27 Oct 15 |
olle |
if (newValue != null && newValue != '') |
3560 |
27 Oct 15 |
olle |
654 |
{ |
3560 |
27 Oct 15 |
olle |
value = newValue; |
3560 |
27 Oct 15 |
olle |
656 |
} |
3560 |
27 Oct 15 |
olle |
return value; |
3560 |
27 Oct 15 |
olle |
658 |
} |
3560 |
27 Oct 15 |
olle |
659 |
/* |
3560 |
27 Oct 15 |
olle |
getSelectedItemsList = function() |
3560 |
27 Oct 15 |
olle |
661 |
{ |
3560 |
27 Oct 15 |
olle |
var pfrm = window.opener.document.forms['meludi']; |
3560 |
27 Oct 15 |
olle |
663 |
|
3560 |
27 Oct 15 |
olle |
// Get number of selected extract source items |
3560 |
27 Oct 15 |
olle |
var numItems = 0; |
3560 |
27 Oct 15 |
olle |
var selItemsList = []; |
3560 |
27 Oct 15 |
olle |
for (var i = 0; i < pfrm.extractSourceItems.length; i++) |
3560 |
27 Oct 15 |
olle |
668 |
{ |
3560 |
27 Oct 15 |
olle |
if (pfrm.extractSourceItems[i].selected) |
3560 |
27 Oct 15 |
olle |
670 |
{ |
3560 |
27 Oct 15 |
olle |
if (pfrm.extractSourceItems[i].item != null) |
3560 |
27 Oct 15 |
olle |
672 |
{ |
3560 |
27 Oct 15 |
olle |
selItemsList[numItems] = pfrm.extractSourceItems[i].item; |
3560 |
27 Oct 15 |
olle |
numItems++; |
3560 |
27 Oct 15 |
olle |
675 |
} |
3560 |
27 Oct 15 |
olle |
676 |
} |
3560 |
27 Oct 15 |
olle |
677 |
} |
3560 |
27 Oct 15 |
olle |
return selItemsList; |
3560 |
27 Oct 15 |
olle |
679 |
} |
3560 |
27 Oct 15 |
olle |
680 |
*/ |
3560 |
27 Oct 15 |
olle |
return details; |
3560 |
27 Oct 15 |
olle |
682 |
}(); |
3560 |
27 Oct 15 |
olle |
683 |
|
3560 |
27 Oct 15 |
olle |
Doc.onLoad(Details.initPage); |
3560 |
27 Oct 15 |
olle |
685 |
|