web/data/cubicweb.edition.js
branchstable
changeset 6727 2eeccd6f8abe
parent 6726 51880d28ef63
child 6746 f29a5f015fc3
--- a/web/data/cubicweb.edition.js	Thu Dec 02 10:09:12 2010 +0100
+++ b/web/data/cubicweb.edition.js	Thu Dec 02 10:09:35 2010 +0100
@@ -11,7 +11,7 @@
 /**
  * .. function:: setPropValueWidget(varname, tabindex)
  *
- * called on Eproperty key selection:
+ * called on CWProperty key selection:
  * - get the selected value
  * - get a widget according to the key by a sync query to the server
  * - fill associated div with the returned html
@@ -66,11 +66,11 @@
                 relation: selectedValue,
                 rql: rql_for_eid(eid),
                 '__notemplate': 1,
-                callback: function() {
-                    _showMatchingSelect(eid, jQuery('#' + divId));
-                }
             };
-            jQuery('#unrelatedDivs_' + eid).loadxhtml(baseuri() + 'view', args, 'post', 'append');
+            var d = jQuery('#unrelatedDivs_' + eid).loadxhtml(baseuri() + 'view', args, 'post', 'append');
+            d.addCallback(function() {
+                _showMatchingSelect(eid, jQuery('#' + divId));
+            });
         } else {
             _showMatchingSelect(eid, divNode);
         }