diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-12-18 09:43:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 09:43:54 -0500 |
commit | bf349050123eaaa7b58f82b7e3a84e2857fdea8c (patch) | |
tree | acebf6669a642d4c6f0e0f8bf5fc07ff9e194a4f /ext/mixed/js/display-generator.js | |
parent | c3e772fadc8d0cba975284af774fc2266de44723 (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.js | 7 |
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; } |