[open-ils-commits] r9922 - in branches/acq-experiment/Open-ILS/web:
js/dojo/openils/acq
oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po
oilsweb/oilsweb/templates/oils/default/acq/po
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 25 12:03:14 EDT 2008
Author: erickson
Date: 2008-06-25 12:03:12 -0400 (Wed, 25 Jun 2008)
New Revision: 9922
Modified:
branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/PO.js
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:
showing lineitem count in po summary, cleaned up some fetching code
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/PO.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/PO.js 2008-06-25 16:01:44 UTC (rev 9921)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/acq/PO.js 2008-06-25 16:03:12 UTC (rev 9922)
@@ -28,10 +28,10 @@
openils.acq.PO.cache = {};
- openils.acq.PO.retrieve = function(id, oncomplete) {
+ openils.acq.PO.retrieve = function(id, oncomplete, args) {
var req = ['open-ils.acq', 'open-ils.acq.purchase_order.retrieve'];
- var par = [openils.User.authtoken, id];
+ var par = [openils.User.authtoken, id, args];
if(oncomplete) {
fieldmapper.standardRequest(
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-06-25 16:01:44 UTC (rev 9921)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js 2008-06-25 16:03:12 UTC (rev 9922)
@@ -52,8 +52,7 @@
function loadLIGrid() {
if(liGrid.isLoaded) return;
- function load(r) {
- var po = r.recv().content();
+ function load(po) {
lineitems = po.lineitems();
var store = new dojo.data.ItemFileReadStore({data:jub.toStoreData(lineitems)});
var model = new dojox.grid.data.DojoData(
@@ -61,13 +60,7 @@
JUBGrid.populate(liGrid, model, lineitems)
}
- fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.purchase_order.retrieve'],
- { async: true,
- params: [openils.User.authtoken, poId, {flesh_lineitems:1, clear_marc:1}], /* XXX PAGING */
- oncomplete : load
- }
- );
+ openils.acq.PO.retrieve(poId, load, {flesh_lineitems:1, clear_marc:1});
liGrid.isLoaded = true;
}
@@ -80,7 +73,8 @@
function(po) {
PO = po;
loadPOGrid();
- }
+ },
+ {flesh_lineitem_count:1}
);
}
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-06-25 16:01:44 UTC (rev 9921)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html 2008-06-25 16:03:12 UTC (rev 9922)
@@ -28,7 +28,8 @@
{name: '${_("Ordering Agency")}', get:getOrgInfo},
{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: '${_("Provider")}', get:getProvider},
+ {name: '${_("# Lineitems")}', field: 'lineitem_count'},
{name: '${_("State")}', field:'state'}
]]
}];
More information about the open-ils-commits
mailing list