Lines 1-65
Link Here
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
2 |
<title>Koha › UNIMARC field 225a builder</title> |
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
<head> |
4 |
<style type="text/css"> |
5 |
<title>UNIMARC field 225a builder</title> |
5 |
#custom-doc { width:37.85em;*width:36.93em;min-width:492px; margin:auto; text-align:left; } |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 |
</style> |
7 |
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> |
|
|
8 |
<script type="text/javascript" src="[% yuipath %]/datasource/datasource.js"></script> |
9 |
<script type="text/javascript" src="[% yuipath %]/autocomplete/autocomplete-min.js"></script> |
10 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/staff-global.css" /> |
11 |
|
12 |
</head> |
13 |
<body id="cat_unimarc_field_210c_bis" class="cat"> |
14 |
<div id="header_search"> |
15 |
<script type="text/javascript"> |
7 |
<script type="text/javascript"> |
16 |
//<![CDATA[ |
8 |
//<![CDATA[ |
17 |
YAHOO.util.Event.onContentReady("header_search", function() { |
9 |
$(document).ready(function(){ |
18 |
new function() { |
10 |
$( "#findvalue" ).autocomplete({ |
19 |
// Define a custom formatter function |
11 |
source: "/cgi-bin/koha/cataloguing/ysearch.pl?table=biblioitems&field=publishercode", |
20 |
this.fnCustomFormatter = function(oResultItem, sQuery) { |
12 |
minLength: 3, |
21 |
var name = oResultItem[0]; |
13 |
select: function( event, ui ) { |
22 |
var aMarkup = [ |
14 |
$( "#findvalue" ).val( ui.item.fieldvalue ); |
23 |
"<div class=\"sample-result\">", |
15 |
return false; |
24 |
name, |
16 |
} |
25 |
"<\/div>"]; |
17 |
}) |
26 |
return (aMarkup.join("")); |
18 |
.data( "autocomplete" )._renderItem = function( ul, item ) { |
27 |
}; |
19 |
return $( "<li></li>" ) |
|
|
20 |
.data( "item.autocomplete", item ) |
21 |
.append( "<a>" + item.fieldvalue + "</a>" ) |
22 |
.appendTo( ul ); |
23 |
}; |
28 |
|
24 |
|
29 |
// Instantiate one XHR DataSource and define schema as an array: |
25 |
}); |
30 |
// ["Record Delimiter", |
|
|
31 |
// "Field Delimiter"] |
32 |
this.oACDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/cataloguing/ysearch.pl", ["\n", "\t"]); |
33 |
this.oACDS.scriptQueryAppend = "table=biblioitems&field=publishercode"; |
34 |
this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT; |
35 |
this.oACDS.maxCacheEntries = 60; |
36 |
this.oACDS.queryMatchSubset = false; |
37 |
|
38 |
// Instantiate first AutoComplete |
39 |
var myInput = document.getElementById('findvalue'); |
40 |
var myContainer = document.getElementById('yvaluecontainer'); |
41 |
this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS); |
42 |
//this.oAutoComp.delimChar = ";"; |
43 |
this.oAutoComp.queryDelay = 1; |
44 |
this.oAutoComp.formatResult = this.fnCustomFormatter; |
45 |
this.oAutoComp.maxResultsDisplayed = 1000; |
46 |
} |
47 |
}); |
48 |
//]]> |
26 |
//]]> |
49 |
</script> |
27 |
</script> |
50 |
<div id="mainbloc"> |
|
|
51 |
|
28 |
|
52 |
<div id="plugin"> |
29 |
</head> |
|
|
30 |
<body id="cat_unimarc_field_210c_bis" class="cat"> |
31 |
|
32 |
<div id="custom-doc" class="yui-t7"> |
33 |
<div id="bd"> |
34 |
|
35 |
<h1>UNIMARC field 225a builder</h1> |
53 |
<div class="autocomplete"> |
36 |
<div class="autocomplete"> |
54 |
<form name="f_pop" onsubmit="javascript:report()" action=""> |
37 |
<form name="f_pop" onsubmit="javascript:report()" action=""> |
55 |
<div id="borrowerautocomplete" class="autocomplete"> |
38 |
<div id="fieldautocomplete" class="autocomplete"> |
56 |
<input autocomplete="off" id="findvalue" name="findvalue" size="40" class="focus" type="text" /><br /><br /> |
39 |
<fieldset> |
57 |
<input id="ysearchsubmit" type="submit" class="submit" value="Submit" /> |
40 |
<input autocomplete="off" id="findvalue" name="findvalue" size="40" class="focus" type="text" /> |
58 |
<div id="yvaluecontainer"></div> |
41 |
<fieldset class="action"> |
|
|
42 |
<input type="submit" class="submit" value="Choose" /> |
43 |
</fieldset> |
44 |
</fieldset> |
59 |
</div> |
45 |
</div> |
60 |
</form> |
46 |
</form> |
61 |
</div> |
47 |
</div> |
62 |
</div> |
48 |
</div> |
63 |
</div> |
49 |
</div> |
64 |
<script type="text/javascript"> |
50 |
<script type="text/javascript"> |
65 |
function report() { |
51 |
function report() { |
Lines 71-75
YAHOO.util.Event.onContentReady("header_search", function() {
Link Here
|
71 |
return false; |
57 |
return false; |
72 |
} |
58 |
} |
73 |
</script> |
59 |
</script> |
74 |
</body> |
60 |
[% INCLUDE 'popup-bottom.inc' %] |
75 |
</html> |
|
|
76 |
- |
|
|