Modifying styling of resident search boxes in order to prevent brief appearance of...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / bookfund-admin-search.inc
1 <!-- Begin Bookfund Admin Resident Search Box -->
2 <!-- TMPL_IF NAME="CircAutocompl" --><script type="text/javascript">
3 //<![CDATA[
4 YAHOO.util.Event.onContentReady("header_search", function() {
5     new function() {
6         // Define a custom formatter function
7         this.fnCustomFormatter = function(oResultItem, sQuery) {
8             var name        = oResultItem[0];
9             var cardnumber  = oResultItem[1];
10             var address     = oResultItem[2];
11             var city        = oResultItem[3];
12             var zip         = oResultItem[4];
13             var aMarkup = [
14                 "<div class=\"sample-result\">",
15                 name,
16                 " (",
17                 cardnumber,
18                 ")<small> -- ",
19                 address,
20                 ", ",
21                 city,
22                 "</small>",
23                 "</div>"];
24             return (aMarkup.join(""));
25         };
26
27         // Instantiate one XHR DataSource and define schema as an array:
28         //     ["Record Delimiter",
29         //     "Field Delimiter"]
30         this.oACDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/circ/ysearch.pl", ["\n", "\t"]);
31         this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
32         this.oACDS.maxCacheEntries = 60;
33         this.oACDS.queryMatchSubset = true;
34     
35         // Instantiate first AutoComplete
36         var myInput = document.getElementById('findborrower');
37         var myContainer = document.getElementById('yborrowercontainer');
38         this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
39         //this.oAutoComp.delimChar = ";";
40         //this.oAutoComp.queryDelay = 1;
41         this.oAutoComp.formatResult = this.fnCustomFormatter;
42 }
43 });
44  //]]>
45  </script>  <!-- /TMPL_IF -->
46 <div id="header_search">
47         <div id="bookfund_search" class="residentsearch primary">
48         <p class="tip">Search Book Funds:</p>
49
50         <form action="/cgi-bin/koha/admin/aqbookfund.pl" method="post">
51       <label for="filter_bookfundid">Code: </label><select name="filter_bookfundid" id="filter_bookfundid">
52         <option value="">----</option>
53     <!-- TMPL_LOOP name="filter_bookfundids" -->
54       <!-- TMPL_IF NAME="selected" -->
55         <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
56       <!-- TMPL_ELSE -->
57         <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
58       <!-- /TMPL_IF -->
59     <!-- /TMPL_LOOP -->
60       </select>
61       <label for="filter_bookfundname">Name: </label><input type="text" name="filter_bookfundname" id="filter_bookfundname" size="10" value="<!-- TMPL_VAR name="filter_bookfundname" -->" />
62       <label for="filter_branchcode">Library: </label><select name="filter_branchcode" id="filter_branchcode">
63         <option value="">----</option>
64     <!-- TMPL_LOOP name="filter_branches" -->
65       <!-- TMPL_IF NAME="selected" -->
66         <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
67       <!-- TMPL_ELSE -->
68         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
69       <!-- /TMPL_IF -->
70     <!-- /TMPL_LOOP -->
71       </select>
72       <input type="submit" name="filter" value="Submit" />
73 </form>
74
75         </div>
76         <div id="circ_search" class="residentsearch">
77         <p class="tip">Enter patron card number or partial name:</p>
78     <form action="/cgi-bin/koha/circ/circulation.pl" method="post">
79     <!-- TMPL_IF NAME="CircAutocompl" -->
80     <div class="autocomplete">
81             <div id="borrowerautocomplete" class="autocomplete">
82                 <input autocomplete="off" id="findborrower" name="findborrower" class="focus" type="text" />
83                 <div id="yborrowercontainer"></div>
84                 <input id="ysearchsubmit" type="submit" value="Submit" />
85                 <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
86                 <input name="printer" value="" type="hidden" />
87             </div>
88         </div>
89         <!-- TMPL_ELSE -->
90             <input id="findborrower" name="findborrower" size="40" class="focus" type="text" />
91             <input name="branch" value="<!-- TMPL_VAR name="branch" -->" type="hidden" />
92             <input name="printer" value="" type="hidden" />
93             <input value="Submit" type="submit" />
94         <!-- /TMPL_IF -->
95     </form>
96         </div>  
97         <div id="catalog_search" class="residentsearch">
98         <p class="tip">Enter search keywords:</p>
99                 <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" id="cat-search-block">
100                          <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" />
101                                 <input type="submit" value="Submit"  class="form-submit" />
102                 </form>
103         </div>
104                         <ul>
105                         <li><a href="/cgi-bin/koha/admin/aqbookfund.pl#bookfund_search">Search Book Funds</a></li>
106                         <li><a href="/cgi-bin/koha/circ/circulation.pl#circ_search">Check Out</a></li>
107                         <li><a href="/cgi-bin/koha/catalogue/search.pl#catalog_search">Search the Catalog</a></li>
108                         </ul>   
109 </div>
110 <!-- End Suggestions Resident Search Box -->