From 390959bb323679f7611ee1585d8e1f55007c7773 Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 22 Apr 2012 17:24:06 +0000 Subject: [PATCH] - Small code improvements --- program/js/app.js | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 038a3c7fb..9521fb964 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3266,20 +3266,11 @@ function rcube_webmail() this.compose_field_hash = function(save) { // check input fields - var ed, str = '', - value_to = $("[name='_to']").val(), - value_cc = $("[name='_cc']").val(), - value_bcc = $("[name='_bcc']").val(), - value_subject = $("[name='_subject']").val(); - - if (value_to) - str += value_to+':'; - if (value_cc) - str += value_cc+':'; - if (value_bcc) - str += value_bcc+':'; - if (value_subject) - str += value_subject+':'; + var ed, i, val, str = '', hash_fields = ['to', 'cc', 'bcc', 'subject']; + + for (i=0; i