summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-08 13:21:41 +0000
committeralecpl <alec@alec.pl>2010-11-08 13:21:41 +0000
commitf94639f7bfd0bd3fdbe074dc4fb290a8265f6373 (patch)
treeaf3f21f5aec017aa23ffa25e2c55ae401aaee639 /program/js/app.js
parent3bb9b5212bc9f486ee4d3d8d2d07593cffeb11ae (diff)
- Improved r4191 bugfix
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 069c59fbd..b57c4470f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1802,30 +1802,28 @@ function rcube_webmail()
if (!id)
return;
- var add_url = '',
- target = window,
- action = preview ? 'preview': 'show';
+ var target = window,
+ action = preview ? 'preview': 'show',
+ url = '&_action='+action+'&_uid='+id+'&_mbox='+urlencode(this.env.mailbox);
if (preview && this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
target = window.frames[this.env.contentframe];
- add_url = '&_framed=1';
+ url += '&_framed=1';
}
if (safe)
- add_url = '&_safe=1';
+ url += '&_safe=1';
// also send search request to get the right messages
if (this.env.search_request)
- add_url += '&_search='+this.env.search_request;
+ url += '&_search='+this.env.search_request;
- var url = '&_action='+action+'&_uid='+id+'&_mbox='+urlencode(this.env.mailbox)+add_url;
if (action == 'preview' && String(target.location.href).indexOf(url) >= 0)
this.show_contentframe(true);
else {
- if (!this.env.frame_lock)
- this.env.frame_lock = this.set_busy(true, 'loading');
- if (preview)
- url += '&_unlock='+this.env.frame_lock;
+ if (!this.env.frame_lock) {
+ (parent.rcmail ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading');
+ }
target.location.href = this.env.comm_path+url;
// mark as read and change mbox unread counter