Merge branch 'zipdownload' of https://github.com/johndoh/roundcubemail into johndoh-zipdownload

pull/7317/head
Aleksander Machniak 5 years ago
commit 679cb1833c

@ -26,8 +26,6 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
var selected = list.get_selection().length; var selected = list.get_selection().length;
rcmail.enable_command('download', selected > 0); rcmail.enable_command('download', selected > 0);
rcmail.enable_command('download-eml', selected == 1);
rcmail.enable_command('download-mbox', 'download-maildir', selected > 1);
}); });
// hook before default download action // hook before default download action
@ -94,6 +92,11 @@ function rcmail_zipdownload(mode)
// display download options menu // display download options menu
function rcmail_zipdownload_menu(e) function rcmail_zipdownload_menu(e)
{ {
// Menu option status
var selected = rcmail.message_list.get_selection().length;
rcmail.enable_command('download-eml', selected == 1);
rcmail.enable_command('download-mbox', 'download-maildir', selected > 1);
// show (sub)menu for download selection // show (sub)menu for download selection
rcmail.command('menu-open', 'zipdownload-menu', e && e.target ? e.target : rcmail.env.download_link, e); rcmail.command('menu-open', 'zipdownload-menu', e && e.target ? e.target : rcmail.env.download_link, e);

Loading…
Cancel
Save