[open-ils-commits] r9588 - 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 16:30:19 EDT 2008
Author: erickson
Date: 2008-05-13 16:30:16 -0400 (Tue, 13 May 2008)
New Revision: 9588
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 isbn and pubdate to the lineitem display
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 20:29:58 UTC (rev 9587)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js 2008-05-13 20:30:16 UTC (rev 9588)
@@ -40,28 +40,40 @@
return dojo.date.locale.format(date, {formatLength:'medium'});
}
-function getJUBTitle(rowIndex) {
- var data = liGrid.model.getRow(rowIndex);
- if(!data) return '';
+function getLi(id) {
for(var i in lineitems) {
var li = lineitems[i];
- if(li.id() == data.id) {
- openils.acq.Picklist.cache[data.id] = li;
- return openils.acq.Picklist.find_attr(data.id, 'title', 'lineitem_marc_attr_definition')
- }
+ if(li.id() == id)
+ return openils.acq.Picklist.cache[id] = li;
}
}
+function getJUBTitle(rowIndex) {
+ var data = liGrid.model.getRow(rowIndex);
+ if(!data) return '';
+ getLi(data.id);
+ return openils.acq.Picklist.find_attr(data.id, 'title', 'lineitem_marc_attr_definition')
+}
+
+function getJUBIsbn(rowIndex) {
+ var data = liGrid.model.getRow(rowIndex);
+ if(!data) return '';
+ getLi(data.id);
+ return openils.acq.Picklist.find_attr(data.id, 'isbn', 'lineitem_marc_attr_definition')
+}
+
+function getJUBPubdate(rowIndex) {
+ var data = liGrid.model.getRow(rowIndex);
+ if(!data) return '';
+ getLi(data.id);
+ return openils.acq.Picklist.find_attr(data.id, 'pubdate', 'lineitem_marc_attr_definition')
+}
+
function getJUBPrice(rowIndex) {
var data = liGrid.model.getRow(rowIndex);
if(!data) return;
- for(var i in lineitems) {
- var li = lineitems[i];
- if(li.id() == data.id) {
- openils.acq.Picklist.cache[data.id] = li;
- return openils.acq.Picklist.find_attr(data.id, 'price', 'lineitem_marc_attr_definition')
- }
- }
+ getLi(data.id);
+ return openils.acq.Picklist.find_attr(data.id, 'price', 'lineitem_marc_attr_definition')
}
function loadPOGrid() {
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 20:29:58 UTC (rev 9587)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html 2008-05-13 20:30:16 UTC (rev 9588)
@@ -41,6 +41,8 @@
cells: [[
{name: '${_("ID")}', field: 'id'},
{name: '${_("Title")}', width: 'auto', get:getJUBTitle},
+ {name: '${_("ISBN")}', get:getJUBIsbn},
+ {name: '${_("Pubdate")}', get:getJUBPubdate},
{name: '${_("Price")}', get:getJUBPrice},
{name: '${_("Vendor")}', get:getProvider},
{name: '${_("# of Copies")}', field: 'item_count'},
More information about the open-ils-commits
mailing list