extensions/net.sf.basedb.meludi/trunk/resources/libprep/auto_select_dna.jsp

Code
Comments
Other
Rev Date Author Line
3449 28 Jul 15 olle 1 <%@ page
3449 28 Jul 15 olle 2   pageEncoding="UTF-8"
3449 28 Jul 15 olle 3   session="false"
3449 28 Jul 15 olle 4   import="net.sf.basedb.core.Application"
3449 28 Jul 15 olle 5   import="net.sf.basedb.core.User"
3449 28 Jul 15 olle 6   import="net.sf.basedb.core.DbControl"
3449 28 Jul 15 olle 7   import="net.sf.basedb.core.SessionControl"
3449 28 Jul 15 olle 8   import="net.sf.basedb.clients.web.Base"
3449 28 Jul 15 olle 9   import="net.sf.basedb.clients.web.util.HTML"
3449 28 Jul 15 olle 10   import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
3449 28 Jul 15 olle 11   import="net.sf.basedb.util.Values"
3449 28 Jul 15 olle 12 %>
3449 28 Jul 15 olle 13 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
3449 28 Jul 15 olle 14 <%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
3449 28 Jul 15 olle 15 <%
3449 28 Jul 15 olle 16 final SessionControl sc = Base.getExistingSessionControl(request, true);
3449 28 Jul 15 olle 17 final String ID = sc.getId();
3449 28 Jul 15 olle 18 final float scale = Base.getScale(sc);
3449 28 Jul 15 olle 19 final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.meludi");
3449 28 Jul 15 olle 20 DbControl dc = null;
3449 28 Jul 15 olle 21 try
3449 28 Jul 15 olle 22 {
3449 28 Jul 15 olle 23   dc = sc.newDbControl();
3449 28 Jul 15 olle 24   final User user = User.getById(dc, sc.getLoggedInUserId());
3449 28 Jul 15 olle 25   final String title = "Options for auto-selecting DNA";
3449 28 Jul 15 olle 26   
3449 28 Jul 15 olle 27   String requiredQuantity = request.getParameter("quantity");
3449 28 Jul 15 olle 28   int numToSelect = Values.getInt(request.getParameter("numToSelect"));
3449 28 Jul 15 olle 29   String startDate = request.getParameter("startDate");
3449 28 Jul 15 olle 30   String ignore = request.getParameter("ignore");
3449 28 Jul 15 olle 31 %>
3449 28 Jul 15 olle 32 <base:page type="popup" title="<%=title%>">
3449 28 Jul 15 olle 33 <base:head 
3449 28 Jul 15 olle 34   scripts="~auto_select_dna.js,~../meludi-2.js"
3449 28 Jul 15 olle 35   styles="~../css/meludi-2.css"
3449 28 Jul 15 olle 36 />
3449 28 Jul 15 olle 37 <base:body>
3449 28 Jul 15 olle 38   <h1><%=title %></h1>
3449 28 Jul 15 olle 39
3449 28 Jul 15 olle 40   <form name="options" id="wizard" class="wizard">
3449 28 Jul 15 olle 41
3449 28 Jul 15 olle 42   <div id="page-data" class="datacontainer"
3449 28 Jul 15 olle 43     data-num-to-select="<%=numToSelect%>"
3449 28 Jul 15 olle 44     data-start-date="<%=startDate%>"
3449 28 Jul 15 olle 45     data-ignore="[<%=HTML.encodeTags(ignore)%>]"
3449 28 Jul 15 olle 46   ></div>
3449 28 Jul 15 olle 47
3449 28 Jul 15 olle 48   <div class="content bottomborder">
3449 28 Jul 15 olle 49   
3449 28 Jul 15 olle 50     <table class="fullform input100 step-form">
3449 28 Jul 15 olle 51     <tr class="big">
3449 28 Jul 15 olle 52       <th>Auto-select</th>
3449 28 Jul 15 olle 53       <td>
3449 28 Jul 15 olle 54 <!--
3449 28 Jul 15 olle 55         <label><input type="radio" name="preNormalized" id="preNormalized.0" value="0">DNA</label><br>
3449 28 Jul 15 olle 56         <label><input type="radio" name="preNormalized" id="preNormalized.1" value="1" checked>Pre-normalized DNA</label>
3449 28 Jul 15 olle 57         <br>
3449 28 Jul 15 olle 58         <select name="normalizationProtocol" id="normalizationProtocol"
3449 28 Jul 15 olle 59           class="required" style="margin-left: 20px; width: 20em;">
3449 28 Jul 15 olle 60         </select>
3449 28 Jul 15 olle 61 -->  
3449 28 Jul 15 olle 62       </td>
3449 28 Jul 15 olle 63     </tr>
3449 28 Jul 15 olle 64     <tr>
3449 28 Jul 15 olle 65       <th>Start date</th>
3449 28 Jul 15 olle 66       <td>
3449 28 Jul 15 olle 67         <input type="text" name="startDate" id="startDate" style="width: 12em;" maxlength="10"
3449 28 Jul 15 olle 68           title="Enter start date in YYYYMMDD format">
3449 28 Jul 15 olle 69           <base:icon 
3449 28 Jul 15 olle 70             id="startDateCalendar"
3449 28 Jul 15 olle 71             subclass="auto-init"
3449 28 Jul 15 olle 72             data-auto-init="calendar"
3449 28 Jul 15 olle 73             data-textarea-id="startDate"
3449 28 Jul 15 olle 74             data-date-format="yyyyMMdd"
3449 28 Jul 15 olle 75             image="calendar.png" 
3449 28 Jul 15 olle 76             tooltip="Select a date from a calendar" 
3449 28 Jul 15 olle 77             tabindex="-1"
3449 28 Jul 15 olle 78           /> (empty = start from oldest)
3449 28 Jul 15 olle 79       </td>
3449 28 Jul 15 olle 80     </tr>
3449 28 Jul 15 olle 81     <tr class="big">
3449 28 Jul 15 olle 82       <th>Active filters</th>
3449 28 Jul 15 olle 83       <td>
3449 28 Jul 15 olle 84         <input type="checkbox" name="remainingQuantity" id="remainingQuantity" value="1" checked>
3449 28 Jul 15 olle 85           <label for="remainingQuantity">Remaining quantity</label> ≥ 
3449 28 Jul 15 olle 86             <input type="text" class="text required" name="quantity_regular" id="quantity_regular" 
3449 28 Jul 15 olle 87               style="width: 4em;" value="<%=HTML.encodeTags(requiredQuantity)%>"> µg<br>
3449 28 Jul 15 olle 88 <!--
3449 28 Jul 15 olle 89         <input type="checkbox" name="qualityScore" id="qualityScore" value="1" checked>
3449 28 Jul 15 olle 90           <label for="qualityScore">RQS/RIN</label> ≥ 
3449 28 Jul 15 olle 91             <input type="text" class="text required" name="quality_score" id="quality_score" 
3449 28 Jul 15 olle 92               style="width: 4em;" value="6"><br>
3449 28 Jul 15 olle 93 -->
3449 28 Jul 15 olle 94         <input type="checkbox" name="qualityScore" id="qualityScore" value="1" checked>
3449 28 Jul 15 olle 95           <label for="qualityScore">ΔCt</label> ≤ 
3449 28 Jul 15 olle 96             <input type="text" class="text required" name="quality_score" id="quality_score" 
3449 28 Jul 15 olle 97               style="width: 4em;" value="8"><br>
3449 28 Jul 15 olle 98       </td>
3449 28 Jul 15 olle 99     </tr>
3449 28 Jul 15 olle 100 <!--
3449 28 Jul 15 olle 101     <tr>
3449 28 Jul 15 olle 102       <th>Re-process</th>
3449 28 Jul 15 olle 103       <td>
3449 28 Jul 15 olle 104         <input type="checkbox" name="reProcess" id="reProcess" value="1" checked><label for="reProcess">Select DNA marked for re-process</label> (even if filter doesn't match)
3449 28 Jul 15 olle 105       </td>
3449 28 Jul 15 olle 106     </tr>
3449 28 Jul 15 olle 107     <tr>
3449 28 Jul 15 olle 108       <th>Flag</th>
3449 28 Jul 15 olle 109       <td>
3449 28 Jul 15 olle 110         <input type="checkbox" name="flag" id="flag" value="1" checked><label for="flag">Flag DNA not matching the filter</label>
3449 28 Jul 15 olle 111       </td>
3449 28 Jul 15 olle 112     </tr>
3449 28 Jul 15 olle 113 -->
3449 28 Jul 15 olle 114     <tr class="dynamic">
3449 28 Jul 15 olle 115       <th></th>
3449 28 Jul 15 olle 116       <td>
3449 28 Jul 15 olle 117         
3449 28 Jul 15 olle 118       </td>
3449 28 Jul 15 olle 119     </tr>
3449 28 Jul 15 olle 120     </table>
3449 28 Jul 15 olle 121   
3449 28 Jul 15 olle 122   </div>
3449 28 Jul 15 olle 123   </form>
3449 28 Jul 15 olle 124   
3449 28 Jul 15 olle 125   <div id="wizard-status" style="position:absolute; top: 40%; left: 12em; right: 2em;"></div>
3449 28 Jul 15 olle 126   
3449 28 Jul 15 olle 127   <base:buttongroup subclass="dialogbuttons" id="dialogbuttons">
3449 28 Jul 15 olle 128     <base:button id="btnOk" title="Ok" />
3449 28 Jul 15 olle 129     <base:button id="close" title="Cancel" />
3449 28 Jul 15 olle 130   </base:buttongroup>
3449 28 Jul 15 olle 131 </base:body>
3449 28 Jul 15 olle 132 </base:page>
3449 28 Jul 15 olle 133 <%
3449 28 Jul 15 olle 134 }
3449 28 Jul 15 olle 135 finally
3449 28 Jul 15 olle 136 {
3449 28 Jul 15 olle 137   if (dc != null) dc.close();
3449 28 Jul 15 olle 138 }
3449 28 Jul 15 olle 139 %>