Changeset 1932


Ignore:
Timestamp:
Apr 17, 2013, 9:43:58 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #456: Barcode layout wizard

Some minor improvements regarding usability.

  • Show comments from the cDNA plate when selecting it
  • Add comments to the Library plate that show up in the lab protocols
  • Show 'Please wait...' animation when loading and saving information


Location:
extensions/net.sf.basedb.reggie/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/assign_barcode.jsp

    r1918 r1932  
    7373    bioplateIsValid = true;
    7474    setInputStatus('bioplate', '', 'valid');
     75    bioPlateOnChange();
    7576  }
    7677  else
     
    111112}
    112113
     114function bioPlateOnChange()
     115{
     116  var frm = document.forms['reggie'];
     117  var bioplate = frm.bioplate[frm.bioplate.selectedIndex].bioplate;
     118  setInnerHTML('cdnacomments', formatText(bioplate.comments));
     119}
     120
    113121
    114122function loadBarcodes()
     
    153161  frm.bioplate.disabled = true;
    154162 
    155   frm.comments.value = frm.bioplate[frm.bioplate.selectedIndex].bioplate.comments;
     163  Main.addClass(document.getElementById('step.1.section'), 'disabled');
     164  Main.hide('gonext');
     165  Main.hide('gocancel');
     166  loadCDNAInformation();
    156167 
    157168  currentStep = 2;
    158169  document.getElementById('step.2.section').style.display = 'table';
    159   Main.addClass(document.getElementById('step.1.section'), 'disabled');
    160   Main.hide('gonext');
    161170  Main.show('gocancel');
    162171  Main.show('gocreate');
    163172 
    164   loadCDNAInformation();
    165173  keepSessionAlive('<%=ID%>', debug, '../');
    166174}
     
    366374  var url = '../LibPrep.servlet?ID=<%=ID%>';
    367375  url += '&cmd=CreateBarcodedLibraries';
    368   request.open("POST", url, false);
    369   request.setRequestHeader("Content-Type", "application/json");
    370   request.send(JSON.stringify(submitInfo));
     376  try
     377  {
     378    showLoadingAnimation('Registering barcoded libraries...');
     379    request.open("POST", url, false);
     380    request.setRequestHeader("Content-Type", "application/json");
     381    request.send(JSON.stringify(submitInfo));
     382  }
     383  finally
     384  {
     385    hideLoadingAnimation();
     386  }
    371387
    372388  if (debug) Main.debug(request.responseText);
     
    553569    if (cdna)
    554570    {
    555       text += '<div class="name">'+cdna.name+'</div>';
     571      var name = cdna.name;
     572      var i = name.indexOf('.m');
     573      text += '<div class="name">'+name.substring(0, i)+'.<br>&nbsp;'+name.substring(i)+'</div>';
    556574      if (cdna.barcode)
    557575      {
    558         text += cdna.barcode.name;
     576        text += '<div class="barcode">'+cdna.barcode.name+'</div>';
    559577        if (cdna.defaultBarcode && cdna.barcode != cdna.defaultBarcode)
    560578        {
     
    663681        <td class="input"><select class="required" style="width:90%"
    664682            name="bioplate" id="bioplate"></select>
     683          <div id="cdnacomments" style="font-style: italic; background: #E8E8E8; padding: 2px 5px 2px 5px;"></div>
    665684        </td>
    666685        <td class="status" id="bioplate.status"></td>
    667686        <td class="help"><span id="bioplate.message" class="message" style="display: none;"></span>
    668687          Select an existing cDNA bioplate. The list contain all cDNA bioplates that
    669           has not yet been assigned barcodes (determined by the absence of child 'library'
    670           items).
     688          has not yet been assigned barcodes (determined by the absence of 'BarcodeVariant'
     689          annotation).
    671690        </td>
    672691      </tr>
     
    704723          <textarea rows="2" style="width: 90%;" name="comments" value=""></textarea>
    705724        </td>
    706         <td class="help">Comments about the cDNA plate.</td>
     725        <td class="help">Comments for the library preparation.</td>
    707726      </tr>
    708727      </table>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/LibPrepServlet.java

    r1930 r1932  
    367367        Number cdnaPlateId = (Number)jsonPlate.get("id");
    368368        BioPlate cDnaPlate = BioPlate.getById(dc, cdnaPlateId.intValue());
    369         cDnaPlate.setDescription((String)jsonPlate.get("comments"));
    370369        Annotationtype.POOL_SCHEMA.setAnnotationValue(dc, cDnaPlate, jsonPlate.get("poolSchema"));
    371370        Annotationtype.BARCODE_VARIANT.setAnnotationValue(dc, cDnaPlate, jsonPlate.get("barcodeVariant"));
     
    375374        BioPlate libPlate = BioPlate.getNew(dc, BioplateType.LIBRARY.getPlateGeometry(dc), BioplateType.LIBRARY.load(dc));
    376375        libPlate.setName(libPlateName);
     376        libPlate.setDescription((String)jsonPlate.get("comments"));
    377377        Annotationtype.POOL_SCHEMA.setAnnotationValue(dc, libPlate, jsonPlate.get("poolSchema"));
    378378        Annotationtype.BARCODE_VARIANT.setAnnotationValue(dc, libPlate, jsonPlate.get("barcodeVariant"));
Note: See TracChangeset for help on using the changeset viewer.