From bb2ae01723610c74bca903ba7ccd6d930cb871dd Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 6 Nov 2007 22:07:46 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1242 d1b88da0-ebda-0310-925b-ed51d893ca5b --- UI/WebServerResources/generic.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 5103916e..78298291 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -218,8 +218,13 @@ function openUserFolderSelector(callback, type) { } function openContactWindow(url, wId) { - if (!wId) - wId = "" + (new Date().getTime()); + if (typeof wId == "undefined") + wId = "_blank"; + else { + var r = new RegExp("[\.\/-]", "g"); + wId = wId.replace(r, "_"); + } + var w = window.open(url, wId, "width=450,height=600,resizable=0,location=0"); w.focus(); @@ -230,12 +235,15 @@ function openContactWindow(url, wId) { function openMailComposeWindow(url, wId) { var parentWindow = this; - if (!wId) - wId = "" + (new Date().getTime()); - else + if (typeof wId == "undefined") + wId = "_blank"; + else { + var r = new RegExp("[\.\/-]", "g"); + wId = wId.replace(r, "_"); if (document.body.hasClassName("popup")) parentWindow = window.opener; - + } + var w = parentWindow.open(url, wId, "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + "location=0,directories=0,status=0,menubar=0" -- 2.39.5