Move skin-specific code for compose encryption button to the skin

pull/299/merge
Aleksander Machniak 9 years ago
parent f1e7bbd1bd
commit fe8ff85d7e

@ -3435,8 +3435,6 @@ function rcube_webmail()
}
else if (action == 'compose') {
this.env.compose_commands.push('compose-encrypted');
// display the toolbar button
$('#' + this.buttons['compose-encrypted'][0].id).show();
var is_html = $('input[name="_is_html"]').val() > 0;

@ -640,6 +640,10 @@ enable_command: function(p)
var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
$('a.button.replyAll').attr('title', label);
}
else if (p.command == 'compose-encrypted') {
// show the toolbar button for Mailvelope
$('#messagetoolbar > a.encrypt').show();
}
},
folder_search_init: function(container)

@ -136,6 +136,7 @@ function rcube_mail_ui()
rcmail.addEventListener('menu-open', menu_toggle)
.addEventListener('menu-close', menu_toggle)
.addEventListener('menu-save', save_listoptions)
.addEventListener('enable-command', enable_command)
.addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) })
.addEventListener('responseaftersearch', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) });
@ -146,9 +147,9 @@ function rcube_mail_ui()
}
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
rcmail.addEventListener('enable-command', enable_command)
.addEventListener('aftershow-headers', function() { layout_messageview(); })
rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); })
.addEventListener('afterhide-headers', function() { layout_messageview(); });
$('#previewheaderstoggle').click(function(e) {
toggle_preview_headers();
if (this.blur && !rcube_event.is_keyboard(e))
@ -238,7 +239,6 @@ function rcube_mail_ui()
rcmail.init_pagejumper('#pagejumper');
rcmail.addEventListener('setquota', update_quota)
.addEventListener('enable-command', enable_command)
.addEventListener('afterimport-messages', show_uploadform);
}
else if (rcmail.env.action == 'get') {
@ -601,6 +601,10 @@ function rcube_mail_ui()
else
$('a.button.reply-all').text(label).attr('title', label);
}
else if (p.command == 'compose-encrypted') {
// show the toolbar button for Mailvelope
$('a.button.encrypt').show();
}
}

Loading…
Cancel
Save