From fe8ff85d7eabb370d85fc31ca55b9a6c6f86a356 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 15 Oct 2015 02:58:06 -0400 Subject: [PATCH] Move skin-specific code for compose encryption button to the skin --- program/js/app.js | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index e346356..f05677a 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2514,22 +2514,23 @@ // removes messages that doesn't exists from list selection array this.update_selection = function() { - var selected = this.message_list.selection, - rows = this.message_list.rows, + var list = this.message_list, + selected = list.selection, + rows = list.rows, i, selection = []; for (i in selected) if (rows[selected[i]]) selection.push(selected[i]); - this.message_list.selection = selection; + list.selection = selection; // reset preview frame, if currently previewed message is not selected (has been removed) try { var win = this.get_frame_window(this.env.contentframe), id = win.rcmail.env.uid; - if (id && $.inArray(id, selection) < 0) + if (id && !list.in_selection(id)) this.show_contentframe(false); } catch (e) {}; @@ -3434,8 +3435,6 @@ } 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; -- Gitblit v1.9.1