diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-06-01 15:19:14 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-06-01 15:19:14 +0200 |
commit | 15482bcadef86676864f7d498dc54f7c6a85c524 (patch) | |
tree | 3acb7b236384fca1439e0438c12cb767acb1e27f /skins/classic/functions.js | |
parent | cb3e2fe0c2e36e0f41d93015fb1b604d195f9047 (diff) |
Improved handling of Reply-To/Bcc addresses of identity in compose form (#1489016)
Diffstat (limited to 'skins/classic/functions.js')
-rw-r--r-- | skins/classic/functions.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/skins/classic/functions.js b/skins/classic/functions.js index d980627aa..1dcaa1586 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -492,14 +492,18 @@ switch_preview_pane: function(elem) /* Message composing */ init_compose_form: function() { - var f, field, fields = ['cc', 'bcc', 'replyto', 'followupto'], + var f, v, field, fields = ['cc', 'bcc', 'replyto', 'followupto'], div = document.getElementById('compose-div'), headers_div = document.getElementById('compose-headers-div'); // Show input elements with non-empty value for (f=0; f<fields.length; f++) { - if ((field = $('#_'+fields[f])) && field.length && field.val() != '') - rcmail_ui.show_header_form(fields[f]); + v = fields[f]; field = $('#_'+v); + if (field.length) { + field.on('change', {v:v}, function(e) { if (this.value) rcmail_ui.show_header_form(e.data.v); }); + if (field.val() != '') + rcmail_ui.show_header_form(v); + } } // prevent from form data loss when pressing ESC key in IE |