[open-ils-commits] r12093 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 6 10:42:14 EST 2009
Author: erickson
Date: 2009-02-06 10:42:12 -0500 (Fri, 06 Feb 2009)
New Revision: 12093
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
fixed problem with async widget building and saving (by using my own code as it was meant to be used)
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-02-06 15:24:02 UTC (rev 12092)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-02-06 15:42:12 UTC (rev 12093)
@@ -118,6 +118,7 @@
_buildLinkSelector : function() {
if(this.idlField.reltype != 'has_a') return false;
+
dojo.require('openils.PermaCrud');
dojo.require('dojo.data.ItemFileReadStore');
dojo.require('dijit.form.FilteringSelect');
@@ -128,23 +129,17 @@
this.widget = new dijit.form.FilteringSelect(this.dijitArgs, this.parentNode);
var rclassIdl = fieldmapper.IDL.fmclasses[linkClass];
var vfield;
+
for(var f in rclassIdl.fields) {
if(self.idlField.key == rclassIdl.fields[f].name) {
vfield = rclassIdl.fields[f];
break;
}
}
+
this.widget.searchAttr = this.widget.labelAttr = vfield.selector || vfield.name;
this.widget.valueAttr = vfield.name;
- var list = new openils.PermaCrud().retrieveAll(linkClass);
- self.widget.store = new dojo.data.ItemFileReadStore(
- {data:fieldmapper[linkClass].toStoreData(list)}
- );
- self.widget.startup();
- self._widgetLoaded();
-
- /*
new openils.PermaCrud().retrieveAll(linkClass, {
async : true,
oncomplete : function(r) {
@@ -157,7 +152,8 @@
self._widgetLoaded();
}
});
- */
+
+ return true;
},
/**
More information about the open-ils-commits
mailing list