[open-ils-commits] r9636 -
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon May 19 11:01:12 EDT 2008
Author: erickson
Date: 2008-05-19 11:01:10 -0400 (Mon, 19 May 2008)
New Revision: 9636
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
Log:
moved the picklist loading logic into a function which is then called via dojo.addOnLoad. doing this so dojo will have time to parse the page and create the grid object before the picklist is retrieved
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html 2008-05-18 21:53:59 UTC (rev 9635)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html 2008-05-19 15:01:10 UTC (rev 9636)
@@ -95,23 +95,30 @@
get:getLIDLibName}
]]
}];
- var plist = new openils.acq.Picklist(${c.oils.acq.picklist.value},
- function(model) {
- pickListGrid.setStructure(picklistLayout);
- pickListGrid.setModel(model);
- dojo.connect(pickListGrid, "onRowClick", function(evt) {
- openils.acq.Lineitems.loadGrid(lineItemGrid,
- model.getRow(evt.rowIndex).id,
- lineitemLayout);
- });
+ var plist = null;
+ function loadPL() {
+ plist = new openils.acq.Picklist(${c.oils.acq.picklist.value},
+ function(model) {
+ pickListGrid.setStructure(picklistLayout);
+ pickListGrid.setModel(model);
- dojo.byId("oils-acq-picklist-name").innerHTML = plist.name();
- dojo.byId("oils-acq-picklist-attr-cdate").innerHTML = plist.create_time();
- dojo.byId("oils-acq-picklist-attr-edate").innerHTML = plist.edit_time();
- dojo.byId("oils-acq-picklist-attr-owner").innerHTML = plist.owner();
- pickListGrid.update();
- });
+ dojo.connect(pickListGrid, "onRowClick",
+ function(evt) {
+ openils.acq.Lineitems.loadGrid(
+ lineItemGrid, model.getRow(evt.rowIndex).id, lineitemLayout);
+ }
+ );
+
+ dojo.byId("oils-acq-picklist-name").innerHTML = plist.name();
+ dojo.byId("oils-acq-picklist-attr-cdate").innerHTML = plist.create_time();
+ dojo.byId("oils-acq-picklist-attr-edate").innerHTML = plist.edit_time();
+ dojo.byId("oils-acq-picklist-attr-owner").innerHTML = plist.owner();
+ pickListGrid.update();
+ }
+ );
+ }
+ dojo.addOnLoad(loadPL);
</script>
</div>
<div dojoType="dijit.layout.ContentPane" sizeMin="20"
More information about the open-ils-commits
mailing list