mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Merge pull request #436 from alphagov/only-collapse-long-emails
Only collapse email templates if they’re long
This commit is contained in:
@@ -5,7 +5,11 @@
|
|||||||
|
|
||||||
this.start = function(component) {
|
this.start = function(component) {
|
||||||
|
|
||||||
this.$component = $(component)
|
this.$component = $(component);
|
||||||
|
|
||||||
|
if (this.$component.height() < this.$component.data('max-height')) return;
|
||||||
|
|
||||||
|
this.$component
|
||||||
.append(`
|
.append(`
|
||||||
<div class='toggle' tabindex='0'>...<span class='visually-hidden'>show full email</span></div>
|
<div class='toggle' tabindex='0'>...<span class='visually-hidden'>show full email</span></div>
|
||||||
`)
|
`)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="email-message-body" data-module="expand-collapse">
|
<div class="email-message-body" data-module="expand-collapse" data-max-height="200">
|
||||||
<div class="email-message-body-wrapper">
|
<div class="email-message-body-wrapper">
|
||||||
{{ body|nl2br }}
|
{{ body|nl2br }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user