Changeset 1816
- Timestamp:
- Jan 31, 2013, 1:06:21 PM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/branches/ticket-422
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/branches/ticket-422/resources/libprep/plate.js
r1814 r1816 322 322 cp.well = this; 323 323 cp.name = this.extract ? this.extract.name : null; 324 cp.comment = this.extract ? this.extract.comment : null; 324 325 this.clipboard = true; 325 326 this.copyText = cp.name; -
extensions/net.sf.basedb.reggie/branches/ticket-422/resources/libprep/select_rna.jsp
r1814 r1816 213 213 well.setError('RNA not found'); 214 214 } 215 if (rna.comment) 216 { 217 text += '<div class="comment">'+Main.encodeTags(rna.comment)+'</div>'; 218 } 215 219 } 216 220 else if (well.copyText) … … 436 440 } 437 441 well.extract.qc = newQc; 442 well.extract.comment = 'Toggle QC'; 438 443 count++; 439 444 } … … 576 581 { 577 582 rna = Rna.createByName(cp.name); 583 rna.comment = cp.comment; 578 584 } 579 585 else … … 618 624 wells[0].setExtract(rna1); 619 625 wells[1].setExtract(rna0); 626 Plate.paint(wells); 627 } 628 629 // Set a comment on the selected wells 630 function commentSelected(comment) 631 { 632 var wells = Plate.getSelected(); 633 634 if (comment == undefined) 635 { 636 if (wells.length == 0) 637 { 638 alert('No wells have been selected'); 639 return; 640 } 641 642 var count = 0; 643 for (var i = 0; i < wells.length; i++) 644 { 645 var well = wells[i]; 646 if (well.extract) 647 { 648 count++; 649 if (well.extract.comment) comment = well.extract.comment; 650 } 651 } 652 653 if (count == 0) 654 { 655 alert('None of the selected wells contain any RNA'); 656 return; 657 } 658 659 comment = prompt('Comment', comment || ''); 660 if (comment == null) return; 661 } 662 663 if (comment == '') comment = null; 664 for (var i = 0; i < wells.length; i++) 665 { 666 var well = wells[i]; 667 if (well.extract) well.extract.comment = comment; 668 } 620 669 Plate.paint(wells); 621 670 } … … 1082 1131 { 1083 1132 var well = wells[i]; 1133 var rna = well.extract; 1084 1134 if (well.hasWarning()) 1085 1135 { … … 1092 1142 else 1093 1143 { 1094 if ( well.extract && well.extract.id)1144 if (rna && rna.id) 1095 1145 { 1096 1146 var tmp = {}; … … 1098 1148 tmp.column = well.column; 1099 1149 tmp.rna = {}; 1100 tmp.rna.id = well.extract.id; 1101 tmp.rna.usedQuantity = well.extract.qc ? QUANTITY_QC : QUANTITY_REGULAR; 1150 tmp.rna.id = rna.id; 1151 tmp.rna.usedQuantity = rna.qc ? QUANTITY_QC : QUANTITY_REGULAR; 1152 tmp.rna.comment = rna.comment; 1102 1153 plateInfo.wells[plateInfo.wells.length] = tmp; 1103 1154 numRna++; 1104 if ( well.extract.stratagene) numStratagene++;1105 if ( well.extract.external) numExternal++;1155 if (rna.stratagene) numStratagene++; 1156 if (rna.external) numExternal++; 1106 1157 } 1107 1158 } … … 1253 1304 display: none; 1254 1305 } 1255 1256 1306 .volume 1257 1307 { … … 1261 1311 { 1262 1312 color: #0000C8; 1313 } 1314 .comment 1315 { 1316 font-style: italic; 1263 1317 } 1264 1318 #iconSpecialSelect … … 1356 1410 style="display: none; font-weight: normal; text-align: left;"> 1357 1411 <m:menuitem 1412 title="Comments…" 1413 icon="<%=home+"/images/comment.png"%>" 1414 onclick="commentSelected()" 1415 tooltip="Add a comment to the selected wells" 1416 /> 1417 <m:menuseparator /> 1418 <m:menuitem 1358 1419 title="Cut…" 1359 1420 icon="<%=home+"/images/cut.png"%>" … … 1487 1548 onclick="toggleQc()" 1488 1549 tooltip="Select/deselect RNA for QC" 1550 /> 1551 <tbl:button 1552 title="Comments…" 1553 image="<%=home+"/images/comment.png"%>" 1554 onclick="commentSelected()" 1555 tooltip="Add a comment to the selected wells" 1489 1556 /> 1490 1557 <tbl:button -
extensions/net.sf.basedb.reggie/branches/ticket-422/src/net/sf/basedb/reggie/servlet/MRnaServlet.java
r1807 r1816 251 251 252 252 r.setAnnotation("rna", rna.asJSONObject()); 253 r.setAnnotation("comment", r.getItem().getDescription()); 253 254 jsonMRna.add(r.asJSONObject()); 254 255 … … 366 367 Extract mRna = Extract.getNew(dc, destPlate); 367 368 mRna.setItemSubtype(mRnaType); 369 mRna.setDescription((String)jsonRna.get("comment")); 368 370 369 371 int childNum;
Note: See TracChangeset
for help on using the changeset viewer.