Changeset 2089
- Timestamp:
- Oct 21, 2013, 9:02:52 AM (9 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/flowcell_registration.jsp
r2079 r2089 30 30 <script language="JavaScript"> 31 31 32 var debug = true;32 var debug = 0; 33 33 var currentStep = 1; 34 34 … … 37 37 var dateIsValid = []; 38 38 var flowCellIdIsValid = []; 39 var readStringIsValid = [];39 var sequencingCyclesIsValid = []; 40 40 41 41 function init() … … 128 128 { 129 129 var fc = frm.flowcells[i].flowCell; 130 //Main.debug(fc.name + ':'+ fc.id + ':' + flowCellIsValid['fc.'+fc.id+'.id'] + ':' + flowCellIsValid['fc.'+fc.id+'.readString']);131 130 if (flowCellIdIsValid['fc-'+index+'.externalId'] != true) return false; 132 131 if (dateIsValid['fc-'+index+'.clusterDate'] != true) return false; … … 157 156 { 158 157 var fc = frm.flowcells[i].flowCell; 159 //Main.debug(fc.name + ':'+ fc.id + ':' + flowCellIsValid['fc.'+fc.id+'.id'] + ':' + flowCellIsValid['fc.'+fc.id+'.readString']); 160 if (readStringIsValid['fc-'+index+'.readString'] != true) return false; 158 if (sequencingCyclesIsValid['fc-'+index+'.sequencingCycles'] != true) return false; 161 159 index++; 162 160 } … … 318 316 var fc = frm.flowcells[i].flowCell; 319 317 var prefix = 'fc-'+index; 320 setInnerHTML(prefix+'. name.s', fc.name);321 setInnerHTML(prefix+'.externalId', '<b>ID:</b> ' + frm[prefix+'.externalId'].value);322 frm[prefix+'. readString'].value = fc.ReadString;323 readStringOnBlur(prefix+'.readString');318 setInnerHTML(prefix+'.externalId', frm[prefix+'.externalId'].value); 319 document.getElementById(prefix+'.externalId').title = fc.name; 320 frm[prefix+'.sequencingCycles'].value = fc.SequencingCycles; 321 sequencingCyclesOnBlur(prefix+'.sequencingCycles'); 324 322 index++; 325 323 } … … 492 490 } 493 491 494 function readStringOnBlur(readStringField)495 { 496 var frm = document.forms['reggie']; 497 498 setInputStatus( readStringField, '', '');499 readStringIsValid[readStringField] = false;500 501 var readString = frm[readStringField].value;502 if ( readString== '')503 { 504 setInputStatus( readStringField, 'ReadStringis a required value', 'invalid');492 function sequencingCyclesOnBlur(sequencingCyclesField) 493 { 494 var frm = document.forms['reggie']; 495 496 setInputStatus(sequencingCyclesField, '', ''); 497 sequencingCyclesIsValid[sequencingCyclesField] = false; 498 499 var sequencingCycles = frm[sequencingCyclesField].value; 500 if (sequencingCycles == '') 501 { 502 setInputStatus(sequencingCyclesField, 'Sequencing cycles is a required value', 'invalid'); 505 503 return; 506 504 } 507 if (! readString.match(/^([YNIJ]\d+)+$/))508 { 509 setInputStatus( readStringField, 'Not a valid ReadStringvalue', 'invalid');505 if (!sequencingCycles.match(/^\d+\-\d+\-\d+$/)) 506 { 507 setInputStatus(sequencingCyclesField, 'Not a valid Sequencing cycles value', 'invalid'); 510 508 return; 511 509 } 512 510 513 readStringIsValid[readStringField] = true;514 setInputStatus( readStringField, '', 'valid');511 sequencingCyclesIsValid[sequencingCyclesField] = true; 512 setInputStatus(sequencingCyclesField, '', 'valid'); 515 513 } 516 514 … … 563 561 { 564 562 var fc = frm.flowcells[i].flowCell; 565 frm['fc-'+index+'. readString'].disabled = true;563 frm['fc-'+index+'.sequencingCycles'].disabled = true; 566 564 fc.externalId = frm['fc-'+index+'.externalId'].value; 567 565 fc.clusterDate = frm['fc-'+index+'.clusterDate'].value; … … 570 568 if (!failed) 571 569 { 572 fc. ReadString = frm['fc-'+index+'.readString'].value;570 fc.SequencingCycles = frm['fc-'+index+'.sequencingCycles'].value; 573 571 fc.HiSeqPosition = Forms.getCheckedRadio(frm['fc-'+index+'.pos']).value; 574 572 } … … 910 908 <td class="prompt"></td> 911 909 <td style="font-weight: bold;">HiSeq position</td> 912 <td style="font-weight: bold;"> ReadString</td>910 <td style="font-weight: bold;">Sequencing cycles</td> 913 911 <td class="status"></td> 914 912 <td class="help"></td> 915 913 </tr> 914 <tr valign="top"> 915 <td class="prompt"></td> 916 <td></td> 917 <td style="font-style: italic;">(Read 1 - Index - Read 2)</td> 918 <td class="status"></td> 919 <td class="help"></td> 920 </tr> 916 921 <tr valign="top" class="fc-0"> 917 <td class="subprompt"><span id="fc-0. name.s"></span></td>922 <td class="subprompt"><span id="fc-0.externalId"></span></td> 918 923 <td> 919 924 <label><input type="radio" name="fc-0.pos" value="A" onclick="hiseqPosOnClick(0)" checked>A</label> … … 921 926 <label><input type="radio" name="fc-0.pos" value="B" onclick="hiseqPosOnClick(0)">B</label> 922 927 </td> 923 <td><input type="text" class="required" name="fc-0. readString" onblur="readStringOnBlur(this.name)"></td>924 <td class="status" id="fc-0. readString.status"></td>925 <td class="help"><span id="fc-0. readString.message" class="message"></span><span id="fc-0.externalId"></span></td>928 <td><input type="text" class="required" name="fc-0.sequencingCycles" onblur="sequencingCyclesOnBlur(this.name)"></td> 929 <td class="status" id="fc-0.sequencingCycles.status"></td> 930 <td class="help"><span id="fc-0.sequencingCycles.message" class="message"></span></td> 926 931 </tr> 927 932 <tr valign="top" class="fc-1"> 928 <td class="subprompt"><span id="fc-1. name.s"></span></td>933 <td class="subprompt"><span id="fc-1.externalId"></span></td> 929 934 <td> 930 935 <label><input type="radio" name="fc-1.pos" value="A" onclick="hiseqPosOnClick(1)">A</label> … … 932 937 <label><input type="radio" name="fc-1.pos" value="B" onclick="hiseqPosOnClick(1)" checked>B</label> 933 938 </td> 934 <td><input type="text" class="required" name="fc-1. readString" onblur="readStringOnBlur(this.name)"></td>935 <td class="status" id="fc-1. readString.status"></td>936 <td class="help"><span id="fc-1. readString.message" class="message"></span><span id="fc-1.externalId"></span></td>939 <td><input type="text" class="required" name="fc-1.sequencingCycles" onblur="sequencingCyclesOnBlur(this.name)"></td> 940 <td class="status" id="fc-1.sequencingCycles.status"></td> 941 <td class="help"><span id="fc-1.sequencingCycles.message" class="message"></span></td> 937 942 </tr> 938 943 -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FlowCellServlet.java
r2087 r2089 165 165 for (FlowCell fc : flowCells) 166 166 { 167 fc.loadAnnotations(dc, " ReadString", Annotationtype.READ_STRING, null);167 fc.loadAnnotations(dc, "SequencingCycles", Annotationtype.SEQUENCING_CYCLES, null); 168 168 fc.loadAnnotations(dc, "externalId", Annotationtype.FLOWCELL_ID, null); 169 169 fc.setAnnotation("comments", fc.getPhysicalBioAssay().getDescription()); … … 429 429 { 430 430 sequenceRun.addPhysicalBioAssay(flowCell); 431 Annotationtype. READ_STRING.setAnnotationValue(dc, flowCell, jsonFlowCell.get("ReadString"));431 Annotationtype.SEQUENCING_CYCLES.setAnnotationValue(dc, flowCell, jsonFlowCell.get("SequencingCycles")); 432 432 Annotationtype.HISEQ_POSITION.setAnnotationValue(dc, flowCell, jsonFlowCell.get("HiSeqPosition")); 433 433
Note: See TracChangeset
for help on using the changeset viewer.