summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_view/ui/mail_view.js
diff options
context:
space:
mode:
authorFelix Hammerl <fhammerl@thoughtworks.com>2016-03-03 12:25:25 +0100
committerFelix Hammerl <fhammerl@thoughtworks.com>2016-03-09 15:36:10 +0100
commit23b175742f20d96e5b5d3d9cfcc0ed7067197f92 (patch)
tree224e5d536b9a6c4859671b2cff57f1f60236ef9f /web-ui/app/js/mail_view/ui/mail_view.js
parentd2d6fb98b909021efa435411ec95f554769fa9c9 (diff)
Issue #617: Highlight search terms by altering mail content
Diffstat (limited to 'web-ui/app/js/mail_view/ui/mail_view.js')
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js
index fbbba409..d952fed7 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -257,9 +257,17 @@ define(
this.trigger(events.mail.want, {mail: this.attr.ident, caller: this});
};
+ this.highlightMailContent = function (event, data) {
+ // we can't directly manipulate the iFrame to highlight the content
+ // so we need to take an indirection where we directly manipulate
+ // the mail content to accomodate the highlighting
+ this.trigger(document, events.mail.highlightMailContent, data);
+ };
+
this.after('initialize', function () {
- this.on(this, events.mail.here, this.displayMail);
this.on(this, events.mail.notFound, this.openNoMessageSelectedPane);
+ this.on(this, events.mail.here, this.highlightMailContent);
+ this.on(document, events.mail.display, this.displayMail);
this.on(document, events.dispatchers.rightPane.clear, this.teardown);
this.on(document, events.mail.tags.updated, this.tagsUpdated);
this.on(document, events.mail.deleted, this.mailDeleted);