Changeset 4981
- Timestamp:
- Sep 25, 2018, 2:11:48 PM (4 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/flaggedalignment/search.js
r4980 r4981 442 442 html += '<th class="mode-reprocess num-col">RNA<br>(µg)</th>'; 443 443 html += '<th class="mode-reprocess" id="reprocess-header">Re-process</th>'; 444 // Note! Two "mode-resolve" columns here to get the same order for grouping 445 html += '<th class="mode-resolve dottedleft">Ok / Do not use?</th>'; 444 // Note! "mode-resolve" columns here to get the same order for grouping 445 html += '<th class="mode-resolve dottedleft">Ok</th>'; 446 html += '<th class="mode-resolve">DoNotUse</th>'; 447 html += '<th class="mode-resolve">FutureGT</th>'; 446 448 html += '<th class="mode-resolve comment-col">Comment</th>'; 447 449 … … 536 538 html += '<td rowspan="'+tbodySpan+'" class="mode-reprocess">'+(sp ? HTMLHelper.reprocessOptions(aligned, recommendReprocess) : '')+'</td>'; 537 539 538 html += '<td rowspan="'+tbodySpan+'" class="mode-resolve dottedleft">'+(sp ? HTMLHelper.resolveOptions(aligned, filterType) : '')+'</td>'; 540 html += '<td rowspan="'+tbodySpan+'" class="mode-resolve dottedleft">'+(sp ? HTMLHelper.okToUseOptions(aligned, filterType) : '')+'</td>'; 541 html += '<td rowspan="'+tbodySpan+'" class="mode-resolve">'+(sp ? HTMLHelper.resolveOptions(aligned, filterType) : '')+'</td>'; 542 html += '<td rowspan="'+tbodySpan+'" class="mode-resolve">'+(sp ? HTMLHelper.futureGtOptions(aligned, filterType) : '')+'</td>'; 539 543 html += '<td rowspan="'+tbodySpan+'" class="mode-resolve comment-col dottedright">'+(sp ? HTMLHelper.resolveComment(aligned) : '')+'</td>'; 540 544 } … … 850 854 var tmpId = event.currentTarget.id.replace('oktouse.', ''); 851 855 var doNotUseList = Doc.element('donotuse.'+tmpId); 856 var futureGtCheck = Doc.element('futuregt.'+tmpId); 852 857 var commentField = Doc.element('resolvecomment.'+tmpId); 853 858 if (event.currentTarget.checked) … … 857 862 Doc.removeClass(commentField, 'required'); 858 863 doNotUseList.disabled = true; 864 futureGtCheck.disabled = true; 859 865 } 860 866 else … … 871 877 var tmpId = event.currentTarget.id.replace('donotuse.', ''); 872 878 var value = event.currentTarget.value; 879 var futureGtCheck = Doc.element('futuregt.'+tmpId); 880 futureGtCheck.disabled = value == ''; 873 881 var commentField = Doc.element('resolvecomment.'+tmpId); 874 882 Doc.addOrRemoveClass(commentField, 'required', value != ''); … … 935 943 { 936 944 var img = bugIcons[alignment.buglevel]; 937 var imgTitle = alignment.buglevel > 0 && alignment.bugText.length > 0 ? alignment.bugText[0] : ''; 945 // .replace will strip simple HTML tags 946 var imgTitle = alignment.buglevel > 0 && alignment.bugText.length > 0 ? alignment.bugText[0].replace(/<\/?[^>]+(>|$)/g, '') : ''; 938 947 icons += '<img src="../images/'+img+'" title="'+imgTitle+'">'; 939 948 } … … 1116 1125 var okToUse = Doc.element('oktouse.'+aligned.tmpId); 1117 1126 var doNotUse = Doc.element('donotuse.'+aligned.tmpId); 1127 var futureGt = Doc.element('futuregt.'+aligned.tmpId); 1118 1128 var comment = Doc.element('resolvecomment.'+aligned.tmpId); 1119 1129 … … 1153 1163 Doc.addClass('section.'+aligned.tmpId, 'invalid'); 1154 1164 numInvalid++; 1165 } 1166 if (doNotUse.value && futureGt) 1167 { 1168 item.futureGt = futureGt.checked; 1155 1169 } 1156 1170 } … … 1551 1565 } 1552 1566 1567 helper.okToUseOptions = function(aligned, filterType) 1568 { 1569 var html = ''; 1570 if (aligned.flagged && !aligned.DO_NOT_USE) 1571 { 1572 var idOkToUse = 'oktouse.'+aligned.tmpId; 1573 var okValue = filterType == 'QIACUBE' ? 'ok-rna' : 'ok-library'; 1574 html += '<input type="checkbox" value="'+okValue+'" id="'+idOkToUse+'" name="'+idOkToUse+'" class="oktouse" title="Check this to indicate that the flagged item is ok to use.">'; 1575 } 1576 return html; 1577 } 1578 1553 1579 /** 1554 1580 We generate a checkbox (if the item is flagged) and a … … 1560 1586 if (aligned.DO_NOT_USE) 1561 1587 { 1562 html += '<input type="checkbox" style="visibility: hidden;">';1563 1588 html += aligned.DO_NOT_USE; 1564 1589 } … … 1566 1591 { 1567 1592 var idDoNotUse = 'donotuse.'+aligned.tmpId; 1568 var idOkToUse = 'oktouse.'+aligned.tmpId;1569 1593 var cls = aligned.flagged && filterType != 'HET' ? 'required' : ''; 1570 1571 if (aligned.flagged) 1572 { 1573 var okValue = filterType == 'QIACUBE' ? 'ok-rna' : 'ok-library'; 1574 html += '<input type="checkbox" value="'+okValue+'" id="'+idOkToUse+'" name="'+idOkToUse+'" class="oktouse" title="Check this to indicate that the flagged item is ok to use.">'; 1575 } 1576 else 1577 { 1578 // Dummy checkbox that is hidden. Used to make the selection lists align 1579 html += '<input type="checkbox" style="visibility: hidden;">'; 1580 } 1581 1594 1582 1595 html += '<select id="'+idDoNotUse+'" name="'+idDoNotUse+'" class="donotuse-options '+cls+'">'; 1583 1596 html += '<option value=""> '; … … 1594 1607 return html; 1595 1608 } 1609 1610 helper.futureGtOptions = function(aligned, filterType) 1611 { 1612 var html = ''; 1613 if (!aligned.DO_NOT_USE) 1614 { 1615 var idFutureGt = 'futuregt.'+aligned.tmpId; 1616 html += '<input type="checkbox" id="'+idFutureGt+'" name="'+idFutureGt+'" disabled title="Check this to use the alignment in future genotype checks.">'; 1617 } 1618 return html; 1619 } 1620 1596 1621 1597 1622 helper.resolveComment = function(aligned) -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/GenotypeServlet.java
r4980 r4981 531 531 int numUnflagged = 0; 532 532 int numDisabled = 0; 533 int numFutureGt = 0; 533 534 int numOkToUse = 0; 534 535 int numAutoUnflagged = 0; … … 546 547 String doNotUse = (String)jsonItem.get("doNotUse"); 547 548 boolean okToUse = Boolean.TRUE.equals(jsonItem.get("okToUse")); 549 boolean futureGt = Boolean.TRUE.equals(jsonItem.get("futureGt")); 548 550 String comment = (String)jsonItem.get("comment"); 549 551 … … 646 648 if (doNotUse != null) 647 649 { 648 Annotationtype.QC_GENOTYPE_STATUS.setAnnotationValue(dc, dba, "Disabled"); 649 jsonDebug.add("[Debug]Disabled: " + basicItem); 650 numDisabled++; 650 if (futureGt) 651 { 652 Annotationtype.QC_GENOTYPE_STATUS.setAnnotationValue(dc, dba, "Checked"); 653 jsonDebug.add("[Debug]FutureGT: " + basicItem); 654 numFutureGt++; 655 } 656 else 657 { 658 Annotationtype.QC_GENOTYPE_STATUS.setAnnotationValue(dc, dba, "Disabled"); 659 jsonDebug.add("[Debug]Disabled: " + basicItem); 660 numDisabled++; 661 } 651 662 } 652 663 else if (okToUse) … … 713 724 } 714 725 715 if (numDisabled > 0) 716 { 717 jsonMessages.add(countMessage(numDisabled, "alignment has", "alignments have") + " been disabled for future genotype checks."); 726 if (numDisabled > 0 || numFutureGt > 0) 727 { 728 StringBuilder msg = new StringBuilder(); 729 if (numDisabled > 0) 730 { 731 msg.append(countMessage(numDisabled, "alignment has", "alignments have")).append(" been disabled"); 732 } 733 if (numFutureGt > 0) 734 { 735 if (msg.length() > 0) msg.append(" and "); 736 msg.append(countMessage(numFutureGt, "alignment has", "alignments have")).append(" been retained"); 737 } 738 msg.append(" for future genotype checks."); 739 jsonMessages.add(msg.toString()); 718 740 } 719 741
Note: See TracChangeset
for help on using the changeset viewer.