summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
authorAlexandre Pretto Nunes <anunes@thoughtworks.com>2015-04-09 19:32:25 -0300
committerrafael lisboa <rafaelzlisboa@gmail.com>2015-04-14 15:28:13 -0300
commit57770a2b6a0777656c86c7d464b5e413f904ac0e (patch)
tree468dba0c78e8451bdeaa8f47d375b0307f3a8140 /web-ui/app
parentce9e9aa5a21182a05985fc1e0fc9d543738b5fa0 (diff)
Fix mail opening and add some tests
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/draft_item.js6
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/sent_item.js8
2 files changed, 7 insertions, 7 deletions
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 () {