Changeset 3826


Ignore:
Timestamp:
Apr 5, 2016, 9:29:11 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #861: YellowLabel? tracking wizard

Added Consent date column.

Som minor changes to text messages.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/yellowlabel/list.js

    r3825 r3826  
    1818    Events.addEventHandler('samplingDateFilter', 'change', yellow.filterOnChange);
    1919    Events.addEventHandler('arrivalDateFilter', 'change', yellow.filterOnChange);
     20    Events.addEventHandler('consentDateFilter', 'change', yellow.filterOnChange);
    2021    Events.addEventHandler('extractionDateFilter', 'change', yellow.filterOnChange);
    2122    Events.addEventHandler('libraryDateFilter', 'change', yellow.filterOnChange);
     
    119120      html += '<td>'+Reggie.reformatDate(sp.SamplingDate)+'</td>';
    120121      html += '<td>'+Reggie.reformatDate(sp.ArrivalDate)+'</td>';
     122      html += '<td>'+Reggie.reformatDate(sp.ConsentDate)+'</td>';
    121123      html += '<td class="dottedleft">'+(rna ? Reggie.reformatDate(rna.QiacubeDate):'')+'</td>';
    122124      html += '<td class="iconcol-2">'+yellow.asItemLink(rna, 'EXTRACT')+yellow.asFlag(rna)+'</td>';
     
    214216    filter.addDateCriteria(ItemProperty.SamplingDate, frm.samplingDateFilter.value);
    215217    filter.addDateCriteria(ItemProperty.ArrivalDate, frm.arrivalDateFilter.value);
     218    filter.addDateCriteria(ItemProperty.ConsentDate, frm.consentDateFilter.value);
    216219    filter.addDateCriteria(ItemProperty.ExtractionDate, frm.extractionDateFilter.value);
    217220    filter.addDateCriteria(ItemProperty.LibraryDate, frm.libraryDateFilter.value);
     
    357360    filter.addNumericCriteria(ItemProperty.PilotReportExists, '1');
    358361   
    359     var selected = yellow.checkSelected(filter, 'Select at least one specimen that has a PilotReport');
     362    var selected = yellow.checkSelected(filter, 'Select at least one specimen that has a pilot report');
    360363    if (selected.length == 0) return;
    361364
     
    375378        specimen[i] = selected[i].id;
    376379      }
    377      
    378380     
    379381      var url = '../YellowLabel.servlet?ID='+App.getSessionId();
     
    384386      url += '&completedDate='+encodeURIComponent(options.completedDate);
    385387      url += '&site='+encodeURIComponent(frm.siteFilter.value);
    386       window.open(url);
     388      location.href = url;
    387389    }
    388390  }
     
    408410    submitInfo.rawBioAssays = raw;
    409411    submitInfo.useDefaultSoftware = 1;
    410     //submitInfo.software = parseInt(frm.reportSoftware.value);
    411412    submitInfo.report = 'PILOT_REPORT';
    412413   
     
    546547  }
    547548 
     549  p.ConsentDate = function(item)
     550  {
     551    return item.ConsentDate;
     552  }
     553 
    548554  p.ExtractionDate = function(item)
    549555  {
  • extensions/net.sf.basedb.reggie/trunk/resources/yellowlabel/list.jsp

    r3825 r3826  
    8484.pilotreport
    8585{
    86   font-weight: bold;
     86  /* Makes the text appear bold without changing the width => better alignement between rows */
     87  text-shadow: -1px 0px 0px #000000;
    8788  background-color: #F8F0FF;
    8889}
     
    148149        <tr>
    149150          <th class="index"></th>
    150           <th class="dottedleft" colspan="5">Specimen</th>
     151          <th class="dottedleft" colspan="6">Specimen</th>
    151152          <th class="dottedleft" colspan="2">RNA</th>
    152153          <th class="dottedleft" colspan="2">Library</th>
     
    158159        <tr>
    159160          <th></th>
    160           <th class="dottedleft" colspan="2">Name</th>
     161          <th class="dottedleft" colspan="2" style="width: 10em;">Name</th>
    161162          <th>Site</th>
    162163          <th>Sampling date</th>
    163164          <th>Arrival date</th>
     165          <th>Consent date</th>
    164166          <th class="dottedleft" colspan="2">Extraction date</th>
    165167          <th class="dottedleft" colspan="2">Created date</th>
     
    179181          <th><input type="text" name="samplingDateFilter" id="samplingDateFilter"></th>
    180182          <th><input type="text" name="arrivalDateFilter" id="arrivalDateFilter"></th>
     183          <th><input type="text" name="consentDateFilter" id="consentDateFilter"></th>
    181184          <th class="dottedleft" colspan="2"><input type="text" name="extractionDateFilter" id="extractionDateFilter"></th>
    182185          <th class="dottedleft" colspan="2"><input type="text" name="libraryDateFilter" id="libraryDateFilter"></th>
  • extensions/net.sf.basedb.reggie/trunk/resources/yellowlabel/make-zip.jsp

    r3824 r3826  
    4747      <th class="subprompt"></th>
    4848      <td>
    49         <i>(If empty, the ZIP file is not password protected)</i>
     49        <i>If empty, the ZIP file is not password protected.</i>
    5050        <div id="wizard-status"></div>
    5151      </td>
     
    7272      <th class="subprompt"></th>
    7373      <td>
    74         <i>(If empty, the selected specimen are not marked as completed)</i>
     74        <i>If empty, the specimen are not marked as completed.</i>
    7575      </td>
    7676    </tr>
  • extensions/net.sf.basedb.reggie/trunk/resources/yellowlabel/mark-completed.js

    r3824 r3826  
    1818    if (!Wizard.isValid('completedDate'))
    1919    {
    20       Forms.showNotification('completedDate', 'Not a valid date');
     20      Forms.showNotification('completedDate', frm.completedDate.value == '' ? 'Please specify a date' : 'Not a valid date');
    2121      return;
    2222    }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/YellowLabelServlet.java

    r3824 r3826  
    115115          sp.loadAnnotations(dc, manager, "ArrivalDate", Annotationtype.ARRIVAL_DATE, Reggie.CONVERTER_DATE_TO_STRING);
    116116          sp.loadAnnotations(dc, manager, "CompletedDate", Annotationtype.COMPLETED_DATE, Reggie.CONVERTER_DATE_TO_STRING);
     117         
     118          Sample theCase = (Sample)sp.getItem().getParent();
     119          sp.setAnnotation("ConsentDate", Reggie.CONVERTER_DATE_TO_STRING.convert((Date)Annotationtype.CONSENT_DATE.getAnnotationValue(dc, theCase)));
    117120          sp.setAnnotation("site", site.asJSONObject());
    118121         
Note: See TracChangeset for help on using the changeset viewer.