Changeset 5710
- Timestamp:
- Aug 29, 2011, 2:41:51 PM (12 years ago)
- Location:
- trunk/www
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/biomaterials/wizards/place_on_plate.jsp
r5557 r5710 28 28 import="net.sf.basedb.core.Hardware" 29 29 import="net.sf.basedb.core.Protocol" 30 import="net.sf.basedb.core.ItemSubtype" 30 31 import="net.sf.basedb.core.DbControl" 32 import="net.sf.basedb.core.SystemItems" 31 33 import="net.sf.basedb.core.Item" 32 34 import="net.sf.basedb.core.ItemContext" … … 64 66 ItemQuery<MeasuredBioMaterial> query = (ItemQuery<MeasuredBioMaterial>)cc.getQuery(); 65 67 List<MeasuredBioMaterial> bioMaterial = Collections.emptyList(); 68 ItemSubtype commonSubtype = null; 66 69 if (query != null) 67 70 { … … 106 109 itemList = new ItemList('itemlist'); 107 110 <% 111 boolean first = true; 108 112 for (MeasuredBioMaterial bm : bioMaterial) 109 113 { 110 114 String itemId = Integer.toString(bm.getId()); 115 if (first) 116 { 117 commonSubtype = bm.getItemSubtype(); 118 first = false; 119 } 120 else if (commonSubtype != null) 121 { 122 if (!commonSubtype.equals(bm.getItemSubtype())) 123 { 124 commonSubtype = null; 125 } 126 } 111 127 %> 112 128 itemList.addItem(<%=itemId%>, '<%=HTML.javaScriptEncode(bm.getName())%>'); … … 390 406 var url = '../bioplates/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&callback=setBioPlateCallback'; 391 407 url += '&resetTemporary=1&tmpfilter:INT:bioPlateType.bioMaterialType=|<%=itemType.getValue()%>' 408 <% 409 if (commonSubtype != null) 410 { 411 %> 412 url += '&tmpfilter:INT:bioPlateType.itemSubtype=|<%=commonSubtype.getId()%>' 413 <% 414 } 415 %> 392 416 Main.openPopup(url, 'SelectBioPlate', 1000, 700); 393 417 } … … 535 559 } 536 560 url += '&resetTemporary=1'; 561 <% 562 if (commonSubtype != null) 563 { 564 ItemSubtype hardwareType = commonSubtype.getRelatedSubtype(Item.HARDWARE); 565 if (hardwareType != null) 566 { 567 %> 568 url += '&tmpfilter:INT:itemSubtype=<%=hardwareType.getId()%>'; 569 <% 570 } 571 } 572 %> 537 573 Main.openPopup(url, 'SelectHardware', 1000, 700); 538 574 } … … 560 596 } 561 597 url += '&resetTemporary=1'; 598 <% 599 ItemSubtype protocolType = null; 600 if (commonSubtype != null) 601 { 602 protocolType = commonSubtype.getRelatedSubtype(Item.PROTOCOL); 603 } 604 if (protocolType == null) 605 { 606 String defaultId = Protocol.getDefaultSystemId(itemType); 607 if (defaultId != null) protocolType = ItemSubtype.getById(dc, SystemItems.getId(defaultId)); 608 } 609 if (protocolType != null) 610 { 611 %> 612 url += '&tmpfilter:INT:itemSubtype=<%=protocolType.getId()%>'; 613 <% 614 } 615 %> 562 616 Main.openPopup(url, 'SelectProtocol', 1000, 700); 563 617 } … … 698 752 <tr valign="top"> 699 753 <td style="width: 280px;"> 700 <b>Items to place</b> 754 <b>Items to place</b> <%=commonSubtype != null ? "<span class=\"itemsubtype\">[" + HTML.encodeTags(commonSubtype.getName()) + "]</span>" : "" %> 701 755 <div id="itemlist" class="biomateriallist" style="height: <%=(int)(scale*320)%>px; width:270px;" onscroll="onItemListScroll()"> 702 756 <table border="0" cellspacing="0" cellpadding="0" width="100%"> -
trunk/www/include/styles/main.css
r5663 r5710 471 471 } 472 472 473 .itemsubtype { 474 font-size: 10px; 475 color: #777777; 476 } 477
Note: See TracChangeset
for help on using the changeset viewer.