Support non-indexed values in annotation tables
Change-Id: I33f37c05c0b6a3ee741f9890db1e628187bc1e79
diff --git a/dev/js/src/match/querycreator.js b/dev/js/src/match/querycreator.js
index f4b819f..12614d3 100644
--- a/dev/js/src/match/querycreator.js
+++ b/dev/js/src/match/querycreator.js
@@ -121,7 +121,7 @@
if (target.tagName == 'TD') {
- if (target.innerText == '')
+ if (target.innerText == '' || target.classList.contains("notinindex"))
return;
if (target.classList.contains('matchkeyvalues'))
@@ -154,7 +154,7 @@
// The annotation is part of a key-value-pair
else if (target.tagName == 'SPAN' || target.tagName == 'DIV') {
- if (target.innerText == '')
+ if (target.innerText == '' || target.classList.contains("notinindex"))
return;
if (target.tagName == 'SPAN') {
diff --git a/dev/js/src/match/table.js b/dev/js/src/match/table.js
index a8ccdc6..59ebf75 100644
--- a/dev/js/src/match/table.js
+++ b/dev/js/src/match/table.js
@@ -17,7 +17,8 @@
*/
const _TermRE = new RegExp("^(?:([^\/]+?)\/)?([^:]+?):(.+?)$");
const d = document;
-
+ const notinindexSuffix = "_NOTININDEX";
+
return {
/**
@@ -149,7 +150,11 @@
};
value = RegExp.$3;
-
+
+ if (c.classList.contains("notinindex")) {
+ value += notinindexSuffix;
+ };
+
if (found[foundry + "/" + layer] === undefined) {
found[foundry + "/" + layer] = [value];
}
@@ -232,7 +237,14 @@
let e, anno;
value.forEach(function(v) {
+
e = c.addE('div');
+
+ if (v.endsWith(notinindexSuffix)) {
+ v = v.slice(0, -11);
+ e.classList.add("notinindex");
+ };
+
e.addT(v);
anno = ah.getDesc(key, v);
@@ -247,6 +259,11 @@
if (value instanceof Array)
value = value[0];
+ if (value.endsWith(notinindexSuffix)) {
+ value = value.slice(0, -11);
+ c.classList.add("notinindex");
+ };
+
c.addT(value);
// Add tooltip