]> dev.renevier.net Git - syj.git/blobdiff - public/js/account.js
js strict mode in development files
[syj.git] / public / js / account.js
index c19d30ee9abd763a444452884884e49f337f60e7..c54353268ea3d410d7f38a739869fdba90d9f0fe 100644 (file)
@@ -1,10 +1,12 @@
-/*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
     and is published under the AGPL license. */
 
+"use strict";
+
 document.observe("dom:loaded", function() {
     var currentmail = $("account_email").value, form = $("accountform");
 
-    form.focus();
+    form.setfocus();
 
     form.observe('submit', function(evt) {
         var control, errorElements;
@@ -44,8 +46,7 @@ document.observe("dom:loaded", function() {
          * if there are errors, cancel submission
          */
         if (errorElements.length) {
-            errorElements[0].highlight('#F08080').focus();
-            errorElements[0].select();
+            errorElements[0].highlight('#F08080').activate();
             evt.stop();
         }
     });