From fef904c6b16a83ee9aa6dfb7eff35d2934b07d19 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 27 Sep 2014 00:13:46 +0200 Subject: Enable/disable siganture commands before exiting the function in new compose window (#1490074) --- program/js/app.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'program') diff --git a/program/js/app.js b/program/js/app.js index e6b1d84a1..323fd258c 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3866,6 +3866,16 @@ function rcube_webmail() if (!show_sig) show_sig = this.env.show_sig; + var id = obj.options[obj.selectedIndex].value; + + // enable manual signature insert + if (this.env.signatures && this.env.signatures[id]) { + this.enable_command('insert-sig', true); + this.env.compose_commands.push('insert-sig'); + } + else + this.enable_command('insert-sig', false); + // first function execution if (!this.env.identities_initialized) { this.env.identities_initialized = true; @@ -3876,7 +3886,6 @@ function rcube_webmail() } var cursor_pos, p = -1, - id = obj.options[obj.selectedIndex].value, input_message = $("[name='_message']"), message = input_message.val(), is_html = ($("input[name='_is_html']").val() == '1'), @@ -3917,14 +3926,6 @@ function rcube_webmail() input.val(input_val).change(); }); - // enable manual signature insert - if (this.env.signatures && this.env.signatures[id]) { - this.enable_command('insert-sig', true); - this.env.compose_commands.push('insert-sig'); - } - else - this.enable_command('insert-sig', false); - if (!is_html) { // remove the 'old' signature if (show_sig && sig && this.env.signatures && this.env.signatures[sig]) { -- cgit v1.2.3