Changeset 2244


Ignore:
Timestamp:
Feb 21, 2014, 2:58:47 PM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #577: Flag histology items in HE glass/scoring wizard

Added comment field for each histology item in the HE glass wizard.

Use a 'flag' icon instead of 'warning' icon to indicate that histology items are flagged when no good stain is selected.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/css/reggie.css

    r2229 r2244  
    150150{
    151151  content: url('../images/warning.png');
     152}
     153.status.flag:before
     154{
     155  content: url('../images/flag.png');
    152156}
    153157.status.valid:before
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/histology_glass.jsp

    r2242 r2244  
    260260        checkIndexValue(field);
    261261      }
     262      frm['comment.'+well.row+'.'+well.column].value = well.bioMaterial.comment;
    262263      numWells++;
    263264    }
     
    388389  if (indexValue == 0)
    389390  {
    390     setInputStatus(field, 'No good stain! Sample will be flagged and saved to Flagged Histology list.', 'warning');
     391    setInputStatus(field, 'No good stain! Sample will be flagged and saved to Flagged Histology list.', 'flag');
    391392  }
    392393  else
     
    610611    {
    611612      well.GoodStain = parseInt(frm[field].value, 10);
     613      well.bioMaterial.comment = frm['comment.'+well.row+'.'+well.column].value;
    612614    }
    613615  }
     
    700702    vertical-align: middle;
    701703    border: 1px solid #A0A0A0;
    702     padding: 2px 2px 2px 1em;
     704    padding: 0.5em;
    703705  }
    704706
     
    725727  {
    726728    padding: 2px;
     729  }
     730 
     731  .comment
     732  {
     733    width: 95%;
     734    margin: 0.5em 0 0.5em 0;
     735  }
     736 
     737  .comment input
     738  {
     739    width: 100%;
    727740  }
    728741
     
    845858                  onkeypress="focusOnEnter(event, 'idx.1.0');return Numbers.integerOnly(event)" size="2">
    846859                <span id="idx.0.0.status" class="status"></span>
     860                <div class="comment">
     861                  <input type="text" name="comment.0.0" placeholder="Comments">
     862                </div>
    847863              </td>
    848864              <td>
     
    856872                  onkeypress="focusOnEnter(event, 'idx.1.1');return Numbers.integerOnly(event)" size="2">
    857873                <span id="idx.1.0.status" class="status"></span>
     874                <div class="comment">
     875                  <input type="text" name="comment.1.0" placeholder="Comments">
     876                </div>
    858877              </td>
    859878              <td>
     
    863882                  onkeypress="focusOnEnter(event, 'idx.2.0');return Numbers.integerOnly(event)" size="2">
    864883                <span id="idx.1.1.status" class="status"></span>
     884                <div class="comment">
     885                  <input type="text" name="comment.1.1" placeholder="Comments">
     886                </div>
    865887              </td>
    866888            </tr>
     
    872894                  onkeypress="focusOnEnter(event, 'idx.2.1');return Numbers.integerOnly(event)" size="2">
    873895                <span id="idx.2.0.status" class="status"></span>
     896                <div class="comment">
     897                  <input type="text" name="comment.2.0" placeholder="Comments">
     898                </div>
    874899              </td>
    875900              <td>
     
    879904                  onkeypress="return Numbers.integerOnly(event)" size="2">
    880905                <span id="idx.2.1.status" class="status"></span>
     906                <div class="comment">
     907                  <input type="text" name="comment.2.1" placeholder="Comments">
     908                </div>
    881909              </td>
    882910              </tr>
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/histology_score.jsp

    r2243 r2244  
    291291    if (getGoodStainedSampleForLocation(sample.well.location) == null)
    292292    {
    293       className += ' warning';
     293      className += ' flag';
    294294    }
    295295  }
     
    933933}
    934934
    935 .he-table td.warning
    936 {
    937   background-image: url('../images/warning.png');
     935.he-table td.flag
     936{
     937  background-image: url('../images/flag.png');
    938938}
    939939
     
    10611061     
    10621062      <div id="he-glass-container" style="display: none;">
    1063        
    10641063      </div>
     1064     
    10651065      <div style="margin-left: 1em; margin-bottom: 0.5em;">
    1066         <base:icon image="warning.png" /> = No GoodStain sample for that location
     1066        <base:icon image="<%=home + "/images/flag.png"%>" /> = No GoodStain sample for that location.
     1067        The Histology piece will be added to the <i>Flagged histology</i> list.
    10671068      </div>
    10681069
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/ReactionPlate.java

    r1890 r2244  
    204204            jsonBm.put("id", bm.getId());
    205205            jsonBm.put("name", bm.getName());
     206            jsonBm.put("comment", bm.getDescription());
    206207            jsonWell.put("bioMaterial", jsonBm);
    207208          }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/HistologyServlet.java

    r2243 r2244  
    3232import net.sf.basedb.core.Item;
    3333import net.sf.basedb.core.ItemQuery;
    34 import net.sf.basedb.core.ItemSubtype;
    3534import net.sf.basedb.core.MeasuredBioMaterial;
    3635import net.sf.basedb.core.PlateGeometry;
     
    245244        // Filter on id not equal to any that has a STAINED child
    246245        query.restrict(Restrictions.neq(Hql.property("id"), Expressions.all(subquery)));
    247        
     246               
    248247        List<Sample> samples = query.list(dc);
    249248        Set<BioPlate> plates = new TreeSet<BioPlate>(new NameableComparator<BioPlate>(false));
     
    674673        {
    675674          JSONObject jsonWell = (JSONObject)jsonWells.get(i);
    676           Number goodStain = (Number)jsonWell.get("GoodStain");
    677          
    678           Number wellId = (Number)jsonWell.get("id");
    679           BioWell hisWell = BioWell.getById(dc, wellId.intValue());
    680           MeasuredBioMaterial histology = hisWell.getBioMaterial();
    681           if (histology != null)
    682           {
     675          JSONObject jsonHistology = (JSONObject)jsonWell.get("bioMaterial");
     676          if (jsonHistology != null)
     677          {
     678            Number goodStain = (Number)jsonWell.get("GoodStain");
     679            Number hisId = (Number)jsonHistology.get("id");
     680            MeasuredBioMaterial histology = Sample.getById(dc, hisId.intValue());
     681
    683682            jsonWell.put("histology", histology);
     683            histology.setDescription((String)jsonHistology.get("comment"));
    684684            String flag = (String)Annotationtype.FLAG.getAnnotationValue(dc, histology);
    685685            if (goodStain.intValue() == 0)
     
    776776                stained.setName(stainedName);
    777777                stained.setBioWell(heGlass.getBioWell(heCoordinate));
     778                stained.setDescription(histology.getDescription());
    778779                dc.saveItem(stained);
    779780
Note: See TracChangeset for help on using the changeset viewer.