summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_view
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/mail_view')
-rw-r--r--web-ui/app/js/mail_view/data/mail_sender.js9
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js21
-rw-r--r--web-ui/app/js/mail_view/ui/reply_section.js5
3 files changed, 21 insertions, 14 deletions
diff --git a/web-ui/app/js/mail_view/data/mail_sender.js b/web-ui/app/js/mail_view/data/mail_sender.js
index 7440f5a7..0dba1a02 100644
--- a/web-ui/app/js/mail_view/data/mail_sender.js
+++ b/web-ui/app/js/mail_view/data/mail_sender.js
@@ -2,9 +2,10 @@ define(
[
'flight/lib/component',
'mail_view/data/mail_builder',
- 'page/events'
+ 'page/events',
+ 'features'
],
- function (defineComponent, mailBuilder, events) {
+ function (defineComponent, mailBuilder, events, features) {
'use strict';
return defineComponent(mailSender);
@@ -67,7 +68,9 @@ define(
this.after('initialize', function () {
this.on(events.mail.send, this.sendMail);
- this.on(events.mail.saveDraft, this.saveDraft);
+ if(features.isEnabled('saveDraft')) {
+ this.on(events.mail.saveDraft, this.saveDraft);
+ }
this.on(document, events.mail.save, this.saveMailWithCallback);
});
}
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 1e27c879..9114fa2e 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -12,10 +12,11 @@ define(
'helpers/view_helper',
'mixins/with_hide_and_show',
'page/events',
- 'views/i18n'
+ 'views/i18n',
+ 'features'
],
- function (defineComponent, templates, mailActions, viewHelpers, withHideAndShow, events, i18n) {
+ function (defineComponent, templates, mailActions, viewHelpers, withHideAndShow, events, i18n, features) {
return defineComponent(mailView, mailActions, withHideAndShow);
@@ -148,13 +149,15 @@ define(
};
this.createNewTag = function() {
- var tagsCopy = this.attr.mail.tags.slice();
- tagsCopy.push(this.select('newTagInput').val());
- this.attr.tagCompleter.clear();
- this.attr.tagCompleter.clearPrefetchCache();
- this.attr.tagCompleter.clearRemoteCache();
- this.trigger(document, events.mail.tags.update, { ident: this.attr.mail.ident, tags: _.uniq(tagsCopy)});
- this.trigger(document, events.dispatchers.tags.refreshTagList);
+ if(features.isEnabled('createNewTag')) {
+ var tagsCopy = this.attr.mail.tags.slice();
+ tagsCopy.push(this.select('newTagInput').val());
+ this.attr.tagCompleter.clear();
+ this.attr.tagCompleter.clearPrefetchCache();
+ this.attr.tagCompleter.clearRemoteCache();
+ this.trigger(document, events.mail.tags.update, { ident: this.attr.mail.ident, tags: _.uniq(tagsCopy)});
+ this.trigger(document, events.dispatchers.tags.refreshTagList);
+ }
};
this.handleKeyDown = function(event) {
diff --git a/web-ui/app/js/mail_view/ui/reply_section.js b/web-ui/app/js/mail_view/ui/reply_section.js
index 866a255a..80781842 100644
--- a/web-ui/app/js/mail_view/ui/reply_section.js
+++ b/web-ui/app/js/mail_view/ui/reply_section.js
@@ -5,13 +5,14 @@ define(
'mail_view/ui/reply_box',
'mail_view/ui/forward_box',
'mixins/with_hide_and_show',
+ 'mixins/with_feature_toggle',
'page/events'
],
- function (defineComponent, templates, ReplyBox, ForwardBox, withHideAndShow, events) {
+ function (defineComponent, templates, ReplyBox, ForwardBox, withHideAndShow, withFeatureToggle, events) {
'use strict';
- return defineComponent(replySection, withHideAndShow);
+ return defineComponent(replySection, withHideAndShow, withFeatureToggle('replySection'));
function replySection() {
this.defaultAttrs({