[open-ils-commits] r9581 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
public/oils/media/ui_js/oils/default/acq/po
templates/oils/default/acq/po
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 13 12:34:11 EDT 2008
Author: erickson
Date: 2008-05-13 12:34:07 -0400 (Tue, 13 May 2008)
New Revision: 9581
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html
Log:
added some date formatting
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js 2008-05-13 15:35:22 UTC (rev 9580)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js 2008-05-13 16:34:07 UTC (rev 9581)
@@ -9,6 +9,8 @@
dojo.require('fieldmapper.OrgUtils');
dojo.require('openils.acq.Provider');
dojo.require('openils.acq.Picklist');
+dojo.require('dojo.date.locale');
+dojo.require('dojo.date.stamp');
var PO = null;
var lineitems = [];
@@ -31,6 +33,13 @@
return new openils.User({id:data.owner}).user.usrname();
}
+function getDateTimeField(rowIndex) {
+ data = poGrid.model.getRow(rowIndex);
+ if(!data) return;
+ var date = dojo.date.stamp.fromISOString(data[this.field]);
+ return dojo.date.locale.format(date, {formatLength:'medium'});
+}
+
function getJUBTitle(rowIndex) {
var data = liGrid.model.getRow(rowIndex);
if(!data) return '';
@@ -55,7 +64,6 @@
}
}
-
function loadPOGrid() {
if(!PO) return;
var store = new dojo.data.ItemFileReadStore({data:acqpo.toStoreData([PO])});
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html 2008-05-13 15:35:22 UTC (rev 9580)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html 2008-05-13 16:34:07 UTC (rev 9581)
@@ -13,7 +13,6 @@
<div id='oils-acq-list-header-label'>${_('PO Details')}</div>
</div>
-
<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
<div dojoType="dijit.layout.TabContainer">
@@ -25,9 +24,9 @@
{name: '${_("ID")}', field: 'id'},
{name: '${_("Owner")}', get:getPOOwner},
{name: '${_("Ordering Agency")}', get:getOrgInfo},
- {name: '${_("Create Time")}', field:'create_time'},
- {name: '${_("Edit Time")}', field: "edit_time"},
- {name: '${_("Provider")}', get:getProvider},
+ {name: '${_("Create Time")}', field:'create_time', width:'auto', get:getDateTimeField},
+ {name: '${_("Edit Time")}', field: "edit_time", width:'auto', get:getDateTimeField},
+ {name: '${_("Provider")}', get:getProvider, width:'auto'},
{name: '${_("State")}', field:'state'}
]]
}];
@@ -43,7 +42,7 @@
{name: '${_("ID")}', field: 'id'},
{name: '${_("Title")}', width: 'auto', get:getJUBTitle},
{name: '${_("Price")}', get:getJUBPrice},
- {name: '${_("Vendor")}', field: 'provider'},
+ {name: '${_("Vendor")}', get:getProvider},
{name: '${_("# of Copies")}', field: 'item_count'},
{name: '${_("State")}', field: 'state'}
]]
More information about the open-ils-commits
mailing list