summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 5d7e28640..87f20679a 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -936,16 +936,13 @@ function rcube_webmail()
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);
@@ -1647,8 +1644,6 @@ function rcube_webmail()
// focus window, delayed to bring to front
window.setTimeout(function() { extwin.focus(); }, 10);
- // position window with setTimeout for Chrome (#1488931)
- window.setTimeout(function() { extwin.moveTo(l,t); }, bw.chrome ? 100 : 10);
return wname;
};
@@ -6721,6 +6716,15 @@ function rcube_webmail()
return 1;
}
+ // this will detect any pdf plugin including PDF.js in Firefox
+ var obj = document.createElement('OBJECT');
+ obj.onload = function() { rcmail.env.browser_capabilities.pdf = 1; };
+ obj.onerror = function() { rcmail.env.browser_capabilities.pdf = 0; };
+ obj.style.display = 'none';
+ obj.type = 'application/pdf';
+ obj.data = 'program/resources/blank.pdf';
+ document.body.appendChild(obj);
+
return 0;
};