From bd624bdd14ef63186064b2e39fc422f328b24b26 Mon Sep 17 00:00:00 2001 From: Patrick Maia Date: Thu, 7 Aug 2014 18:01:01 -0300 Subject: disables save draft, add tag, reply-section features --- web-ui/app/js/mail_view/ui/mail_view.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'web-ui/app/js/mail_view/ui/mail_view.js') 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) { -- cgit v1.2.3