From 0826b2a896b3898c1f7f442ba01734ed04387f87 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 30 Apr 2013 09:17:06 -0400
Subject: [PATCH] Small code simplification
---
program/js/app.js | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index 474a1b8..87f2067 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -936,16 +936,13 @@
url._to = props;
}
else {
- // use contact_id passed as command parameter
- var n, len, a_cids = [];
+ var a_cids = [];
+ // use contact id passed as command parameter
if (props)
a_cids.push(props);
// get selected contacts
- else if (this.contact_list) {
- var selection = this.contact_list.get_selection();
- for (n=0, len=selection.length; n<len; n++)
- a_cids.push(selection[n]);
- }
+ else if (this.contact_list)
+ a_cids = this.contact_list.get_selection();
if (a_cids.length)
this.http_post('mailto', { _cid: a_cids.join(','), _source: this.env.source }, true);
--
Gitblit v1.9.1