[edition js] update docstring and remove a 3.9 deprecation warning stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 02 Dec 2010 10:09:35 +0100
branchstable
changeset 6727 2eeccd6f8abe
parent 6726 51880d28ef63
child 6730 253dd28cc35f
[edition js] update docstring and remove a 3.9 deprecation warning
web/data/cubicweb.edition.js
--- 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);
         }