summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-04-22 13:06:09 +0000
committeralecpl <alec@alec.pl>2010-04-22 13:06:09 +0000
commit356a797b291fc7fd2f291791f48dbc1c093d1abc (patch)
tree426ce793e1f862f37d2d62815cbe1717c8a8d6b8
parent566b142aaa7f03a8e2bbc96da9e60d7436bc76f5 (diff)
- fix the contact creation when group is not selected
-rw-r--r--program/js/app.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js
index c95e093e1..e822e10cb 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3431,8 +3431,8 @@ function rcube_webmail()
// load contact record
this.load_contact = function(cid, action, framed)
{
- var add_url = '';
- var target = window;
+ var add_url = '', target = window;
+
if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
add_url = '&_framed=1';
target = window.frames[this.env.contentframe];
@@ -3442,8 +3442,11 @@ function rcube_webmail()
return false;
if (action && (cid || action=='add') && !this.drag_active) {
+ if (this.env.group)
+ add_url += '&_gid='+urlencode(this.env.group);
+
this.set_busy(true);
- target.location.href = this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_gid='+urlencode(this.env.group)+'&_cid='+urlencode(cid) + add_url;
+ target.location.href = this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_cid='+urlencode(cid) + add_url;
}
return true;
};