[open-ils-commits] r11377 - trunk/Open-ILS/web/js/ui/default/acq/picklist

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Dec 2 14:36:42 EST 2008


Author: erickson
Date: 2008-12-02 14:36:39 -0500 (Tue, 02 Dec 2008)
New Revision: 11377

Modified:
   trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js
Log:
updated checkedmultiselect to match dojo-1.2 api.  z source retrieval is now async

Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js	2008-12-01 23:42:30 UTC (rev 11376)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js	2008-12-02 19:36:39 UTC (rev 11377)
@@ -20,18 +20,24 @@
 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
+        }
     );
+}
 
-    openils.Event.parse_and_raise(sources);
+function _drawForm(r) {
 
+    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]);



More information about the open-ils-commits mailing list