Changeset 1946
- Timestamp:
- Apr 19, 2013, 3:48:04 PM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.jsp
r1942 r1946 145 145 } 146 146 return true; 147 } 148 149 rna.flag = function(r, flag) 150 { 151 if (!r.info || r.info.flag) return false; 152 r.info.flag = flag; 153 flagged[flagged.length] = r.info; 147 154 } 148 155 … … 253 260 text += '<div class="comment">'+Main.encodeTags(rna.comment)+'</div>'; 254 261 } 262 if (info && info.comment) 263 { 264 text += '<div class="comment">'+Main.encodeTags(info.comment)+'</div>'; 265 } 255 266 if (warningMsg) 256 267 { … … 751 762 Plate.paint(wells); 752 763 } 764 765 //Flag the selected RNA 766 function flagSelected(flag) 767 { 768 var wells = Plate.getSelected(); 769 770 if (wells.length == 0) 771 { 772 alert('No wells have been selected'); 773 return; 774 } 775 776 var comment = null; 777 if (flag == 'ManualFlag') 778 { 779 // Check if a comment has been set on any of the RNA 780 for (var i = 0; i < wells.length; i++) 781 { 782 var well = wells[i]; 783 if (well.extract && well.extract.info) 784 { 785 if (well.extract.info.comment) comment = well.extract.info.comment; 786 } 787 } 788 comment = prompt('Comment', comment || ''); 789 } 790 791 var count = 0; 792 for (var i = 0; i < wells.length; i++) 793 { 794 var well = wells[i]; 795 var rna = well.extract; 796 if (rna && !rna.stratagene && !rna.external) 797 { 798 Rna.flag(rna, flag); 799 rna.info.comment = comment; 800 well.setExtract(null); 801 count++; 802 } 803 well.selected = false; 804 } 805 806 updateNumFlaggedRna(); 807 Plate.paint(wells); 808 } 809 753 810 754 811 /** … … 1157 1214 { 1158 1215 var frm = document.forms['reggie']; 1159 var showContext = false; 1160 1161 if (frm.contextMenu[0].checked) 1162 { 1163 // Context menu on 'right' mouse button 1164 // Can't just check the button since two events are sent ('mouseup' and 'contextmenu') 1165 showContext = event.type == 'contextmenu' && event.button == 2; 1166 } 1167 else 1168 { 1169 // Context menu on 'middle' mouse button 1170 showContext = event.button == 1; 1171 } 1216 // Context menu on 'right' mouse button 1217 // Can't just check the button since two events are sent ('mouseup' and 'contextmenu') 1218 var showContext = event.type == 'contextmenu' && event.button == 2; 1172 1219 1173 1220 if (showContext) … … 1258 1305 tmp.id = rna.id; 1259 1306 tmp.flag = rna.flag; 1307 tmp.comment = rna.comment; 1260 1308 flaggedRnaInfo[flaggedRnaInfo.length] = tmp; 1261 1309 } … … 1338 1386 1339 1387 var flagged = Rna.getFlagged(); 1340 Main.openPopup('show_flagged_rna.jsp?ID=<%=ID%>&numFlagged='+flagged.length+'&numSelected='+currentSelected.length, 'FlaggedRna', 700, 500);1388 Main.openPopup('show_flagged_rna.jsp?ID=<%=ID%>&numFlagged='+flagged.length+'&numSelected='+currentSelected.length, 'FlaggedRna', 800, 500); 1341 1389 } 1342 1390 … … 1539 1587 tooltip="Add a comment to the selected wells" 1540 1588 /> 1589 <m:menuitem 1590 title="Toggle QC" 1591 icon="<%=home+"/images/mrnaqc.png"%>" 1592 onclick="toggleQc()" 1593 tooltip="Select/deselect RNA for QC" 1594 /> 1541 1595 <m:menuseparator /> 1542 1596 <m:menuitem … … 1565 1619 /> 1566 1620 <m:menuseparator /> 1621 <m:submenu 1622 subid="flagMenu" 1623 title="Flag" 1624 icon="<%=home+"/images/flag.png"%>" 1625 /> 1626 </m:menu> 1627 1628 <m:menu 1629 id="flagMenu" 1630 style="display: none;" 1631 > 1567 1632 <m:menuitem 1568 title="Toggle QC" 1569 icon="<%=home+"/images/mrnaqc.png"%>" 1570 onclick="toggleQc()" 1571 tooltip="Select/deselect RNA for QC" 1633 title="LowQualityScore" 1634 onclick="flagSelected('LowQualityScore')" 1635 tooltip="Flag the selected RNA" 1636 /> 1637 <m:menuitem 1638 title="NotEnoughRemainingQuantity" 1639 onclick="flagSelected('NotEnoughRemainingQuantity')" 1640 tooltip="Flag the selected RNA" 1641 /> 1642 <m:menuitem 1643 title="Other..." 1644 onclick="flagSelected('ManualFlag')" 1645 tooltip="Flag the selected RNA" 1572 1646 /> 1573 1647 </m:menu> … … 1605 1679 <td class="help"> 1606 1680 Select the Stratagene tube to use. If not known, the 1607 generic <b>Stratagene.r</b> (last in the list)should be used.1681 generic <b>Stratagene.r</b> should be used. 1608 1682 </td> 1609 1683 </tr> … … 1653 1727 <td class="status"></td> 1654 1728 <td class="help">Toggles visiblity of the selected information inside each well on the plate.</td> 1655 </tr>1656 <tr style="vertical-align: top;">1657 <td class="prompt">Context menu</td>1658 <td class="input">1659 <input type="radio" name="contextMenu" id="contextMenuRight" checked><label for="contextMenuRight">Right</label>1660 <input type="radio" name="contextMenu" id="contextMenuMiddle"><label for="contextMenuMiddle">Middle</label> mouse button<br>1661 <br>1662 </td>1663 <td class="status"></td>1664 <td class="help">Use the selected mouse button to display a context-menu when clicking on the plate.</td>1665 1729 </tr> 1666 1730 </table> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/show_flagged_rna.jsp
r1940 r1946 48 48 document.getElementById('remainingQuantity.'+i).innerHTML = rna.remainingQuantity; 49 49 document.getElementById('qualityScore.'+i).innerHTML = rna.rqs || rna.rin; 50 document.getElementById('comment.'+i).innerHTML = rna.comment; 50 51 document.getElementById('flag.'+i).innerHTML = rna.flag; 51 52 if (rna.flag == 'NotEnoughRemainingQuantity') … … 56 57 { 57 58 makeBold('qualityScore.'+i) 59 } 60 else 61 { 62 makeBold('comment.'+i); 58 63 } 59 64 frm['use.'+i].rna = rna; … … 101 106 <tbl:columndef id="remainingQuanity" title="Remaining (µg)" /> 102 107 <tbl:columndef id="qualityScore" title="RQS/RIN" /> 108 <tbl:columndef id="comment" title="Comment" /> 103 109 <tbl:columndef id="flag" title="Flag" /> 104 110 … … 121 127 <tbl:cell column="remainingQuanity" id="<%="remainingQuantity."+i%>"></tbl:cell> 122 128 <tbl:cell column="qualityScore" id="<%="qualityScore."+i%>"></tbl:cell> 129 <tbl:cell column="comment" id="<%="comment."+i%>"></tbl:cell> 123 130 <tbl:cell column="flag" id="<%="flag."+i%>"></tbl:cell> 124 131 </tbl:row> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Rna.java
r1941 r1946 47 47 */ 48 48 public static final String FLAG_LOW_QUALITY_SCORE = "LowQualityScore"; 49 50 /** 51 Flag value for the {@link Annotationtype#FLAG} annotation when a RNA 52 has been manually flagged for some other reason. The desription of 53 the RNA item should contain more information. 54 @since 2.12 55 */ 56 public static final String FLAG_MANUAL = "ManualFlag"; 49 57 50 58 /** -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r1943 r1946 233 233 jsonChecks.add(checkAnnotationType(dc, Annotationtype.FLAG, 1, 234 234 new ValueOptions(Rna.FLAG_NOT_ENOUGH_REMAINING_QUANTITY, Rna.FLAG_LOW_QUALITY_SCORE, 235 Rna.FLAG_MANUAL, 235 236 Rna.FLAG_MRNA_PLATE_FAILED, Rna.FLAG_CDNA_PLATE_FAILED, Rna.FLAG_LIB_PLATE_FAILED), 236 237 effectiveOptions, createIfMissing)); -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MRnaServlet.java
r1940 r1946 243 243 r.setAnnotation("remainingQuantity", r.getExtract().getRemainingQuantity()); 244 244 r.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null); 245 r.setAnnotation("comment", r.getExtract().getDescription()); 245 246 jsonRna.add(r.asJSONObject()); 246 247 } … … 460 461 Number rnaId = (Number)jsonRna.get("id"); 461 462 Extract rna = Extract.getById(dc, rnaId.intValue()); 463 rna.setDescription((String)jsonRna.get("comment")); 462 464 463 465 // Safety check in case a flagged RNA is also on the plate
Note: See TracChangeset
for help on using the changeset viewer.