diff --git a/js/gc-chart-config.js b/js/gc-chart-config.js index ca50b1bf2..661ef9ba7 100644 --- a/js/gc-chart-config.js +++ b/js/gc-chart-config.js @@ -24,7 +24,7 @@ window.GC = window.GC || {}; // been stored on the server too) // ========================================================================= var readOnlySettings = { - fileRevision : 208, + fileRevision : 210, // See the toString method for the rendering template version : { @@ -112,6 +112,8 @@ window.GC = window.GC || {}; limit : 2 }, + sameDayDot: true, + // At what point chronologically does one start forecasting adult height? heightEstimatesMinAge : 12, // months diff --git a/js/gc-grid-view.js b/js/gc-grid-view.js index a256470d9..804b49b55 100644 --- a/js/gc-grid-view.js +++ b/js/gc-grid-view.js @@ -252,14 +252,20 @@ $.each(model, function( index, data ) { + var useSameDayDot = GC.Preferences._data.sameDayDot; + //debugger; var age = new GC.TimeInterval(patient.DOB).setMonths(data.agemos), - date = new XDate(patient.DOB.getTime()).addMonths(data.agemos), - dateText = date.toString(GC.chartSettings.dateFormat);//, + date = new XDate(patient.DOB.getTime()).addMonths(data.agemos);//, // years, // months, // days; + var sameDay = lastDate && lastDate.diffDays(date) < 1; + var dateText = (useSameDayDot && sameDay) ? + '
' : + date.toString(GC.chartSettings.dateFormat); + // Header - Date $('').append( $('
').html(dateText) @@ -267,7 +273,11 @@ // Header - Age $('').append( - $('
').html(age.toString(shortDateFormat)) + $('
').html( + (useSameDayDot && sameDay) ? + date.toString(GC.chartSettings.timeFormat) : + age.toString(shortDateFormat) + ) ).appendTo(thr2); $.each(scheme.header.rows, function(j, o) {