Changeset 1951
- Timestamp:
- Apr 24, 2013, 11:13:27 AM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk/resources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.jsp
r1947 r1951 36 36 37 37 <script language="JavaScript"> 38 var debug = true;38 var debug = false; 39 39 40 40 var quantitiesAreValid = false; … … 193 193 text += '<div class="name">'+rna.name+'</div>'; 194 194 195 var warningMsg = null;195 var warningMsg = []; 196 196 if (info.bioWell) 197 197 { … … 201 201 else if (!rna.stratagene && !rna.external) 202 202 { 203 if (!warningMsg) warningMsg= 'No location';203 warningMsg[warningMsg.length] = 'No location'; 204 204 } 205 205 … … 221 221 if (info.remainingQuantity < LOW_QUANTITY_WARNING_LIMIT) 222 222 { 223 if (!warningMsg) warningMsg= 'Low quantity';223 warningMsg[warningMsg.length] = 'Low quantity'; 224 224 } 225 225 } 226 226 else 227 227 { 228 if (!warningMsg) warningMsg= 'No quantity';228 warningMsg[warningMsg.length] = 'No quantity'; 229 229 } 230 230 if (info.rqs) 231 231 { 232 232 text += '<div class="quality-score">RQS='+Numbers.formatNumber(info.rqs, 1) + '</div>'; 233 if (info.rqs < QUALITY_SCORE_WARNING_LIMIT && !warningMsg) warningMsg= 'Low RQS value';233 if (info.rqs < QUALITY_SCORE_WARNING_LIMIT) warningMsg[warningMsg.length] = 'Low RQS value'; 234 234 } 235 235 else if (info.rin) 236 236 { 237 237 text += '<div class="quality-score">RIN='+Numbers.formatNumber(info.rin, 1) + '</div>'; 238 if (info.rin < QUALITY_SCORE_WARNING_LIMIT && !warningMsg) warningMsg= 'Low RIN value';238 if (info.rin < QUALITY_SCORE_WARNING_LIMIT) warningMsg[warningMsg.length] = 'Low RIN value'; 239 239 } 240 240 else 241 241 { 242 if (!warningMsg) warningMsg= 'No RQS/RIN value';242 warningMsg[warningMsg.length] = 'No RQS/RIN value'; 243 243 } 244 244 if (info.NDConc) … … 249 249 else 250 250 { 251 if (!warningMsg) warningMsg= 'No NDConc value';251 warningMsg[warningMsg.length] = 'No NDConc value'; 252 252 } 253 253 } … … 264 264 text += '<div class="comment">'+Main.encodeTags(info.comment)+'</div>'; 265 265 } 266 if (warningMsg )266 if (warningMsg.length > 0) 267 267 { 268 well.setWarning(warningMsg );268 well.setWarning(warningMsg.join('; ')); 269 269 } 270 270 } … … 1208 1208 } 1209 1209 1210 var contextRNA = null; 1210 1211 /** 1211 1212 Reacts to 'mouseup' and 'contextmenu' events for the bioplate. … … 1219 1220 // Can't just check the button since two events are sent ('mouseup' and 'contextmenu') 1220 1221 var showContext = event.type == 'contextmenu' && event.button == 2; 1221 1222 1222 1223 if (showContext) 1223 1224 { 1224 1225 event.preventDefault(); // Prevents the default right-click menu from appearing 1226 1227 // Get the well that is right-clicked and the RNA that is in it 1228 contextRNA = null; 1229 var well = event.target; 1230 while (well && (!well.id || well.id.indexOf('well') != 0)) 1231 { 1232 well = well.parentNode; 1233 } 1234 if (well) 1235 { 1236 var c = well.id.split(/\./); 1237 contextRNA = Plate.getWell(parseInt(c[1]), parseInt(c[2])).extract; 1238 } 1239 // Update the context meny 1240 var caseSummaryMenu = document.getElementById('mnuCaseSummary'); 1241 if (contextRNA) 1242 { 1243 caseSummaryMenu.title = 'Show case summary for ' + contextRNA.name; 1244 Main.show('sepCaseSummary'); 1245 Main.show('mnuCaseSummary'); 1246 } 1247 else 1248 { 1249 Main.hide('sepCaseSummary'); 1250 Main.hide('mnuCaseSummary'); 1251 } 1252 1225 1253 var menu = document.getElementById('menuContext'); 1226 1254 // 1 pixel offset to avoid losing well focus outline … … 1232 1260 setTimeout(showContextMenu, 100); 1233 1261 } 1262 } 1263 1264 function showCaseSummary() 1265 { 1266 if (!contextRNA) return; 1267 var caseName = contextRNA.name.substring(0, 7); 1268 var url = '../reports/case_summary.jsp?ID=<%=ID%>&caseName='+encodeURIComponent(caseName); 1269 url += '&pageType=popup'; 1270 Main.openPopup(url, 'CaseSummary'+caseName, 1000, 700); 1234 1271 } 1235 1272 … … 1649 1686 title="Flag" 1650 1687 icon="<%=home+"/images/flag.png"%>" 1688 /> 1689 <m:menuseparator id="sepCaseSummary" /> 1690 <m:menuitem 1691 id="mnuCaseSummary" 1692 icon="<%=home+"/images/case_summary.png"%>" 1693 onclick="showCaseSummary()" 1694 tooltip="Show case summary" 1695 title="Case summary…" 1651 1696 /> 1652 1697 </m:menu> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/show_flagged_rna.jsp
r1947 r1951 40 40 { 41 41 var rna = flagged[i]; 42 document.getElementById('rna.'+i).innerHTML = rna.name ;42 document.getElementById('rna.'+i).innerHTML = rna.name+'<img class="link case-summary" onclick="showCaseSummary(\''+rna.name+'\')" src="../images/case_summary.png">'; 43 43 if (rna.bioWell) 44 44 { … … 102 102 window.close(); 103 103 } 104 105 function showCaseSummary(name) 106 { 107 var caseName = name.substring(0, 7); 108 var url = '../reports/case_summary.jsp?ID=<%=ID%>&caseName='+encodeURIComponent(caseName); 109 url += '&pageType=popup'; 110 Main.openPopup(url, 'CaseSummary'+caseName, 1000, 700); 111 } 112 104 113 </script> 105 114 … … 109 118 color: #C80000; 110 119 font-weight: bold; 120 } 121 122 .case-summary 123 { 124 padding-left: 4px; 111 125 } 112 126 </style> -
extensions/net.sf.basedb.reggie/trunk/resources/reports/case_summary.jsp
r1915 r1951 59 59 final String caseName = request.getParameter("caseName"); 60 60 final String pageType = Values.getString(request.getParameter("pageType"), "default"); 61 boolean fullPage = "default".equals(pageType); 61 62 boolean iframe = "iframe".equals(pageType); 63 boolean popup = "popup".equals(pageType); 64 boolean fullPage = !iframe && !popup; 62 65 %> 63 66 <base:page type="<%=pageType %>" > … … 579 582 <base:body onload="init()"> 580 583 <div id="all-content"> 581 <p:path style="<%=fullPage ? "" : "display: none;"%>"><p:pathelement id="path-reggie" clazz="noprint" 582 title="Reggie" href="<%="../index.jsp?ID="+ID%>" 583 /><p:pathelement id="path-case-summary" title="<%="Case summary - " + HTML.encodeTags(caseName)%>" 584 /></p:path> 585 584 <% 585 if (fullPage) 586 { 587 %> 588 <p:path><p:pathelement id="path-reggie" clazz="noprint" 589 title="Reggie" href="<%="../index.jsp?ID="+ID%>" 590 /><p:pathelement id="path-case-summary" title="<%="Case summary - " + HTML.encodeTags(caseName)%>" 591 /></p:path> 592 <% 593 } 594 else if (popup) 595 { 596 %> 597 <h1>Case summary - <%= HTML.encodeTags(caseName)%></h1> 598 <% 599 } 600 %> 586 601 <div class="content"> 587 602 <form name="reggie" onsubmit="return false;"> 588 603 <% 589 if (fullPage )604 if (fullPage || popup) 590 605 { 591 606 %> … … 975 990 </div> 976 991 </div> 992 <% 993 if (popup) 994 { 995 %> 996 <base:buttongroup subclass="dialogbuttons topborder" id="dialogbuttons"> 997 <base:button onclick="window.close()" title="Close" /> 998 </base:buttongroup> 999 <% 1000 } 1001 %> 977 1002 </base:body> 978 1003 </base:page>
Note: See TracChangeset
for help on using the changeset viewer.