Changeset 1792


Ignore:
Timestamp:
Dec 17, 2012, 3:08:17 PM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #424, #425 and #436. Added a 'comments' field on the mRNA plate design wizard. The comment is included in the lab protocol and in the final mRNA registration wizard.

Location:
extensions/net.sf.basedb.reggie/branches/ticket-422
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/ticket-422/resources/css/printable.css

    r1681 r1792  
    33@media print
    44{
     5  body
     6  {
     7    width: 100%;
     8    margin: 0;
     9    padding: 0;
     10  }
     11 
    512  /* Start a new page on all elements with 'pagebreak' class */
    613  .pagebreak
     
    1825@media screen
    1926{
     27  body
     28  {
     29    width: 210mm;
     30    margin-left: 1em;
     31    margin-right: 1em;
     32  }
     33 
    2034  .pagebreak
    2135  {
     
    3044  body
    3145  {
    32     margin-left: 1em;
    33     margin-right: 1em;
    3446    font-family: verdana, arial, sans-serif;
    3547    font-size: 75%;
     48    padding: 0;
    3649  }
    3750 
     
    3952  {
    4053    font-size: 1.4em;
     54    margin-top: 0;
    4155  }
    4256 
     
    8397  }
    8498 
     99  .reggie
     100  {
     101    font-size: smaller;
     102  }
     103 
     104  .reggie:before
     105  {
     106    content: "(";
     107  }
     108  .reggie:after
     109  {
     110    content: ")";
     111  }
    85112 
    86113}
  • extensions/net.sf.basedb.reggie/branches/ticket-422/resources/libprep/mrna_protocol.jsp

    r1771 r1792  
    4343      var bioplate = bioplates[i];
    4444      var option = new Option(bioplate.name, bioplate.id);
     45      option.comments = bioplate.comments;
    4546      plates.options[plates.length] = option;
    4647    }
    4748    bioplateIsValid = true;
    4849    Main.show('gocreate');
     50    bioPlateOnChange();
    4951  }
    5052  else
     
    121123}
    122124
     125function bioPlateOnChange()
     126{
     127  var frm = document.forms['reggie'];
     128  setInnerHTML('comments', frm.bioplate[frm.bioplate.selectedIndex].comments);
     129}
    123130</script>
    124131
     
    159166        <td class="prompt">mRNA bioplate</td>
    160167        <td class="input"><select style="width:90%"
    161             name="bioplate" id="bioplate"></select>
     168            name="bioplate" id="bioplate" onchange="bioPlateOnChange()"></select>
    162169        </td>
    163170        <td class="status" id="bioplate.status"></td>
    164         <td class="help"><span id="bioplate.message" class="message" style="display: none;"></span>
     171        <td class="help" rowspan="2"><span id="bioplate.message" class="message" style="display: none;"></span>
    165172          Select an existing mRNA bioplate. The list contain all mRNA bioplates that
    166173          has not yet been processed (determined by the absence of a 'creation' date).
    167174        </td>
     175      </tr>
     176      <tr valign="top">
     177        <td class="subprompt">-comments</td>
     178        <td class="input" id="comments" style="font-style: italic; background: #E8E8E8; padding: 2px 5px 2px 5px;"></td>
     179        <td class="status" id="comments.status"></td>
    168180      </tr>
    169181      <tr valign="top">
  • extensions/net.sf.basedb.reggie/branches/ticket-422/resources/libprep/mrna_protocol2.jsp

    r1789 r1792  
    393393      <img src="../images/print.png">Print&hellip;
    394394    </span>
     395    <div>
     396      <b>Note!</b>
     397      <%
     398      if (view.equals("list"))
     399      {
     400        %>
     401        For better printing reduce margins to about <i>5mm</i> and set page orientation
     402        to <i>portrait</i>. To fit everything on a single page, scale down to <i>60-70%</i>.
     403        <%
     404      }
     405      else
     406      {
     407        %>
     408        For better printing reduce margins to about <i>5mm</i> and set page orientation
     409        to <i>landscape</i>. The recommended scale is <i>100%</i>.
     410        <%
     411      }
     412      %>
     413    </div>
    395414  </div>
    396415 
    397   <h1>Lab tracking protocol for mRNA and cDNA preparation</h1>
     416  <h1>Lab tracking protocol for mRNA and cDNA preparation <span class="reggie">Reggie <%=reggie.getAbout().getVersion() %></span></h1>
    398417
    399418  <table style="width: 100%; border: 0px;" class="protocolheader">
    400   <tr>
    401     <td colspan="2">Reggie <%=reggie.getAbout().getVersion() %></td>
     419  <tr valign="top">
     420    <th style="width: 30%;">Work plate: <%=HTML.encodeTags(plate.getName())%></th>
     421    <th style="width: 20%; text-align: right;">Comments:&nbsp;</th>
     422    <td rowspan="3"><%=HTML.encodeTags(plate.getDescription()) %></td>
    402423  </tr>
    403424  <tr>
    404     <th>Work plate: <%=plate.getName()%></th>
     425    <th style="width: 50%;" colspan="2">Date+operator for mRNA:</th>
    405426  </tr>
    406427  <tr>
    407     <th style="width: 50%;">Date for mRNA fragmentation:</th>
    408     <th style="width: 50%;">Operator:</th>
    409   </tr>
    410   <tr>
    411     <th style="width: 50%;">Date for cDNA preparation:</th>
    412     <th style="width: 50%;">Operator:</th>
     428    <th style="width: 50%;" colspan="2">Date+operator for cDNA:</th>
    413429  </tr>
    414430  </table>
     
    416432  <div class="loading" id="loading" style="display: none;"><table><tr><td><img src="../images/loading.gif"></td><td id="loading.msg">Please wait...</td></tr></table></div>
    417433  <div class="messagecontainer error" id="errorMessage" style="display: none;"></div>
    418 
    419434  <%
    420435  if (view.equals("list"))
  • extensions/net.sf.basedb.reggie/branches/ticket-422/resources/libprep/mrna_registration.jsp

    r1762 r1792  
    4848      var bioplate = bioplates[i];
    4949      var option = new Option(bioplate.name, bioplate.id);
     50      option.comments = bioplate.comments;
    5051      plates.options[plates.length] = option;
    5152    }
    5253    bioplateIsValid = true;
    5354    setInputStatus('bioplate', '', 'valid');
     55    bioPlateOnChange();
    5456  }
    5557  else
     
    130132}
    131133
     134function bioPlateOnChange()
     135{
     136  var frm = document.forms['reggie'];
     137  frm.comments.value = frm.bioplate[frm.bioplate.selectedIndex].comments;
     138}
    132139
    133140function browseOnClick(extension)
     
    282289  <p:path><p:pathelement
    283290    title="Reggie" href="<%="../index.jsp?ID="+ID%>"
    284     /><p:pathelement title="Lab tracking protocol for mRNA and cDNA preparation"
     291    /><p:pathelement title="mRNA registration and quality control results"
    285292    /></p:path>
    286293
     
    312319        <td class="prompt">mRNA bioplate</td>
    313320        <td class="input"><select class="required" style="width:90%"
    314             name="bioplate" id="bioplate"></select>
     321            name="bioplate" id="bioplate" onchange="bioPlateOnChange()"></select>
    315322        </td>
    316323        <td class="status" id="bioplate.status"></td>
  • extensions/net.sf.basedb.reggie/branches/ticket-422/resources/libprep/select_rna.jsp

    r1791 r1792  
    12021202  var plateInfo = {};
    12031203  submitInfo.bioplate = plateInfo;
     1204  var frm = document.forms['reggie'];
    12041205 
    12051206  plateInfo.name = Plate.name;
     1207  plateInfo.comments = frm.comments.value;
    12061208  plateInfo.wells = [];
    12071209
     
    14641466        <td class="input" id="plateName"></td>
    14651467        <td class="help">Select RNA items to use for the new mRNA plate.</td>
     1468      </tr>
     1469      <tr valign="top">
     1470        <td class="prompt">Comments</td>
     1471        <td class="input">
     1472          <textarea rows="2" style="width: 90%;" name="comments" value=""></textarea>
     1473        </td>
     1474        <td class="help">Comments about the new mRNA plate.</td>
    14661475      </tr>
    14671476      <tr style="vertical-align: top;">
  • extensions/net.sf.basedb.reggie/branches/ticket-422/src/net/sf/basedb/reggie/servlet/MRnaServlet.java

    r1762 r1792  
    101101       
    102102        List<BioPlate> result = query.list(dc);
    103         JSONArray jsonLists = new JSONArray();
     103        JSONArray jsonPlates = new JSONArray();
    104104        for (BioPlate plate: result)
    105105        {
    106           JSONObject jsonList = new JSONObject();
    107          
    108           jsonList.put("id", plate.getId());
    109           jsonList.put("name", plate.getName());
    110          
    111           jsonLists.add(jsonList);
    112         }
    113         json.put("bioplates", jsonLists);
     106          JSONObject jsonPlate = new JSONObject();
     107         
     108          jsonPlate.put("id", plate.getId());
     109          jsonPlate.put("name", plate.getName());
     110          jsonPlate.put("comments", plate.getDescription());
     111         
     112          jsonPlates.add(jsonPlate);
     113        }
     114        json.put("bioplates", jsonPlates);
    114115      }
    115116      else if ("AutoSelectRnaForMRna".equals(cmd))
     
    294295        BioPlate mRnaPlate = BioPlate.getNew(dc, geometry, plateType);
    295296        mRnaPlate.setName(plateName);
     297        mRnaPlate.setDescription(Values.getStringOrNull((String)jsonPlate.get("comments")));
    296298        dc.saveItem(mRnaPlate);
    297299       
     
    398400       
    399401        // Comment about the plate
    400         mrnaPlate.setDescription((String)jsonReq.get("comment"));
     402        mrnaPlate.setDescription((String)jsonReq.get("comments"));
    401403
    402404        // Flag so that it will not appear in the wizards next time
Note: See TracChangeset for help on using the changeset viewer.