Fixes general slowness working with invoice and PO forms if
more than a couple hundred providers are defined.
This could be generalized with a bit of work with Fieldmapper
to define "has-one-chosen-by-user-from-cast-of-thousands"
relationships that should trigger use the auto-complete widget.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18785
dcc99617-32d9-48b4-a31d-
7c20da2025e4
return this._buildOrgSelector();
if(linkClass == 'acpl')
return this._buildCopyLocSelector();
+ if(linkClass == 'acqpro')
+ return this._buildAutoCompleteSelector(linkClass, vfield.selector);
dojo.require('dojo.data.ItemFileReadStore');
});
return true;
+ },
+
+ _buildAutoCompleteSelector : function(linkClass, searchAttr) {
+ dojo.require("openils.widget.PCrudAutocompleteBox");
+ dojo.mixin(this.dijitArgs, {
+ fmclass : linkClass,
+ searchAttr : searchAttr,
+ });
+ this.widget = new openils.widget.PCrudAutocompleteBox(this.dijitArgs, this.parentNode);
+ this._widgetLoaded();
+ return true;
}
});