From: Michael M Slusarz Date: Tue, 6 Apr 2010 17:19:03 +0000 (-0600) Subject: Bug #8949: Fix contacts popup javascript X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bf894b8fb29cf29a7138f12fcb72a27ab8003f76;p=horde.git Bug #8949: Fix contacts popup javascript --- diff --git a/imp/js/contacts.js b/imp/js/contacts.js index 5c7f8474a..bf1b68e29 100644 --- a/imp/js/contacts.js +++ b/imp/js/contacts.js @@ -77,16 +77,14 @@ var ImpContacts = { $('selected_addresses').childElements().each(function(s) { var address = s.value, f, field = null, pos, v; pos = address.indexOf(':'); + f = address.substring(0, pos); address = address.substring(pos + 2, address.length) if (this.formfield) { field = parent.opener.document[this.formname][this.formfield]; - } else { - f = address.substring(0, pos); - if (f == 'to' || - (!this.to_only && (f == 'cc' || f == 'bcc'))) { - field = parent.opener.document[this.formname][f]; - } + } else if (f == 'to' || + (!this.to_only && (f == 'cc' || f == 'bcc'))) { + field = parent.opener.document[this.formname][f]; } if (!field) {