Add new criterions using menus
diff --git a/dev/demo/vc.html b/dev/demo/vc.html
index bc8c340..ca79de6 100644
--- a/dev/demo/vc.html
+++ b/dev/demo/vc.html
@@ -31,12 +31,12 @@
<hr />
- <p><a onclick="showJSON()" style="cursor:pointer">show JSON!</a></p>
+ <p><a onclick="KorAP.showJSON()" style="cursor:pointer">show JSON!</a></p>
<div id="json" class="info"></div>
<hr />
- <p><a onclick="showQuery()" style="cursor:pointer">show Query!</a></p>
+ <p><a onclick="KorAP.showQuery()" style="cursor:pointer">show Query!</a></p>
<div id="query" class="info"></div>
</body>
diff --git a/dev/demo/vcdemo.js b/dev/demo/vcdemo.js
index b96b16c..d136cef 100644
--- a/dev/demo/vcdemo.js
+++ b/dev/demo/vcdemo.js
@@ -62,20 +62,26 @@
]
};
-function showJSON() {
- document.getElementById("json").innerHTML = JSON.stringify(vc.root().toJson());
-};
-
-function showQuery() {
- document.getElementById("query").innerHTML = vc.root().toQuery();
-};
-
require(['vc','lib/domReady'], function (vcClass, domReady) {
KorAP.Locale.AND = 'und';
KorAP.Locale.OR = 'oder';
domReady(function() {
- var vc = vcClass.render(json);
+ var vc = vcClass.render(json, [
+ ['Titel', 'title', 'string'],
+ ['Untertitel', 'subTitle', 'string'],
+ ['Veröffentlichungsdatum', 'pubDate', 'date'],
+ ['Autor', 'author', 'string']
+ ]);
document.getElementById('vc').appendChild(vc.element());
+
+ KorAP.showJSON = function () {
+ document.getElementById("json").innerHTML = JSON.stringify(vc.root().toJson());
+ };
+
+ KorAP.showQuery = function () {
+ document.getElementById("query").innerHTML = vc.root().toQuery();
+ };
+
});
});