Author: mfang
Date: 2009-05-15 07:43:19 +0200 (Fri, 15 May 2009)
New Revision: 35175

Modified:
   
CMSContainer/trunk/CMSContainer/cmsc/edit-webapp/src/webapp/editors/editwizards_new/javascript/override.js
Log:
CMSC-1124 open all popups on the same screen as the 'main' application

Modified: 
CMSContainer/trunk/CMSContainer/cmsc/edit-webapp/src/webapp/editors/editwizards_new/javascript/override.js
===================================================================
--- 
CMSContainer/trunk/CMSContainer/cmsc/edit-webapp/src/webapp/editors/editwizards_new/javascript/override.js
  2009-05-14 15:50:02 UTC (rev 35174)
+++ 
CMSContainer/trunk/CMSContainer/cmsc/edit-webapp/src/webapp/editors/editwizards_new/javascript/override.js
  2009-05-15 05:43:19 UTC (rev 35175)
@@ -388,16 +388,47 @@
 }
 
 function getAssets(type, channelid){    
-    //alert(Data[type]);
-       var iWidth=800; 
-    var iHeight=200;
-       var xposition = 0;
-            var yposition = 0;
-            if ((parseInt(navigator.appVersion) >= 4)) {
-                xposition = (screen.width-iWidth ) / 2;
-                yposition = (screen.height-iHeight - 25) / 2;
-            }
+       //alert(Data[type]);
+       var width=730; 
+       var height=550;
        var 
url='../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid='+channelid+'&assettypes='+type+'&strict='+type;
-       window.open(url, 
-       'contentselector', 
'width=730,height=550,status=yes,toolbar=no,titlebar=no,scrollbars=yes,resizable=yes,left='+xposition+',top='+yposition+',menubar=no');
+       var windowName='contentselector';
+       var options = getPopupPositionProps(width, height) + 
',status=yes,toolbar=no,titlebar=no,scrollbars=yes,resizable=yes,menubar=no';
+       window.open(url, windowName, options);
+}
+
+// override doHelp() from editwizard.jsp. (fix CMSC-1124)
+function doHelp() {
+    var w=window.open("","Help", getPopupPositionProps(350, 
400)+",scrollbars=yes,toolbar=no,statusbar=no,resizable=yes");
+    try {
+        var str=document.getElementById("help_text").innerHTML;
+
+        w.document.writeln('<html><head>');
+        w.document.writeln('<link rel="stylesheet" 
href="../style/layout/help.css">');
+        w.document.writeln('<link rel="stylesheet" 
href="../style/color/help.css">');
+        w.document.writeln('</head><body>');
+        w.document.writeln(str);
+        w.document.writeln('</body></html>');
+    } catch (e) {
+        w.close();
+    }
+}
+
+// override showSearchScreen() from editwizard.jsp. (fix CMSC-1124)
+function showSearchScreen(cmd, url) {
+       var windowPopup = window.open("","Search", getPopupPositionProps(400, 
400)+",scrollbars=yes,toolbar=no,status=yes,resizable=yes");
+       try {
+               windowPopup.document.writeln('<span>...searching...</span>');
+       } catch (e) {
+               windowPopup.close();
+       }
+       windowPopup.document.location.replace(url);
+}
+
+// override doStartUpload() from editwizard.jsp. (fix CMSC-1124)
+function doStartUpload(el) {
+    var href = el.getAttribute("href");
+    window.open(href,null,getPopupPositionProps(300, 
300)+",status=yes,toolbar=no,titlebar=no,scrollbars=no,resizable=no,menubar=no");
+
+    return false;
 }
\ No newline at end of file

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to