summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-31 09:27:15 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-31 09:27:15 +0200
commit3863a9d2c5515fe4c61c433503450531098358ec (patch)
tree12b50a1e7bb436a507a08049813fce05762da855 /program/js
parent99e27c581eda16f8c3f942fc9f57ce5d56b8cba1 (diff)
Added user preference to open all popups as standard windows
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js31
1 files changed, 19 insertions, 12 deletions
diff --git a/program/js/app.js b/program/js/app.js
index d5a66abf0..25f7fe98e 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1629,18 +1629,25 @@ function rcube_webmail()
// open popup window
this.open_window = function(url, small, toolbar)
{
- var win = this.is_framed() ? parent.window : window,
- page = $(win),
- page_width = page.width(),
- page_height = bw.mz ? $('body', win).height() : page.height(),
- w = Math.min(small ? this.env.popup_width_small : this.env.popup_width, page_width),
- h = page_height, // always use same height
- l = (win.screenLeft || win.screenX) + 20,
- t = (win.screenTop || win.screenY) + 20,
- wname = 'rcmextwin' + new Date().getTime(),
- extwin = window.open(url + (url.match(/\?/) ? '&' : '?') + '_extwin=1', wname,
- 'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,location=no,scrollbars=yes'
- +(toolbar ? ',toolbar=yes,menubar=yes,status=yes' : ',toolbar=no,menubar=no,status=no'));
+ var wname = 'rcmextwin' + new Date().getTime();
+
+ url += (url.match(/\?/) ? '&' : '?') + '_extwin=1';
+
+ if (this.env.standard_windows)
+ extwin = window.open(url, wname);
+ else {
+ var win = this.is_framed() ? parent.window : window,
+ page = $(win),
+ page_width = page.width(),
+ page_height = bw.mz ? $('body', win).height() : page.height(),
+ w = Math.min(small ? this.env.popup_width_small : this.env.popup_width, page_width),
+ h = page_height, // always use same height
+ l = (win.screenLeft || win.screenX) + 20,
+ t = (win.screenTop || win.screenY) + 20,
+ extwin = window.open(url, wname,
+ 'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,location=no,scrollbars=yes'
+ +(toolbar ? ',toolbar=yes,menubar=yes,status=yes' : ',toolbar=no,menubar=no,status=no'));
+ }
// write loading... message to empty windows
if (!url && extwin.document) {