/
index.html
86 lines (78 loc) · 3.25 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="lib/jquery/jquery-ui.css" />
<!--<link rel="stylesheet" href="lib/Smoothness/jquery.ui.all.css" />-->
<script type="text/javascript" src="lib/jquery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="lib/jqueryui/jquery-ui.1.10.2.min.js"></script>
<!--<script type="text/javascript" src="http://code.jquery.com/ui/1.9.0-beta.1/jquery-ui.min.js"></script>-->
<script type="text/javascript" src="lib/underscore-min.js"></script>
<script type="text/javascript" src="lib/backboneJS/backbone.js"></script>
<script type="text/javascript" src="lib/jquery.rdfquery.min.js"></script>
<script type="text/javascript" src="lib/vie/vie.js"></script>
<script type="text/javascript" src="lib/vie.entitypreview.js"></script>
<script type="text/javascript" src="lib/vie.autocomplete.js"></script>
<script>
$(document).ready(function(){ _.defer(function(){
var vie = window.vie = new VIE();
vie.use(new vie.StanbolService({
url : "http://dev.iks-project.eu:8081",
proxyDisabled: true,
entityhub: {site: 'dbpedia'}
}));
$('.search')
.vieAutocomplete({
vie: vie,
select: function(e, ui){
log(ui);
},
urifield: jQuery("#urifield"),
// stanbolIncludeLocalSite: true,
debug: true
});
function log(msg) {
jQuery("#results").append( JSON.stringify(msg) + "<br/" + ">" );
}
})});
</script>
<body xmlns:sioc = "http://rdfs.org/sioc/ns#"
xmlns:schema = "http://www.schema.org/"
xmlns:enhancer = "http://fise.iks-project.eu/ontology/"
xmlns:dc = "http://purl.org/dc/terms/">
<a href="https://github.com/szabyg/VIE.autocomplete"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
<h2>VIE autocomplete widget</h2>
<p>
VIE autocomplete uses the VIE.find service method to make autocomplete suggestions.<br/>
The VIE.find method can query different backend or frontend data sources.<br/>
This demo goes to the default Apache Stanbol backend.
</p>
<h3>Demo</h3>
<span style="background: fff;">
<label for="search">Search:</label> <input id="search" size="60" class="search"/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<label for="urifield">Selected URI:</label> <input id="urifield" size="60"/>
</span>
<div>
<div>
<h4>selected:</h4>
<div id="results"></div>
</div>
</div>
<h3>Usage</h3>
<pre>
var vie = new VIE();
vie.use(new vie.StanbolService({
url : "http://dev.iks-project.eu:8081",
proxyDisabled: true
}));
$('.search')
.vieAutocomplete({
vie: vie,
select: function(e, ui){
console.log(ui);
}
});
</pre>
<a href="docs/index.html">Documented source code</a>
</body>
</html>