]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1242 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 6 Nov 2007 22:07:46 +0000 (22:07 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 6 Nov 2007 22:07:46 +0000 (22:07 +0000)
UI/WebServerResources/generic.js

index 5103916e34e2b9de2e58d8c1bbf8246806a6f281..78298291e065321b38446fab681e13e08b7a03c8 100644 (file)
@@ -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"