From c3ac8874b36d36ea35aecf63f71956de8288b499 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 20 Dec 2017 09:22:46 +0100 Subject: [PATCH] Fix activation of contextmenu entries for tag management --- plugins/kolab_tags/kolab_tags.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/kolab_tags/kolab_tags.js b/plugins/kolab_tags/kolab_tags.js index 3ef2c0dd..323a5c97 100644 --- a/plugins/kolab_tags/kolab_tags.js +++ b/plugins/kolab_tags/kolab_tags.js @@ -70,6 +70,21 @@ window.rcmail && rcmail.addEventListener('init', function() { } }); } + // Set activation state for contextmenu entries related with tags management + else { + rcmail.addEventListener('contextmenu_init', function(menu) { + if (menu.menu_name == 'folderlist') { + menu.addEventListener('activate', function(p) { + if (p.command == 'manage-tags') { + return true; + } + if (p.command == 'reset-tags') { + return !!(tagsfilter.length && rcmail.message_list); + } + }); + } + }); + } // ajax response handler rcmail.addEventListener('plugin.kolab_tags', update_tags);