summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/js/app.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 1cc184dea..1bf35e412 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3981,18 +3981,16 @@ function rcube_webmail()
return;
}
- var i, rx,
- id = obj.options[obj.selectedIndex].value,
+ var id = obj.options[obj.selectedIndex].value,
sig = this.env.identity,
delim = this.env.recipients_separator,
- rx_delim = RegExp.escape(delim),
- headers = ['replyto', 'bcc'];
+ rx_delim = RegExp.escape(delim);
// update reply-to/bcc fields with addresses defined in identities
- for (i in headers) {
- var key = headers[i],
- old_val = sig && this.env.identities[sig] ? this.env.identities[sig][key] : '',
- new_val = id && this.env.identities[id] ? this.env.identities[id][key] : '',
+ $.each(['replyto', 'bcc'], function() {
+ var rx, key = this,
+ old_val = sig && ref.env.identities[sig] ? ref.env.identities[sig][key] : '',
+ new_val = id && ref.env.identities[id] ? ref.env.identities[id][key] : '',
input = $('[name="_'+key+'"]'), input_val = input.val();
// remove old address(es)
@@ -4019,7 +4017,7 @@ function rcube_webmail()
if (old_val || new_val)
input.val(input_val).change();
- }
+ });
// enable manual signature insert
if (this.env.signatures && this.env.signatures[id]) {