-
Notifications
You must be signed in to change notification settings - Fork 0
/
untitled2
52 lines (45 loc) · 1.99 KB
/
untitled2
1
we want to print out the lab-produced designationif we are being edited1) if we were lab-produced and integratedand now we are lab-produced and extra-chromosomal, print the next number2) if we were lab-produced and extra-chromosomaland now we are lab-produced and integrated, print the next numberif we were lab-produce and now externally-sourcedjust print lab-producedif were externally-sourced and now now lab-producedwe always print the next valuekurLabProducedSavedState = $("#kurLabProducedStateHiddenField").val();kurIsSavedState = $("#kurExOrIsStateHiddenField").val(); // if I am external, then I need to update BOTH integrated states if (kurLabProducedSavedState == false) { // I wasn't lab produced and now I am alert("I was external"); if (transGeneStateObject.labProducedState == 'lab-produced') { if (transGeneStateObject.integratedState == 'extra-chromosomal') { alert("I am now lab-produced and extra-chromosomal"); labLabelMerged = labLabel.concat("kur", kurExNumber); $("#lab-label").text(labLabelMerged); } else { if (transGeneStateObject.integratedState == 'integrated') { alert("I am now lab-produced and integrated"); labLabelMerged = labLabel.concat("kur", kurIsNumber); $("#lab-label").text(labLabelMerged); } } } } else { // in this instance I am already lab produced, but I can be switch chromosomal states if (kurLabProducedSavedState == true) { alert("I was lab-produced"); if ( (kurIsSavedState == true) && (transGeneStateObject.integratedState == 'extra-chromosomal') ) { alert("was integrated but now extra-chromosomal"); labLabelMerged = labLabel.concat("kur", kurExNumber); $("#lab-label").text(labLabelMerged); } if ((kurIsSavedState == false) && (transGeneStateObject.integratedState == 'integrated')) { alert("was extra-chromosomal but now integrated"); labLabelMerged = labLabel.concat("kur", kurIsNumber); $("#lab-label").text(labLabelMerged); } } }