From: Jason Etheridge Date: Fri, 24 Feb 2012 19:36:16 +0000 (-0500) Subject: lp928937, null date sorting X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=004198c8d60efe2bb1bae8a6cd11d0c574cfb580;p=contrib%2FConifer.git lp928937, null date sorting Changes util.date.db_date2Date so that nulls are not converted into the epoch. This fixes date sorting in XUL-based lists in the staff client such that unset dates are listed before actual dates. Signed-off-by: Jason Etheridge Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/date.js b/Open-ILS/xul/staff_client/chrome/content/util/date.js index 4ee891850a..cf176271b9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/date.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/date.js @@ -46,6 +46,7 @@ util.date.timer_elapsed = function (id) { } util.date.db_date2Date = function (db_date) { + if (!db_date) { return db_date; } if (typeof window.dojo != 'undefined') { dojo.require('dojo.date.stamp'); return dojo.date.stamp.fromISOString( db_date.replace( /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[\+-]\d{2})(\d{2})$/, '$1:$2') );