[js] small cleanup stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 09 Jul 2009 19:40:45 +0200
branchstable
changeset 2364 fa16d36d60cb
parent 2363 1190b312bfe3
child 2365 9f5e911eab07
[js] small cleanup
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.edition.js	Thu Jul 09 19:36:05 2009 +0200
+++ b/web/data/cubicweb.edition.js	Thu Jul 09 19:40:45 2009 +0200
@@ -348,11 +348,11 @@
     // Success
     if (result[0]) {
 	if (onsuccess) {
-	    return onsuccess(result[1], formid);
+             onsuccess(result[1], formid);
 	} else {
 	    document.location.href = result[1];
-	    return ;
 	}
+      return;
     }
     unfreezeFormButtons(formid);
     // Failures
@@ -362,7 +362,7 @@
     if ( !isArrayLike(descr) || descr.length != 2 ) {
 	log('got strange error :', descr);
 	updateMessage(descr);
-	return ;
+	return;
     }
     _displayValidationerrors(formid, descr[0], descr[1]);
     updateMessage(_("please correct errors below"));
@@ -370,7 +370,7 @@
     if (onfailure){
 	onfailure(formid);
     }
-    return false;
+    return;
 }
 
 
@@ -422,7 +422,7 @@
     });
 }
 
-$(document).ready(setFormsTarget);
+jQuery(document).ready(setFormsTarget);
 
 
 /*