- Improved r4191 bugfix

release-0.6
alecpl 14 years ago
parent 3bb9b5212b
commit f94639f7bf

@ -1802,30 +1802,28 @@ function rcube_webmail()
if (!id) if (!id)
return; return;
var add_url = '', var target = window,
target = window, action = preview ? 'preview': 'show',
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]) { if (preview && this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
target = window.frames[this.env.contentframe]; target = window.frames[this.env.contentframe];
add_url = '&_framed=1'; url += '&_framed=1';
} }
if (safe) if (safe)
add_url = '&_safe=1'; url += '&_safe=1';
// also send search request to get the right messages // also send search request to get the right messages
if (this.env.search_request) 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) if (action == 'preview' && String(target.location.href).indexOf(url) >= 0)
this.show_contentframe(true); this.show_contentframe(true);
else { else {
if (!this.env.frame_lock) if (!this.env.frame_lock) {
this.env.frame_lock = this.set_busy(true, 'loading'); (parent.rcmail ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading');
if (preview) }
url += '&_unlock='+this.env.frame_lock;
target.location.href = this.env.comm_path+url; target.location.href = this.env.comm_path+url;
// mark as read and change mbox unread counter // mark as read and change mbox unread counter

Loading…
Cancel
Save