Author: bleny Date: 2014-08-08 15:28:23 +0200 (Fri, 08 Aug 2014) New Revision: 2207 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2207 Log: fixes #5612 add a focus on login field on login page Modified: branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp branches/wao-4.0.x/wao-web/src/main/webapp/wao.js Modified: branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp =================================================================== --- branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp 2014-08-06 16:21:53 UTC (rev 2206) +++ branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp 2014-08-08 13:28:23 UTC (rev 2207) @@ -27,6 +27,11 @@ <title> <s:text name="wao.ui.form.authentication.title" /> </title> + <script> + $(document).ready(function () { + $('input[name="login"]').focus(); + }); + </script> </head> <body> Modified: branches/wao-4.0.x/wao-web/src/main/webapp/wao.js =================================================================== --- branches/wao-4.0.x/wao-web/src/main/webapp/wao.js 2014-08-06 16:21:53 UTC (rev 2206) +++ branches/wao-4.0.x/wao-web/src/main/webapp/wao.js 2014-08-08 13:28:23 UTC (rev 2207) @@ -611,7 +611,10 @@ // FIXME brendan 07/04/14 cannot enable select2 because we can't bind blur event without driving the application crazy, see https://github.com/ivaynberg/select2/issues/2193 //$('select').addClass('input-xlarge').select2(); - $('select.select2').select2(); + var $select2Inputs = $('select.select2'); + if ($select2Inputs.length > 0) { + $('select.select2').select2(); + } WAO = new Wao();