web/data/cubicweb.preferences.js
changeset 6549 be6d49623207
parent 5658 7b9553a9db65
child 6554 d60250252fc6
--- 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;
 }