]> git.sur5r.net Git - contagged/commitdiff
set focus to search or first field
authorAndreas Gohr <gohr@cosmocode.de>
Wed, 1 Feb 2006 15:41:10 +0000 (16:41 +0100)
committerAndreas Gohr <gohr@cosmocode.de>
Wed, 1 Feb 2006 15:41:10 +0000 (16:41 +0100)
darcs-hash:20060201154110-6e07b-37343bab8ba6985bb28324f88f5a64065327930c.gz

js/gui.js
templates/entry_edit.tpl
templates/filter.tpl

index 3d6053bb10c0859273a9b0cdaac06bddeab1d18a..c048c994939f5ce8b65252729971c81ee5db7208 100644 (file)
--- a/js/gui.js
+++ b/js/gui.js
@@ -137,6 +137,11 @@ function init(){
   if($('tageditlookup') !== null)
     new Ajax.Autocompleter('tageditlookup','tageditresult', 'ajax.php', {paramName: 'taglookup', tokens: ','});
 
+  if($('searchfield') !== null)
+    $('searchfield').focus();
+
+  if($('firstfield') !== null)
+    $('firstfield').focus();
 }
 
 Event.observe(window, 'load', init, false);
index 9461846ad26ce530df17ab39975cc8d03b52cd66..816ebddc888a862bea0fa0bea9245b1296bb8a88 100644 (file)
@@ -21,7 +21,7 @@
         </tr>
         <tr>
           <td align="right" valign="top" nowrap="nowrap">{$lang.name}:</td>
-          <td><input type="text" class="input" name="entry[name]" value="{$entry.name|escape}"></td>
+          <td><input type="text" class="input" name="entry[name]" value="{$entry.name|escape}" id="firstfield"></td>
         </tr>
         <tr>
           <td align="right" valign="top" nowrap="nowrap">{$lang.givenname}:</td>
index 85cb88dae3994b8f4761a51c94a76eb05c4e383f..136776ba6ca958bc784a173b8b046e7b029d2bb0 100644 (file)
@@ -56,7 +56,7 @@
 
 <div class="search x">
   <form method="get" action="index.php" accept-charset="utf-8">
-    <input type="text" name="search" class="searchfield"
+    <input type="text" name="search" class="searchfield" id="searchfield"
      value="{$smarty.request.search|escape}" />
     <input type="submit" value="{$lang.search}" class="searchbutton" />
   </form>