summaryrefslogtreecommitdiff
path: root/ext/mixed/js/display-generator.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-18 09:43:54 -0500
committerGitHub <noreply@github.com>2020-12-18 09:43:54 -0500
commitbf349050123eaaa7b58f82b7e3a84e2857fdea8c (patch)
treeacebf6669a642d4c6f0e0f8bf5fc07ff9e194a4f /ext/mixed/js/display-generator.js
parentc3e772fadc8d0cba975284af774fc2266de44723 (diff)
Improve display tags (#1117)
* Update tag style * Add styles/HTML for notifications * Add DisplayNotification class * Add support for tag notifications * Simplify notification content
Diffstat (limited to 'ext/mixed/js/display-generator.js')
-rw-r--r--ext/mixed/js/display-generator.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js
index 1810000b..1ccd5941 100644
--- a/ext/mixed/js/display-generator.js
+++ b/ext/mixed/js/display-generator.js
@@ -117,6 +117,10 @@ class DisplayGenerator {
return node;
}
+ createEmptyFooterNotification() {
+ return this._templates.instantiate('footer-notification');
+ }
+
// Private
_createTermExpression(details) {
@@ -310,6 +314,7 @@ class DisplayGenerator {
node.title = details.notes;
inner.textContent = details.name;
+ node.dataset.details = details.notes || details.name;
node.dataset.category = details.category;
if (details.redundant) { node.dataset.redundant = 'true'; }
@@ -472,6 +477,7 @@ class DisplayGenerator {
node.dataset.readingIsSame = `${reading === expression}`;
node.dataset.dictionary = dictionary;
node.dataset.frequency = frequency;
+ node.dataset.details = `${dictionary}: ${frequency}`;
return node;
}
@@ -486,6 +492,7 @@ class DisplayGenerator {
node.dataset.character = character;
node.dataset.dictionary = dictionary;
node.dataset.frequency = frequency;
+ node.dataset.details = `${dictionary}: ${frequency}`;
return node;
}