summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-07-21 11:26:01 +0200
committerAleksander Machniak <alec@alec.pl>2014-07-21 11:30:30 +0200
commitae502b364d08e3bd2001b22caa14f18962a738d6 (patch)
tree05fcba512c013095ba6ed3544caadb93c46d16ba /program/js/app.js
parent7515a28ee91b864426d0fe0c6b0d64099be6ae91 (diff)
Use jQuery.each instead of "for (i in Array)" (#1489988)
Conflicts: program/js/app.js
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/program/js/app.js b/program/js/app.js
index eca1fd386..54eca744d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3870,21 +3870,20 @@ function rcube_webmail()
return;
}
- var i, rx, cursor_pos, p = -1,
+ 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'),
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)
@@ -3911,7 +3910,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]) {