Minor changes in the vc api
diff --git a/dev/demo/alldemo.js b/dev/demo/alldemo.js
index 29dd405..547a09f 100644
--- a/dev/demo/alldemo.js
+++ b/dev/demo/alldemo.js
@@ -224,13 +224,13 @@
"operands":[
{
"@type":"koral:doc",
- "key":"Titel",
+ "key":"title",
"value":"Der Birnbaum",
"match":"match:eq"
},
{
"@type":"koral:doc",
- "key":"Veröffentlichungsort",
+ "key":"pubPlace",
"value":"Mannheim",
"match":"match:eq"
},
@@ -240,13 +240,13 @@
"operands":[
{
"@type":"koral:doc",
- "key":"Untertitel",
+ "key":"subTitle",
"value":"Aufzucht und Pflege",
"match":"match:eq"
},
{
"@type":"koral:doc",
- "key":"Untertitel",
+ "key":"subTitle",
"value":"Gedichte",
"match":"match:eq",
"rewrites" : [
@@ -263,7 +263,7 @@
},
{
"@type":"koral:doc",
- "key":"Veröffentlichungsdatum",
+ "key":"pubDate",
"type":"type:date",
"value":"2015-03-05",
"match":"match:geq"
@@ -428,6 +428,9 @@
KorAP.hintArray = hintArray;
+ // Set current virtual collection
+ KorAP.currentVC = vcExample;
+
// Parse and show the table
// Override getMatchInfo API call
KorAP.API.getMatchInfo = function(match, callObj, cb) {
diff --git a/dev/demo/vcdemo.js b/dev/demo/vcdemo.js
index ff93f27..e92b324 100644
--- a/dev/demo/vcdemo.js
+++ b/dev/demo/vcdemo.js
@@ -77,12 +77,12 @@
// Create a new virtual collection by passing a based json object and
// field menu information
- var vc = vcClass.render(json, [
+ var vc = vcClass.create([
['title', 'string'],
['subTitle', 'string'],
['pubDate', 'date'],
['author', 'string']
- ]);
+ ]).fromJson(json);
document.getElementById('vc').appendChild(vc.element());
// show the current JSON serialization