Added VC.checkRewrite() class method
Change-Id: If8a557a37a59eb850f936bcfd1a591b789f3a933
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 16a58ff..81ed093 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -330,10 +330,16 @@
show['collection'] = true;
};
};
+
vcname.onclick = vcclick;
if (show['collection']) {
vcclick.apply();
};
+
+ // Check
+ if (_checkVCrewrite(vcClass)) {
+ console.log("Rewrite!");
+ };
};
@@ -417,3 +423,10 @@
};
return vc;
};
+
+function _checkVCrewrite (vcClass) {
+ if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
+ return vcClass.checkRewrite(KorAP.koralQuery["collection"]);
+ };
+ return false;
+}