|
Lines 1-3
Link Here
|
|
|
1 |
<script type="text/javascript"> |
| 2 |
//<![CDATA[ |
| 3 |
YAHOO.util.Event.onContentReady("header_search", function() { |
| 4 |
new function() { |
| 5 |
// Define a custom formatter function |
| 6 |
this.fnCustomFormatter = function(oResultItem, sQuery) { |
| 7 |
var name = oResultItem[0]; |
| 8 |
var aMarkup = [ |
| 9 |
"<div class=\"sample-result\">", |
| 10 |
name, |
| 11 |
"<\/div>"]; |
| 12 |
return (aMarkup.join("")); |
| 13 |
}; |
| 14 |
|
| 15 |
// marclist |
| 16 |
this.marclistDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/authorities/ysearch.pl", ["\n", "\t"]); |
| 17 |
this.marclistDS.scriptQueryAppend = "op=do_search&type=intranet&and_or=and&operator=contains&orderby=HeadingAsc&querytype=marclist"; |
| 18 |
this.marclistDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT; |
| 19 |
this.marclistDS.maxCacheEntries = 60; |
| 20 |
this.marclistDS.queryMatchSubset = false; |
| 21 |
|
| 22 |
var myInput = document.getElementById('value_any'); |
| 23 |
var myContainer = document.getElementById('yvaluecontainermarclist'); |
| 24 |
this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.marclistDS); |
| 25 |
this.oAutoComp.queryDelay = 1; |
| 26 |
this.oAutoComp.formatResult = this.fnCustomFormatter; |
| 27 |
this.oAutoComp.maxResultsDisplayed = 1000; |
| 28 |
|
| 29 |
|
| 30 |
// mainentry |
| 31 |
this.mainentryDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/authorities/ysearch.pl", ["\n", "\t"]); |
| 32 |
this.mainentryDS.scriptQueryAppend = "op=do_search&type=intranet&and_or=and&operator=contains&orderby=HeadingAsc&querytype=mainentry"; |
| 33 |
this.mainentryDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT; |
| 34 |
this.mainentryDS.maxCacheEntries = 60; |
| 35 |
this.mainentryDS.queryMatchSubset = false; |
| 36 |
|
| 37 |
var myInput = document.getElementById('value_main'); |
| 38 |
var myContainer = document.getElementById('yvaluecontainermainentry'); |
| 39 |
this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.mainentryDS); |
| 40 |
this.oAutoComp.queryDelay = 1; |
| 41 |
this.oAutoComp.formatResult = this.fnCustomFormatter; |
| 42 |
this.oAutoComp.maxResultsDisplayed = 1000; |
| 43 |
|
| 44 |
|
| 45 |
// mainmainentry |
| 46 |
this.mainentryDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/authorities/ysearch.pl", ["\n", "\t"]); |
| 47 |
this.mainentryDS.scriptQueryAppend = "op=do_search&type=intranet&and_or=and&operator=contains&orderby=HeadingAsc&querytype=mainmainentry"; |
| 48 |
this.mainentryDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT; |
| 49 |
this.mainentryDS.maxCacheEntries = 60; |
| 50 |
this.mainentryDS.queryMatchSubset = false; |
| 51 |
|
| 52 |
var myInput = document.getElementById('value_mainstr'); |
| 53 |
var myContainer = document.getElementById('yvaluecontainermainmainentry'); |
| 54 |
this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.mainentryDS); |
| 55 |
this.oAutoComp.queryDelay = 1; |
| 56 |
this.oAutoComp.formatResult = this.fnCustomFormatter; |
| 57 |
this.oAutoComp.maxResultsDisplayed = 1000; |
| 58 |
|
| 59 |
|
| 60 |
} |
| 61 |
}); |
| 62 |
//]]> |
| 63 |
</script> |
| 64 |
|
| 65 |
|
| 66 |
<span id="header_search"> |
| 1 |
<form name="f" method="get" action="auth_finder.pl"> |
67 |
<form name="f" method="get" action="auth_finder.pl"> |
| 2 |
<input type="hidden" name="op" value="do_search" /> |
68 |
<input type="hidden" name="op" value="do_search" /> |
| 3 |
<input type="hidden" name="type" value="intranet" /> |
69 |
<input type="hidden" name="type" value="intranet" /> |
|
Lines 17-24
Link Here
|
| 17 |
<option value="start">starts with</option> |
83 |
<option value="start">starts with</option> |
| 18 |
<option value="is">is exactly</option> |
84 |
<option value="is">is exactly</option> |
| 19 |
</select> |
85 |
</select> |
| 20 |
<input type="text" name="value_mainstr" value="[% value_mainstr |html %]" /> |
86 |
<input id="value_mainstr" style="width:400px;" type="text" name="value_mainstr" value="[% value_mainstr |html %]" /> |
|
|
87 |
<div id="yvaluecontainermainmainentry"></div> |
| 21 |
</li> |
88 |
</li> |
|
|
89 |
|
| 22 |
<li> |
90 |
<li> |
| 23 |
<label for="mainentry">Main entry</label> |
91 |
<label for="mainentry">Main entry</label> |
| 24 |
<input type="hidden" name="marclist" value="mainentry" /> |
92 |
<input type="hidden" name="marclist" value="mainentry" /> |
|
Lines 29-36
Link Here
|
| 29 |
<option value="start">starts with</option> |
97 |
<option value="start">starts with</option> |
| 30 |
<option value="is">is exactly</option> |
98 |
<option value="is">is exactly</option> |
| 31 |
</select> |
99 |
</select> |
| 32 |
<input type="text" name="value_main" value="[% value_main |html %]" /> |
100 |
<input id="value_main" style="width:400px;" type="text" name="value_main" value="[% value_main |html %]" /> |
|
|
101 |
<div id="yvaluecontainermainentry"></div> |
| 33 |
</li> |
102 |
</li> |
|
|
103 |
|
| 34 |
<li> |
104 |
<li> |
| 35 |
<label for="marclist">Anywhere</label> |
105 |
<label for="marclist">Anywhere</label> |
| 36 |
<input type="hidden" name="marclist" value="" /> |
106 |
<input type="hidden" name="marclist" value="" /> |
|
Lines 41-55
Link Here
|
| 41 |
<option value="start">starts with</option> |
111 |
<option value="start">starts with</option> |
| 42 |
<option value="is">is exactly</option> |
112 |
<option value="is">is exactly</option> |
| 43 |
</select> |
113 |
</select> |
| 44 |
<input type="text" name="value_any" value="[% value_any |html %]" /> |
114 |
<input id="value_any" style="width:400px;" type="text" name="value_any" value="[% value_any |html %]" /> |
|
|
115 |
<div id="yvaluecontainermarclist"></div> |
| 45 |
</li> |
116 |
</li> |
| 46 |
<li> |
117 |
|
| 47 |
<label for="orderby">Sort by </label> |
118 |
<li> |
| 48 |
<select name="orderby" id="orderby"> |
119 |
<label for="orderby">Sort by </label> |
| 49 |
<option value="">No order</option> |
120 |
<select name="orderby" id="orderby"> |
| 50 |
<option value="HeadingAsc" selected="selected">Heading Ascendant</option> |
121 |
<option value="">No order</option> |
| 51 |
<option value="HeadingDsc">Heading Descendant</option> |
122 |
<option value="HeadingAsc" selected="selected">Heading Ascendant</option> |
| 52 |
</select> |
123 |
<option value="HeadingDsc">Heading Descendant</option> |
| 53 |
</li></ol></fieldset> |
124 |
</select> |
|
|
125 |
</li></ol></fieldset> |
| 54 |
<fieldset class="action"> <input type="submit" value="Start search" class="submit" /> <a class="cancel close" href="#">Cancel</a></fieldset> |
126 |
<fieldset class="action"> <input type="submit" value="Start search" class="submit" /> <a class="cancel close" href="#">Cancel</a></fieldset> |
| 55 |
</form> |
127 |
</form> |
|
|
128 |
</span> |