Use requirejs for clientside scripting
diff --git a/dev/demo/vc.html b/dev/demo/vc.html
index 353b309..9eb7648 100644
--- a/dev/demo/vc.html
+++ b/dev/demo/vc.html
@@ -3,8 +3,7 @@
<head>
<title>Virtual Collection demo</title>
<meta charset="utf-8" />
- <script src="../js/src/menu.js"></script>
- <script src="../js/src/vc.js"></script>
+ <script data-main="vcdemo.js" src="../js/lib/require.js" async="async"></script>
<link type="text/css" rel="stylesheet" href="../css/kalamar.css" />
<style type="text/css" rel="stylesheet">
@@ -28,79 +27,6 @@
<div id="vc"></div>
<div id="menu" class="vc"></div>
- <script>
- var json = {
- "@type":"koral:docGroup",
- "operation":"operation:or",
- "operands":[
- {
- "@type":"koral:docGroup",
- "operation":"operation:and",
- "operands":[
- {
- "@type":"koral:doc",
- "key":"Titel",
- "value":"Der Birnbaum",
- "match":"match:eq"
- },
- {
- "@type":"koral:doc",
- "key":"Veröffentlichungsort",
- "value":"Mannheim",
- "match":"match:eq"
- },
- {
- "@type":"koral:docGroup",
- "operation":"operation:or",
- "operands":[
- {
- "@type":"koral:doc",
- "key":"Untertitel",
- "value":"Aufzucht und Pflege",
- "match":"match:eq"
- },
- {
- "@type":"koral:doc",
- "key":"Untertitel",
- "value":"Gedichte",
- "match":"match:eq",
- "rewrites" : [
- {
- "@type": "koral:rewrite",
- "src" : "policy",
- "operation" : "operation:injection",
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "@type":"koral:doc",
- "key":"Veröffentlichungsdatum",
- "type":"type:date",
- "value":"2015-03-05",
- "match":"match:geq"
- }
- ]
- };
- KorAP.Locale.AND = 'und';
- KorAP.Locale.OR = 'oder';
-
- var vc = KorAP.VirtualCollection.render(json);
- document.getElementById('vc').appendChild(vc.element());
-
- function showJSON() {
- document.getElementById("json").innerHTML = JSON.stringify(vc.root().toJson());
- };
-
- function showQuery() {
- document.getElementById("query").innerHTML = vc.root().toQuery();
- };
-
- </script>
-
<hr />
<p><a onclick="showJSON()" style="cursor:pointer">show JSON!</a></p>