Author: mfang
Date: 2009-05-15 07:44:44 +0200 (Fri, 15 May 2009)
New Revision: 35176
Modified:
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_image.html
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_link.html
Log:
CMSC-1124 open all popups on the same screen as the 'main' application
Modified:
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_image.html
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_image.html
2009-05-15 05:43:19 UTC (rev 35175)
+++
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_image.html
2009-05-15 05:44:44 UTC (rev 35176)
@@ -3,6 +3,7 @@
<head>
<title>Insert Inline Image</title>
+ <script type="text/javascript" src="../../../../../js/window.js"></script>
<script type="text/javascript" src="popup.js"></script>
<link rel="stylesheet" type="text/css" href="popup.css" />
@@ -81,7 +82,7 @@
}
function onSelect() {
-
openPopupWindow('../../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid=current&assettypes=images','filterwindow2',750,600);
+ openPopupWindow('filterwindow2',750,600,
'../../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid=current&assettypes=images');
return false;
};
@@ -163,39 +164,6 @@
}
}
-function openPopupWindow(url, windowName, width, height) {
- debug = false;
- if (!width) {w = 750;} else { w = width; }
- if (!height) {h = 750;} else { h = height; }
- var left = (screen.availWidth - w)/2;
- var top = (screen.availHeight - h)/2;
- if (screen.availWidth < w) {
- w = screen.availWidth;
- left = 0;
- }
- if (screen.availHeight < h) {
- h = screen.availHeight - 25;
- top = 0;
- }
- if (debug) {
- alert("width: " + w + " " + left);
- alert("height: " + h + " " + top);
- }
- str = 'window.open(url,"' + windowName + '","width=' + w + ',height=' + h +
',left=' + left + ',top=' + top +
',scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,resizable=yes")';
-
- if (debug) {
- alert(str);
- }
-
- obj = eval(str);
- if (document.all) {
- // set a opener for ie because its a dialog and not a popup (unlike
mozilla)
- obj.opener = this;
- }
-
- return true;
-}
-
</script>
Modified:
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_link.html
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_link.html
2009-05-15 05:43:19 UTC (rev 35175)
+++
CMSContainer/trunk/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/popups/insertinline_link.html
2009-05-15 05:44:44 UTC (rev 35176)
@@ -3,6 +3,7 @@
<head>
<title>Insert/Modify Link</title>
+ <script type="text/javascript" src="../../../../../js/window.js"></script>
<script type="text/javascript" src="popup.js"></script>
<link rel="stylesheet" type="text/css" href="popup.css" />
@@ -113,23 +114,23 @@
};
function onElement() {
-
openPopupWindow('../../../../../editors/repository/select/index.jsp','filterwindow2',950,550);
+
openPopupWindow('filterwindow2',950,550,'../../../../../editors/repository/select/index.jsp');
return false;
};
function onPage() {
-
openPopupWindow('../../../../../editors/site/select/SelectorPage.do','filterwindow2',340,
400);
+ openPopupWindow('filterwindow2',340,
400,'../../../../../editors/site/select/SelectorPage.do');
return false;
};
function onAsset() {
-
openPopupWindow('../../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid=current&assettypes=attachments','filterwindow2',750,600);
+
openPopupWindow('filterwindow2',750,600,'../../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid=current&assettypes=attachments');
return false;
};
function onUrl() {
-
openPopupWindow('../../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid=current&assettypes=urls','filterwindow2',750,600);
+
openPopupWindow('filterwindow2',750,600,'../../../../../editors/repository/HighFrequencyAsset.do?action=often&offset=0&channelid=current&assettypes=urls');
return false;
};
@@ -184,39 +185,6 @@
document.getElementById("f_href").value = url;
}
}
-
-function openPopupWindow(url, windowName, width, height) {
- debug = false;
- if (!width) {w = 750;} else { w = width; }
- if (!height) {h = 750;} else { h = height; }
- var left = (screen.availWidth - w)/2;
- var top = (screen.availHeight - h)/2;
- if (screen.availWidth < w) {
- w = screen.availWidth;
- left = 0;
- }
- if (screen.availHeight < h) {
- h = screen.availHeight - 25;
- top = 0;
- }
- if (debug) {
- alert("width: " + w + " " + left);
- alert("height: " + h + " " + top);
- }
- str = 'window.open(url,"' + windowName + '","width=' + w + ',height=' + h +
',left=' + left + ',top=' + top +
',scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,resizable=yes")';
-
- if (debug) {
- alert(str);
- }
-
- obj = eval(str);
- if (document.all) {
- // set a opener for ie because its a dialog and not a popup (unlike
mozilla)
- obj.opener = this;
- }
-
- return true;
-}
</script>
</head>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs