[open-ils-commits] r9663 -
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 22 11:40:36 EDT 2008
Author: djfiander
Date: 2008-05-22 11:40:34 -0400 (Thu, 22 May 2008)
New Revision: 9663
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html
Log:
Display provider name, fix template to use correct jsid when
generating html.
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html 2008-05-22 02:28:09 UTC (rev 9662)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html 2008-05-22 15:40:34 UTC (rev 9663)
@@ -43,8 +43,10 @@
dojo.require('dojo.data.ItemFileReadStore');
dojo.require('dijit.layout.SplitContainer');
dojo.require('dojox.grid.Grid');
+ dojo.require('openils.editors');
dojo.require('openils.acq.Picklist');
dojo.require("openils.acq.Fund");
+ dojo.require('openils.acq.Provider');
dojo.require("openils.acq.Lineitems");
dojo.require("openils.widget.FundSelector");
dojo.require("fieldmapper.OrgUtils");
@@ -60,6 +62,11 @@
if (!data) return;
return plist.find_attr(data.id, "price", "lineitem_marc_attr_definition")
}
+ function getJUBProvider(rowIndex) {
+ var data = ${grid_jsid}.model.getRow(rowIndex);
+ if (!data || !data.provider) return;
+ return openils.acq.Provider.retrieve(data.provider).name();
+ }
function getLIDFundName(rowIndex) {
var data = lineItemGrid.model.getRow(rowIndex);
if (!data || !data.fund) return;
@@ -89,7 +96,8 @@
{name: "ID", field: 'id'},
{name: "Title", width: "50%", get:getJUBTitle},
{name: "Price", get:getJUBPrice},
- {name: "Vendor", field: 'provider'},
+ {name: "Vendor", field: 'provider',
+ get:getJUBProvider},
{name: "# of Copies", field: 'item_count'}
]]
}];
@@ -106,15 +114,15 @@
]]
}];
function populateJUBGrid(gridDom, model) {
- pickListGrid.setStructure(picklistLayout);
- pickListGrid.setModel(model);
+ ${grid_js_id}.setStructure(picklistLayout);
+ ${grid_js_id}.setModel(model);
dojo.connect(gridDom, "onRowClick",
function(evt) {
openils.acq.Lineitems.loadGrid(
lineItemGrid, model.getRow(evt.rowIndex).id, lineitemLayout);
});
- pickListGrid.update();
+ ${grid_js_id}.update();
}
</script>
</div>
@@ -127,3 +135,6 @@
</div>
</div>
</%def>
+<!-- Local Variables: -->
+<!-- mmm-classes: html-js -->
+<!-- End: -->
More information about the open-ils-commits
mailing list