From 2213efc850db4e3c83727f2aaff1a57a7b391708 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 12 Oct 2019 10:44:45 +0200 Subject: [PATCH] Archive: Fix missing Archive icon in folder selector popup in Elastic --- CHANGELOG | 1 + plugins/archive/archive.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 86dc1b9b7..47464ad27 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ CHANGELOG Roundcube Webmail - Elastic: Fix initial focus on recipients input in mail compose screen - Redis: Improve error handling and phpredis 5.X support (#6888) - Archive: Fix bug where next email was not displayed after Archive button use (#6965) +- Archive: Fix missing Archive icon in folder selector popup in Elastic - Fix bug where cache keys were not case-sensitive on MySQL/MSSQL (#6942) - Fix so an error is loogged when encryption fails (#6948) diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js index 12f519a4c..0975dff07 100644 --- a/plugins/archive/archive.js +++ b/plugins/archive/archive.js @@ -66,16 +66,16 @@ if (window.rcmail) { else li = rcmail.get_folder_li(rcmail.env.archive_folder, '', true); - if (li) { + if (li) $(li).addClass('archive'); - // in folder selector popup - rcmail.addEventListener('menu-open', function(p) { - if (p.name == 'folder-selector') { - $('a[rel="' + $('a', li).attr('rel') + '"]', p.obj).parent().addClass('archive'); - } - }); - } + // in folder selector popup + rcmail.addEventListener('menu-open', function(p) { + if (p.name == 'folder-selector') { + var search = rcmail.env.archive_folder; + $('a', p.obj).filter(function() { return $(this).data('id') == search; }).parent().addClass('archive'); + } + }); } }); }