From 57770a2b6a0777656c86c7d464b5e413f904ac0e Mon Sep 17 00:00:00 2001 From: Alexandre Pretto Nunes Date: Thu, 9 Apr 2015 19:32:25 -0300 Subject: Fix mail opening and add some tests --- web-ui/app/js/mail_list/ui/mail_items/draft_item.js | 6 +++--- web-ui/app/js/mail_list/ui/mail_items/sent_item.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'web-ui/app') diff --git a/web-ui/app/js/mail_list/ui/mail_items/draft_item.js b/web-ui/app/js/mail_list/ui/mail_items/draft_item.js index 4c4b2524..57fbafd5 100644 --- a/web-ui/app/js/mail_list/ui/mail_items/draft_item.js +++ b/web-ui/app/js/mail_list/ui/mail_items/draft_item.js @@ -33,9 +33,9 @@ define( if (this.isOpeningOnANewTab(ev)) { return; } - this.trigger(document, events.dispatchers.rightPane.openDraft, { ident: this.attr.ident }); - this.trigger(document, events.ui.mail.updateSelected, { ident: this.attr.ident }); - this.trigger(document, events.router.pushState, { mailIdent: this.attr.ident }); + this.trigger(document, events.dispatchers.rightPane.openDraft, { ident: this.attr.mail.ident }); + this.trigger(document, events.ui.mail.updateSelected, { ident: this.attr.mail.ident }); + this.trigger(document, events.router.pushState, { mailIdent: this.attr.mail.ident }); ev.preventDefault(); // don't let the hashchange trigger a popstate }; diff --git a/web-ui/app/js/mail_list/ui/mail_items/sent_item.js b/web-ui/app/js/mail_list/ui/mail_items/sent_item.js index 6ab990dd..9e511068 100644 --- a/web-ui/app/js/mail_list/ui/mail_items/sent_item.js +++ b/web-ui/app/js/mail_list/ui/mail_items/sent_item.js @@ -32,16 +32,16 @@ define( if (this.isOpeningOnANewTab(ev)) { return; } - this.trigger(document, events.ui.mail.open, { ident: this.attr.ident }); - this.trigger(document, events.router.pushState, { mailIdent: this.attr.ident }); + this.trigger(document, events.ui.mail.open, { ident: this.attr.mail.ident }); + this.trigger(document, events.router.pushState, { mailIdent: this.attr.mail.ident }); ev.preventDefault(); // don't let the hashchange trigger a popstate }; this.openMail = function (ev, data) { - if (data.ident !== this.attr.ident) { + if (data.ident !== this.attr.mail.ident) { return; } - this.trigger(document, events.ui.mail.updateSelected, { ident: this.attr.ident }); + this.trigger(document, events.ui.mail.updateSelected, { ident: this.attr.mail.ident }); }; this.after('initialize', function () { -- cgit v1.2.3