js cleanup
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 19 Oct 2010 13:20:09 +0200
changeset 6549 be6d49623207
parent 6548 fd36c1049eed
child 6550 8c6a0f6bba3b
js cleanup
web/data/cubicweb.preferences.js
--- a/web/data/cubicweb.preferences.js	Tue Oct 19 13:19:50 2010 +0200
+++ b/web/data/cubicweb.preferences.js	Tue Oct 19 13:20:09 2010 +0200
@@ -51,25 +51,19 @@
 }
 
 function submitFailure(formid) {
-    var form = jQuery('#' + formid);
-    var dom = DIV({
-        'class': 'critical'
-    },
-    _("please correct errors below"));
-    jQuery(form).find('div.formsg').empty().append(dom);
+    var $form = jQuery('#' + formid);
+    var dom = DIV({'class': 'critical'}, _("please correct errors below"));
+    $form.find('div.formsg').empty().append(dom);
     // clearPreviousMessages()
-    jQuery(form).find('span.error').next().focus();
+    $form.find('span.error').next().focus();
 }
 
 function submitSucces(url, formid) {
-    var form = jQuery('#' + formid);
-    setCurrentValues(form);
-    var dom = DIV({
-        'class': 'msg'
-    },
-    _("changes applied"));
-    jQuery(form).find('div.formsg').empty().append(dom);
-    jQuery(form).find('input').removeClass('changed');
+    var $form = jQuery('#' + formid);
+    setCurrentValues($form);
+    var dom = DIV({'class': 'msg'}, _("changes applied"));
+    $form.find('div.formsg').empty().append(dom);
+    $form.find('input').removeClass('changed');
     checkValues(form, true);
     return;
 }