X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=public%2Fjs%2Flogin.js;h=491bfad6d75455f01b5399d962880f5c8be601a4;hb=HEAD;hp=2721840d638d3a17177744ad7300db42c1f37c67;hpb=9efd079d59d269811abc4c551b2f39ab2e6a05fb;p=syj.git diff --git a/public/js/login.js b/public/js/login.js index 2721840..491bfad 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -1,17 +1,18 @@ -/* 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 form = $("loginform"); - form.focus(); + form.setfocus(); form.observe("submit", function(evt) { var loginput = $("login_user"); $$('.error').invoke('remove'); if (!loginput.check(function() { return !this.value.strip().empty(); }, SyjStrings.userEmptyWarn)) { - loginput.highlight('#F08080').focus(); - loginput.select(); + loginput.highlight('#F08080').activate(); evt.stop(); return; }