From f8e751d1cfd6eb6be18edcb97498981df8090d5e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 30 Jul 2017 10:18:23 +0000 Subject: [PATCH] Disable tagging functionality in contextmenu for Roundcube < 1.4 (Bifrost#T18460) --- plugins/kolab_tags/kolab_tags.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/kolab_tags/kolab_tags.js b/plugins/kolab_tags/kolab_tags.js index f189d28d..cfbb53c3 100644 --- a/plugins/kolab_tags/kolab_tags.js +++ b/plugins/kolab_tags/kolab_tags.js @@ -60,6 +60,17 @@ window.rcmail && rcmail.addEventListener('init', function() { rcmail.register_command('tag-remove', function(props, obj, event) { tag_remove(props, obj, event); }); rcmail.register_command('tag-remove-all', function() { tag_remove('*'); }); + // Disable tag functionality in contextmenu in Roundcube < 1.4 + if (!rcmail.env.rcversion) { + rcmail.addEventListener('menu-open', function(e) { + if (e.name == 'rcm_markmessagemenu') { + $.each(['add', 'remove', 'remove-all'], function() { + $('a.cmd_tag-' + this).parent().hide(); + }); + } + }); + } + // ajax response handler rcmail.addEventListener('plugin.kolab_tags', update_tags);