diff options
author | Tobias Brunner <tobias@strongswan.org> | 2015-11-04 14:30:18 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2015-11-09 16:36:42 +0100 |
commit | 3e48b244d864a27f8319967efef71180c1475c0c (patch) | |
tree | 0d557364c09689f1c5e038b34ea9a01decbb2cbf /src | |
parent | c9401f9ca3c85b56c6adbecbb8dcd12ecb75c939 (diff) | |
download | strongswan-3e48b244d864a27f8319967efef71180c1475c0c.tar.bz2 strongswan-3e48b244d864a27f8319967efef71180c1475c0c.tar.xz |
medsrv: Replace the JavaScript focus() calls with HTML5's autofocus
Diffstat (limited to 'src')
-rw-r--r-- | src/medsrv/templates/peer/add.cs | 2 | ||||
-rw-r--r-- | src/medsrv/templates/peer/edit.cs | 2 | ||||
-rw-r--r-- | src/medsrv/templates/static/script.js | 1 | ||||
-rw-r--r-- | src/medsrv/templates/user/add.cs | 2 | ||||
-rw-r--r-- | src/medsrv/templates/user/login.cs | 2 |
5 files changed, 4 insertions, 5 deletions
diff --git a/src/medsrv/templates/peer/add.cs b/src/medsrv/templates/peer/add.cs index 28a994f7f..27fdf0685 100644 --- a/src/medsrv/templates/peer/add.cs +++ b/src/medsrv/templates/peer/add.cs @@ -6,7 +6,7 @@ <table class="peer"> <tr> <td><label for="alias">Alias</label></td> - <td><input type="text" id="alias" name="alias" class="focus" maxlength="30" value="<?cs var:alias ?>";"/></td> + <td><input type="text" id="alias" name="alias" autofocus maxlength="30" value="<?cs var:alias ?>";"/></td> </tr> <tr> <td valign="top"><label for="public_key">Public Key</label></td> diff --git a/src/medsrv/templates/peer/edit.cs b/src/medsrv/templates/peer/edit.cs index 76fb9dafc..942762b49 100644 --- a/src/medsrv/templates/peer/edit.cs +++ b/src/medsrv/templates/peer/edit.cs @@ -6,7 +6,7 @@ <table class="peer"> <tr> <td><label for="alias">Alias</label></td> - <td><input type="text" id="alias" name="alias" maxlength="30" class="focus" value="<?cs var:alias ?>"/></td> + <td><input type="text" id="alias" name="alias" maxlength="30" autofocus value="<?cs var:alias ?>"/></td> </tr> <tr> <td valign="top"><label for="public_key">Public Key</label></td> diff --git a/src/medsrv/templates/static/script.js b/src/medsrv/templates/static/script.js index f2ab1e009..eac4912de 100644 --- a/src/medsrv/templates/static/script.js +++ b/src/medsrv/templates/static/script.js @@ -1,5 +1,4 @@ window.addEvent('domready', function() { - $$('.focus').each(function(e){e.focus();}); $$('table.list tr:nth-child(2n) td').each(function(e){e.set('class', 'even');}); $$('table.list tr:nth-child(2n+1) td').each(function(e){e.set('class', 'odd');}); $$('table.list tr th').each(function(e){e.set('class', 'head');}); diff --git a/src/medsrv/templates/user/add.cs b/src/medsrv/templates/user/add.cs index 8ba4e5c96..82442c543 100644 --- a/src/medsrv/templates/user/add.cs +++ b/src/medsrv/templates/user/add.cs @@ -6,7 +6,7 @@ <table class="user"> <tr> <td><label for="new_login">Username</label></td> - <td><input type="text" id="new_login" name="new_login" class="focus" maxlength="30" value="<?cs var:new_login ?>"/></td> + <td><input type="text" id="new_login" name="new_login" autofocus maxlength="30" value="<?cs var:new_login ?>"/></td> </tr> <tr> <td><label for="new_password">Password</label></td> diff --git a/src/medsrv/templates/user/login.cs b/src/medsrv/templates/user/login.cs index 1d6eadbbc..fbf5b8bd7 100644 --- a/src/medsrv/templates/user/login.cs +++ b/src/medsrv/templates/user/login.cs @@ -6,7 +6,7 @@ <table class="user"> <tr> <td><label for="login">Username</label></td> - <td><input type="text" id="login" name="login" size="30" maxlength="30" class="focus"/></td> + <td><input type="text" id="login" name="login" size="30" maxlength="30" autofocus /></td> </tr> <tr> <td><label for="password">Password</label></td> |