Renamed to Kalamar and updated Virtual Collection Chooser
diff --git a/public/js/demo/vc.html b/public/js/demo/vc.html
index 9254d68..ea4a53c 100644
--- a/public/js/demo/vc.html
+++ b/public/js/demo/vc.html
@@ -3,6 +3,7 @@
<head>
<title>Virtual Collection demo</title>
<meta charset="utf-8" />
+ <script src="../src/menu.js"></script>
<script src="../src/vc.js"></script>
<link href="../../css/vc.css" rel="stylesheet" type="text/css"></link>
<style type="text/css" rel="stylesheet">
@@ -16,46 +17,47 @@
</head>
<body>
<div id="vc"></div>
+ <div id="menu"></div>
<script>
var json = {
- "@type":"korap:docGroup",
+ "@type":"koral:docGroup",
"operation":"operation:or",
"operands":[
{
- "@type":"korap:docGroup",
+ "@type":"koral:docGroup",
"operation":"operation:and",
"operands":[
{
- "@type":"korap:doc",
+ "@type":"koral:doc",
"key":"Titel",
"value":"Baum",
"match":"match:eq"
},
{
- "@type":"korap:doc",
+ "@type":"koral:doc",
"key":"Veröffentlichungsort",
"value":"hihi",
"match":"match:eq"
},
{
- "@type":"korap:docGroup",
+ "@type":"koral:docGroup",
"operation":"operation:or",
"operands":[
{
- "@type":"korap:doc",
+ "@type":"koral:doc",
"key":"Titel",
"value":"Baum",
"match":"match:eq"
},
{
- "@type":"korap:doc",
+ "@type":"koral:doc",
"key":"Veröffentlichungsort",
"value":"hihi",
"match":"match:eq",
"rewrites" : [
{
- "@type": "korap:rewrite",
+ "@type": "koral:rewrite",
"src" : "policy",
"operation" : "operation:injection",
}
@@ -66,7 +68,7 @@
]
},
{
- "@type":"korap:doc",
+ "@type":"koral:doc",
"key":"Untertitel",
"value":"huhu",
"match":"match:eq"
@@ -87,6 +89,19 @@
document.getElementById("query").innerHTML = vc.root().toQuery();
};
+ var menu = KorAP.FieldMenu.create([
+ ['Titel', 'title', 'string'],
+ ['Untertitel', 'subTitle', 'string'],
+ ['Veröffentlichungsdatum', 'pubDate', 'date']
+ ]);
+ menu.limit(4);
+ menu.show();
+
+ document.getElementById('menu').appendChild(menu.element());
+
+ menu.focus();
+
+
</script>
<hr />