Changeset 2084


Ignore:
Timestamp:
Oct 18, 2013, 12:12:29 PM (9 years ago)
Author:
olle
Message:

Refs #519. Reggie updated to not auto-fill 6-digit date entries by default:

  1. JavaScript reggie.js in reggie/resources/ updated in function autoFillDate(shortDate) to accept a second argument allowSixDigitDates, which by default is set to false. Six-digit dates are now auto-filled only if argument allowSixDigitDates has value true.
File:
1 edited

Legend:

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

    r2036 r2084  
    225225 
    226226  @param shortDate Date in format 'MMdd' or in 'yyMMdd'
    227 */
    228 function autoFillDate(shortDate)
    229 {
     227  @param allowSixDigitDates Boolean Flag indicating if 6-digit dates should be auto-filled (default = false).
     228*/
     229function autoFillDate(shortDate, allowSixDigitDates)
     230{
     231  if (allowSixDigitDates == null)
     232  {
     233    allowSixDigitDates = false;
     234  }
    230235  shortDate = shortDate.replace("-","")
    231236  var fullDateString = shortDate;
     
    244249    fullDateString = currentYear+shortDate;
    245250  }
    246   else if (shortDate.length == 6 && Dates.isDate(shortDate, 'yyMMdd'))
     251  else if (allowSixDigitDates && shortDate.length == 6 && Dates.isDate(shortDate, 'yyMMdd'))
    247252  {
    248253    var year = parseInt(shortDate.substring(0,2), 10);   
Note: See TracChangeset for help on using the changeset viewer.