koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/catalogue ...


From: Antoine Farnault
Subject: [Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/catalogue ...
Date: Tue, 10 Jul 2007 15:21:52 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Antoine Farnault <toins>        07/07/10 15:21:52

Modified files:
        koha-tmpl/intranet-tmpl/prog/en/catalogue: advsearch.tmpl 

Log message:
        auto focus on search box

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/advsearch.tmpl?cvsroot=koha&r1=1.8&r2=1.9

Patches:
Index: advsearch.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/advsearch.tmpl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- advsearch.tmpl      3 Jul 2007 18:19:49 -0000       1.8
+++ advsearch.tmpl      10 Jul 2007 15:21:51 -0000      1.9
@@ -86,7 +86,7 @@
     <option value="bc" <!-- TMPL_IF NAME="selected" -->selected="<!-- TMPL_VAR 
NAME="selected" -->"<!-- /TMPL_IF -->>Barcode</option>
 
         </select>
-        <input type="text" size="30" name="q" title="Enter search terms" 
value=""/>
+        <input id="search_box" type="text" size="30" name="q" title="Enter 
search terms" value=""/>
         <!-- TMPL_IF NAME="expanded_options" -->
             <!-- TMPL_IF NAME="add_field" -->
                 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add 
another field">[+]</a>
@@ -457,17 +457,21 @@
 </form>
 
 <script type="text/JavaScript" language="JavaScript">
-       /**
+
+document.getElementById('search_box').focus(); // auto focus on the search 
input.
+
+/**
         *  Function add_field();
      *  This function allows to display a new field to search.
      */
-       function add_field() {
+function add_field() {
                var ButtonPlus = document.getElementById('ButtonPlus');
                var line       = ButtonPlus.parentNode;
                var dad        = line.parentNode;
                dad.appendChild(line.cloneNode(true));
                line.removeChild(ButtonPlus);
-       }
+}
+
 </script>
 
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->




reply via email to

[Prev in Thread] Current Thread [Next in Thread]