added receive time to the LID display
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Jul 2008 21:20:56 +0000 (21:20 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Jul 2008 21:20:56 +0000 (21:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10122 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html

index 6928a93..59ff0d1 100644 (file)
@@ -4,6 +4,9 @@ dojo.require('dijit.Dialog');
 dojo.require('dijit.form.FilteringSelect');
 dojo.require('dijit.form.Button');
 dojo.require('dojox.grid.Grid');
+dojo.require('dojo.date.locale');
+dojo.require('dojo.date.stamp');
+
 
 dojo.require("openils.User");
 dojo.require("openils.acq.Fund");
@@ -69,6 +72,12 @@ var JUBGrid = {
         if(!data || !data.provider) return;
         return openils.acq.Provider.retrieve(data.provider).code();
     },
+    getRecvTime : function(rowIndex) {
+        var data = JUBGrid.jubDetailGrid.model.getRow(rowIndex);
+        if (!(data && data.recv_time)) return '';
+        var date = dojo.date.stamp.fromISOString(data.recv_time);
+        return dojo.date.locale.format(date, {formatLength:'medium'});
+    },
     getCopyLocation : function(rowIndex) {
         var data = JUBGrid.jubDetailGrid.model.getRow(rowIndex);
         if(!data || !data.location) return '';
index 738c5af..dfc8087 100644 (file)
@@ -103,6 +103,9 @@ pointing to the JUB model (and store) that you have created.
                 editor:openils.editors.CopyLocationSelectEditor,
                 get:JUBGrid.getCopyLocation
                },
+            {name:"Receive Time", width:'auto',
+                get:JUBGrid.getRecvTime
+               },
         ]]
     }];