Fix email expand/collapse not working

The click event was scoped to the wrong element.
This commit is contained in:
Chris Hill-Scott
2016-04-12 16:21:41 +01:00
parent 30e9b76c6d
commit cffd941742
2 changed files with 3 additions and 6 deletions

View File

@@ -11,12 +11,9 @@
`)
.addClass('collapsed');
this.$toggle = this.$component.find('.toggle');
this.$toggle
this.$toggle = this.$component.find('.toggle')
.on(
"click",
".toggle",
this.change
)
.on("keydown", this.filterKeyPresses([32, 13], this.change));
@@ -34,7 +31,7 @@
this.change = () => this.toggleCollapsed() && this.$toggle.remove();
this.toggleCollapsed = () => this.$component.toggleClass('collapsed');
this.toggleCollapsed = () => this.$component.removeClass('collapsed');
};

View File

@@ -32,7 +32,7 @@
</table>
{% endif %}
<div class="email-message-body" data-module="expand-collapse">
<div class="email-message-body-wrapper collapsed">
<div class="email-message-body-wrapper">
{{ body|nl2br }}
</div>
</div>