web/data/cubicweb.edition.js
changeset 2483 6e328fcc276c
parent 2458 4d114865098f
child 2490 b0771c03f531
--- a/web/data/cubicweb.edition.js	Fri Jul 24 12:43:41 2009 +0200
+++ b/web/data/cubicweb.edition.js	Fri Jul 24 14:50:43 2009 +0200
@@ -453,6 +453,8 @@
  * @param rtype : the attribute being edited
  * @param eid : the eid of the entity being edited
  * @param reload: boolean to reload page if true (when changing URL dependant data)
+ * @param default_value : value if the field is empty
+ * @param lzone : html fragment (string) for a clic-zone triggering actual edition
  */
 function inlineValidateAttributeForm(rtype, eid, divid, reload, default_value) {
     try {
@@ -477,7 +479,7 @@
 	if (reload) {
 	    document.location.href = result[1];
 	} else {
-	    var fieldview = getNode(divid);
+	    var fieldview = getNode('value-' + divid);
 	    // XXX using innerHTML is very fragile and won't work if
 	    // we mix XHTML and HTML
 	    fieldview.innerHTML = result[2];
@@ -514,6 +516,7 @@
 	  if (result[0]) {
             var d = asyncRemoteExec('reledit_form', eid, rtype, role, default_value, lzone);
             d.addCallback(function (result) {
+              // XXX brittle ... replace with loadxhtml
               jQuery('#'+divid+'-reledit').replaceWith(result);
             });
           }