From e099027563302cf4706285953d712d4d4c79a68a Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 7 May 2010 15:49:35 -0600 Subject: [PATCH] Use Horde.popup() in DIMP --- imp/js/DimpCore.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index ae4dcf4ab..04cbc29e6 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -266,9 +266,18 @@ var DimpCore = { this.popupWindow(this.addURLParam(url, args), 'compose' + new Date().getTime()); }, - popupWindow: function(url, name) + popupWindow: function(url, name, onload) { - if (!(window.open(url, name.replace(/\W/g, '_'), 'width=' + DIMP.conf.popup_width + ',height=' + DIMP.conf.popup_height + ',status=1,scrollbars=yes,resizable=yes'))) { + var opts = { + height: DIMP.conf.popup_height, + name: name.gsub(/\W/, '_'), + noalert: true, + onload: onload, + url: url, + width: DIMP.conf.popup_width + }; + + if (!Horde.popup(opts)) { this.showNotifications([ { type: 'horde.warning', message: DIMP.text.popup_block } ]); } }, -- 2.11.0