From: erickson Date: Tue, 2 Dec 2008 19:36:39 +0000 (+0000) Subject: updated checkedmultiselect to match dojo-1.2 api. z source retrieval is now async X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bdc7d8e49748f31172595eb9584afd7c5bf89bc4;p=Evergreen.git updated checkedmultiselect to match dojo-1.2 api. z source retrieval is now async git-svn-id: svn://svn.open-ils.org/ILS/trunk@11377 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js index 4b4051f823..8dea6b1e1f 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js @@ -20,18 +20,24 @@ var user = new openils.User(); var searchLimit = 10; function drawForm() { - - var sources = fieldmapper.standardRequest( + fieldmapper.standardRequest( ['open-ils.search', 'open-ils.search.z3950.retrieve_services'], - [user.authtoken] + { async: true, + params: [user.authtoken], + oncomplete: _drawForm + } ); +} + +function _drawForm(r) { - openils.Event.parse_and_raise(sources); + var sources = openils.Util.readResponse(r); + if(!sources) return; for(var name in sources) { source = sources[name]; if(name == 'native-evergreen-catalog') continue; - bibSourceSelect.addOption(name, name+':'+source.host); + bibSourceSelect.addOption({value:name, label:source.label}); for(var attr in source.attrs) if(!attr.match(/^#/)) // xml comment nodes searchFields.push(source.attrs[attr]);