Changeset 1456


Ignore:
Timestamp:
Nov 9, 2011, 11:36:05 AM (10 years ago)
Author:
Martin Svensson
Message:

Reference #330 #317
Partition form:
Listed tubes in step one must be places in a box which name starts with 'Sp'.
Only numerical input are now allowed in weight input fields.
Corrected some misspelled words in the Operator partition comment field.
His-sample now also get it's Original quantity set.

Specimen tube wizard:
Arrival date get 'todays date' by default.

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

Legend:

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

    r1449 r1456  
    196196   
    197197    var appearanceOptions = '<option selected ></option>'; 
    198     appearanceOptions += '<option value="HOMOGENOUS">Homogenous</option>';
    199     appearanceOptions += '<option value="HETEROGENOUS">Heterogenous</option>';
     198    appearanceOptions += '<option value="HOMOGENEOUS">Homogeneous</option>';
     199    appearanceOptions += '<option value="HETEROGENEOUS">Heterogeneous</option>';
    200200   
    201201    var necrosisOptions = '<option selected value="0">0</option>';
     
    234234      inputWeightHtml += '<td>'+fatTitle+'<select name=fat'+i+' onfocus="messageOnFocus(3,'+i+')" onkeypress="focusOnEnter(event, \'coloured'+i+'\')">'+fatOptions+'</select></td>';
    235235      inputWeightHtml += '<td>'+colouredTitle+'<input type=checkbox name=coloured'+i+' onfocus="messageOnFocus(4,'+i+')" onkeypress="checkOnNumber(event, this);focusOnEnter(event, \'nofPieces'+i+'\')" /></td>'
    236       inputWeightHtml += '<td>'+nofTitle+'<input name="nofPieces'+i+'" onfocus="messageOnFocus(5,'+i+')" onblur="nofPiecesOnChange('+i+')" onkeypress="focusOnEnter(event, \'spWeight'+i+'\')" size=2 /></td>';
    237       inputWeightHtml += '<td>'+spTitle+'<input name="spWeight'+i+'" onfocus="messageOnFocus(6,'+i+')" onblur="spWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'hisWeight'+i+'\')" size=2 /></td>';
    238       inputWeightHtml += '<td>'+hisTitle+'<input name="hisWeight'+i+'" onfocus="messageOnFocus(7,'+i+')" onblur="hisWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'apWeight'+i+'\')" size=2 /></td>';
    239       inputWeightHtml += '<td>'+apTitle+'<input name="apWeight'+i+'" onfocus="messageOnFocus(8,'+i+')" onblur="apWeightOnChange('+i+')" onkeypress="'+nextStep+'" size=2 /></td>';     
     236      inputWeightHtml += '<td>'+nofTitle+'<input name="nofPieces'+i+'" onfocus="messageOnFocus(5,'+i+')" onblur="nofPiecesOnChange('+i+')" onkeypress="focusOnEnter(event, \'spWeight'+i+'\');return isNumberKey(event)" size=2 /></td>';
     237      inputWeightHtml += '<td>'+spTitle+'<input name="spWeight'+i+'" onfocus="messageOnFocus(6,'+i+')" onblur="spWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'hisWeight'+i+'\');return isNumberKey(event)" size=2 /></td>';
     238      inputWeightHtml += '<td>'+hisTitle+'<input name="hisWeight'+i+'" onfocus="messageOnFocus(7,'+i+')" onblur="hisWeightOnChange('+i+')" onkeypress="focusOnEnter(event, \'apWeight'+i+'\');return isNumberKey(event)" size=2 /></td>';
     239      inputWeightHtml += '<td>'+apTitle+'<input name="apWeight'+i+'" onfocus="messageOnFocus(8,'+i+')" onblur="apWeightOnChange('+i+')" onkeypress="'+nextStep+';return isNumberKey(event)" size=2 /></td>';     
    240240      inputWeightHtml += '</tr>';
    241241      inputWeightHtml += '</table>';
     
    268268  }
    269269  return true;
     270}
     271
     272function isNumberKey(evt)
     273{
     274  evt = (evt) ? evt : ((window.event) ? event : null);
     275    if (evt) {
     276       var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
     277       if (elem) {
     278           var charCode = (evt.charCode) ? evt.charCode :
     279               ((evt.which) ? evt.which : evt.keyCode);
     280           if ((charCode < 32 ) ||
     281               (charCode > 45 && charCode < 47) ||
     282               (charCode > 47 && charCode < 58)) {
     283               return true;
     284           } else {
     285               return false;
     286           }
     287       }
     288    }
    270289}
    271290
  • extensions/net.sf.basedb.reggie/trunk/resources/specimentube.jsp

    r1415 r1456  
    142142  }
    143143 
     144  var currentTime = new Date();
     145  var currentYear = currentTime.getFullYear().toString();
     146  var currentMonth = (currentTime.getMonth()+1).toString();
     147  currentMonth = currentMonth.length < 2 ? '0'+currentMonth : currentMonth;
     148  var currentDate = currentTime.getDate().toString();
     149  currentDate = currentDate.length < 2 ? '0'+currentDate : currentDate;
     150 
     151  var dateString = currentYear + currentMonth + currentDate;
     152 
     153  frm.arrivalDate.value = dateString;
     154   
    144155  frm.nofTubes.focus();
    145156  frm.nofTubes.setSelectionRange(0,1);
     
    778789  setInnerHTML('done', msg);
    779790  Main.show('done');
    780   Main.show('gorestart');
     791  //Main.show('gorestart');
    781792}
    782793
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/SpecimenTube.java

    r1449 r1456  
    113113    for (Sample tube : tubes)
    114114    {
    115       if (tube.countExtracts() == 0)
     115      BioWell well = tube.getBioWell();
     116      String boxNamePrefix = null;
     117      if (well != null)
     118      {
     119        boxNamePrefix = well.getPlate().getName().substring(0,2);       
     120      }
     121      if (tube.countExtracts() == 0 && "Sp".equals(boxNamePrefix))
    116122      {
    117123        unPartitionedTubes.add(new SpecimenTube(tube));
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/PartitionRegistrationServlet.java

    r1449 r1456  
    242242               
    243243                hisSample.setPooled(true);
     244                hisSample.setOriginalQuantity(hisWeight);
    244245                BioMaterialEvent creationEvent = hisSample.getCreationEvent();
    245246                creationEvent.addSource(specimen, hisWeight);
Note: See TracChangeset for help on using the changeset viewer.