[open-ils-commits] r10519 - trunk/Open-ILS/web/vandelay
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 3 09:46:32 EDT 2008
Author: erickson
Date: 2008-09-03 09:46:31 -0400 (Wed, 03 Sep 2008)
New Revision: 10519
Modified:
trunk/Open-ILS/web/vandelay/vandelay.html
trunk/Open-ILS/web/vandelay/vandelay.js
Log:
added date/time parsing to import time on queued record display
Modified: trunk/Open-ILS/web/vandelay/vandelay.html
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.html 2008-09-03 13:45:55 UTC (rev 10518)
+++ trunk/Open-ILS/web/vandelay/vandelay.html 2008-09-03 13:46:31 UTC (rev 10519)
@@ -95,7 +95,7 @@
vlQueueGridLayout = [{
cells : [[
{name: 'Selected', get: vlQueueGridDrawSelectBox },
- {name: 'Import Time', field:'import_time'}
+ {name: 'Import Time', field:'import_time', get:getDateTimeField}
]]
}];
}
Modified: trunk/Open-ILS/web/vandelay/vandelay.js
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.js 2008-09-03 13:45:55 UTC (rev 10518)
+++ trunk/Open-ILS/web/vandelay/vandelay.js 2008-09-03 13:46:31 UTC (rev 10519)
@@ -20,6 +20,8 @@
dojo.require("dojo.cookie");
dojo.require("dojox.grid.Grid");
dojo.require("dojo.data.ItemFileReadStore");
+dojo.require('dojo.date.locale');
+dojo.require('dojo.date.stamp');
dojo.require("fieldmapper.Fieldmapper");
dojo.require("fieldmapper.dojoData");
dojo.require('openils.CGI');
@@ -232,6 +234,13 @@
return '';
}
+function getDateTimeField(rowIdx) {
+ data = this.grid.model.getRow(rowIdx);
+ if(!data) return '';
+ var date = dojo.date.stamp.fromISOString(data[this.field]);
+ return dojo.date.locale.format(date, {formatLength:'medium'});
+}
+
function buildRecordGrid(type) {
displayGlobalDiv('vl-queue-div');
More information about the open-ils-commits
mailing list