From a8f3d31bd41def7a334b5a2f4f260ec77ce76d2c Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Thu, 16 Oct 2014 17:08:55 +0200 Subject: Making sure only the tags are shown in the mail when you update the mail tags. Also, disabling the tags feature toggles --- web-ui/app/js/mixins/with_mail_tagging.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'web-ui/app/js/mixins') diff --git a/web-ui/app/js/mixins/with_mail_tagging.js b/web-ui/app/js/mixins/with_mail_tagging.js index 482cd0aa..c3647443 100644 --- a/web-ui/app/js/mixins/with_mail_tagging.js +++ b/web-ui/app/js/mixins/with_mail_tagging.js @@ -27,10 +27,6 @@ define( }; this.attachTagCompletion = function(mail) { - if(!features.isEnabled('tags')) { - return; - } - this.tagFilter = function (parsedResult) { var filtered = _.filter(parsedResult, function (tag) {return ! _.contains(mail.tags, tag.name); }); return _.map(filtered, function(tag) { return {value: Handlebars.Utils.escapeExpression(tag.name)}; }); @@ -56,16 +52,14 @@ define( }); }; - this.createNewTag = function() { - if(features.isEnabled('createNewTag')) { - var tagsCopy = this.attr.mail.tags.slice(); - tagsCopy.push(this.select('newTagInput').val()); - this.tagCompleter.clear(); - this.tagCompleter.clearPrefetchCache(); - this.tagCompleter.clearRemoteCache(); - this.updateTags(this.attr.mail, _.uniq(tagsCopy)); - this.trigger(document, events.dispatchers.tags.refreshTagList); - } + this.createNewTag = function () { + var tagsCopy = this.attr.mail.tags.slice(); + tagsCopy.push(this.select('newTagInput').val()); + this.tagCompleter.clear(); + this.tagCompleter.clearPrefetchCache(); + this.tagCompleter.clearRemoteCache(); + this.updateTags(this.attr.mail, _.uniq(tagsCopy)); + this.trigger(document, events.dispatchers.tags.refreshTagList, { skipMailListRefresh: true }); }; this.after('displayMail', function () { -- cgit v1.2.3