added date/time parsing to import time on queued record display
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 3 Sep 2008 13:46:31 +0000 (13:46 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 3 Sep 2008 13:46:31 +0000 (13:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10519 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/vandelay/vandelay.html
Open-ILS/web/vandelay/vandelay.js

index 9c940f0..6b1001f 100644 (file)
@@ -95,7 +95,7 @@
                     vlQueueGridLayout = [{
                         cells : [[
                             {name: 'Selected', get: vlQueueGridDrawSelectBox },
-                            {name: 'Import Time', field:'import_time'}
+                            {name: 'Import Time', field:'import_time', get:getDateTimeField}
                         ]]
                     }];
                 }
index ccf72c6..6e7c998 100644 (file)
@@ -20,6 +20,8 @@ dojo.require("dijit.form.FilteringSelect");
 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 @@ function getAttrValue(rowIdx) {
     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');