Disable corpusByMatch via configuration
Change-Id: Ibd99863dbee3d817ce442745f1456a51fc3718f3
diff --git a/dev/js/src/match/corpusByMatch.js b/dev/js/src/match/corpusByMatch.js
index a9bcf58..a405206 100644
--- a/dev/js/src/match/corpusByMatch.js
+++ b/dev/js/src/match/corpusByMatch.js
@@ -26,6 +26,17 @@
// Remember the meta table
this._meta = meta;
+ // CorpusByMatch can be disabled per configuration.
+ // This is necessary, as the feature won't work with
+ // indices created before Krill V0.57.
+ // This is an undocumented feature and will be
+ // removed in future versions.
+ // This will also require a change in matchinfo.scss
+ if (KorAP.Conf && KorAP.Conf["CorpusByMatchDisabled"]) {
+ this._meta.classList.add("cbm-disabled");
+ return this;
+ };
+
this._meta.addEventListener(
"click", this.clickOnMeta.bind(this), false
);
diff --git a/dev/scss/main/matchinfo.scss b/dev/scss/main/matchinfo.scss
index 7268d33..e0fe6f9 100644
--- a/dev/scss/main/matchinfo.scss
+++ b/dev/scss/main/matchinfo.scss
@@ -230,7 +230,6 @@
}
> dd[data-type="type:store"] {
background-color: $middle-orange;
-
cursor: default;
}
@@ -249,6 +248,13 @@
}
}
+// This is a temporary feature to disable
+// corpusByMatch assistant. See corpusByMatch.js
+// for reasons.
+div.metatable > dl.cbm-disabled > div > dd {
+ cursor: default !important;
+}
+
div.loading {
background-color: transparent !important;
height: 16px !important;