blob: 054b96992b47fe8fead292748d8896dc1215c8ad [file] [log] [blame]
Nils Diewaldd0770492014-12-19 03:55:00 +00001<!DOCTYPE html>
2<html>
3 <head>
4 <title>Virtual Collection demo</title>
5 <script src="../src/vc.js"></script>
6 <style>
7div {
8 padding: 2pt;
9 padding-left: 10pt;
10 border: 2px solid black;
11}
12
13span {
14 margin: 2pt;
15 padding: 2pt;
16 color: white;
17 background-color: green;
18}
19
20div.undefined {
21 background-color: red;
22 height: 12pt;
23 min-width: 100px;
24}
25 </style>
26 </head>
27 <body>
28 <div id="vc"></div>
29 <script>
30 var json = {
31 "@type":"korap:docGroup",
32 "operation":"operation:or",
33 "operands":[
34 {
35 "@type":"korap:docGroup",
36 "operation":"operation:and",
37 "operands":[
38 {
39 "@type":"korap:doc",
40 "key":"Titel",
41 "value":"Baum",
42 "match":"match:eq"
43 },
44 {
45 "@type":"korap:doc",
46 "key":"Veröffentlichungsort",
47 "value":"hihi",
48 "match":"match:eq"
49 }
50 ]
51 },
52 {
53 "@type":"korap:doc",
54 "key":"Untertitel",
55 "value":"huhu",
56 "match":"match:eq"
57 }
58 ]
59 };
60
61// var vc = KorAP.VirtualCollection.render();
62 var vc = KorAP.VirtualCollection.render(json);
63 console.log(vc);
64 document.getElementById('vc').appendChild(vc.element());
65 </script>
66 </body>
67</html>