diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-09-27 00:07:52 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-09-27 00:07:52 +0200 |
commit | e0496fc01d779d55c88985c8865b2a9ff57445d7 (patch) | |
tree | d7ffb095b7364b18c49dfd73444f7e15dcba5f09 /program | |
parent | 7d3be1f3c8ac361b2632be2cb16ebd18fb41f3cf (diff) |
Enable/disable siganture commands before exiting the function in new compose window (#1490074)
Diffstat (limited to 'program')
-rw-r--r-- | program/js/app.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/program/js/app.js b/program/js/app.js index eb3ff679c..9dca320dd 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3965,6 +3965,19 @@ function rcube_webmail() if (!show_sig) show_sig = this.env.show_sig; + var id = obj.options[obj.selectedIndex].value, + sig = this.env.identity, + delim = this.env.recipients_separator, + rx_delim = RegExp.escape(delim); + + // 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; @@ -3974,11 +3987,6 @@ function rcube_webmail() return; } - var id = obj.options[obj.selectedIndex].value, - sig = this.env.identity, - delim = this.env.recipients_separator, - rx_delim = RegExp.escape(delim); - // update reply-to/bcc fields with addresses defined in identities $.each(['replyto', 'bcc'], function() { var rx, key = this, @@ -4012,14 +4020,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); - this.editor.change_signature(id, show_sig); this.env.identity = id; this.triggerEvent('change_identity'); |