summaryrefslogtreecommitdiff
path: root/web-ui/app/js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js')
-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/generic_mail_item.js6
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/mail_item.js4
-rw-r--r--web-ui/app/js/mail_list/ui/mail_items/sent_item.js6
-rw-r--r--web-ui/app/js/services/delete_service.js1
5 files changed, 8 insertions, 15 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 a2da917f..fda6c3f8 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
@@ -29,12 +29,8 @@ define(
return defineComponent(draftItem, mailItem);
function draftItem() {
- function isOpeningOnANewTab(ev) {
- return ev.metaKey || ev.ctrlKey || ev.which === 2;
- }
-
this.triggerOpenMail = function (ev) {
- if (isOpeningOnANewTab(ev)) {
+ if (this.isOpeningOnANewTab(ev)) {
return;
}
this.trigger(document, events.dispatchers.rightPane.openDraft, { ident: this.attr.ident });
diff --git a/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js
index 3931ffd8..b700eeeb 100644
--- a/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js
+++ b/web-ui/app/js/mail_list/ui/mail_items/generic_mail_item.js
@@ -33,12 +33,8 @@ define(
READ: 'read'
};
- function isOpeningOnANewTab(ev) {
- return ev.metaKey || ev.ctrlKey || ev.which === 2;
- }
-
this.triggerOpenMail = function (ev) {
- if (isOpeningOnANewTab(ev)) {
+ if (this.isOpeningOnANewTab(ev)) {
updateMailStatusToRead.call(this);
return;
}
diff --git a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js
index f7ae2f0c..bcd0444b 100644
--- a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js
+++ b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js
@@ -34,6 +34,10 @@ define(
return viewHelper.getFormattedDate(new Date(date));
};
+ this.isOpeningOnANewTab = function (ev) {
+ return ev.metaKey || ev.ctrlKey || ev.which === 2;
+ };
+
this.doSelect = function () {
this.$node.addClass('selected');
};
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 3e2e2723..3cfa25bd 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
@@ -28,12 +28,8 @@ define(
return defineComponent(sentItem, mailItem);
function sentItem() {
- function isOpeningOnANewTab(ev) {
- return ev.metaKey || ev.ctrlKey || ev.which === 2;
- }
-
this.triggerOpenMail = function (ev) {
- if (isOpeningOnANewTab(ev)) {
+ if (this.isOpeningOnANewTab(ev)) {
return;
}
this.trigger(document, events.ui.mail.open, { ident: this.attr.ident });
diff --git a/web-ui/app/js/services/delete_service.js b/web-ui/app/js/services/delete_service.js
index 470ab145..5cf86d63 100644
--- a/web-ui/app/js/services/delete_service.js
+++ b/web-ui/app/js/services/delete_service.js
@@ -47,6 +47,7 @@ define(['flight/lib/component', 'page/events', 'views/i18n'], function (defineCo
mails: emails,
successMessage: this.successDeleteManyMessageFor(firstEmail)
});
+
};
this.after('initialize', function () {