Moved modal window to top right corner of screen to avoid it interfering with page styles

This commit is contained in:
Frank Dillon 2006-05-08 04:07:17 +00:00
parent 981693c287
commit 2fbfc8d03f

View file

@ -105,13 +105,14 @@ function initPopUp() {
// Add the HTML to the body // Add the HTML to the body
body = document.getElementsByTagName('body')[0]; body = document.getElementsByTagName('body')[0];
popmask = document.createElement('div'); popmask = document.createElement('div');
if (!popTitle) popTitle = "";
popmask.id = 'popupMask'; popmask.id = 'popupMask';
popcont = document.createElement('div'); popcont = document.createElement('div');
popcont.id = 'popupContainer'; popcont.id = 'popupContainer';
popcont.innerHTML = '' + popcont.innerHTML = '' +
'<div id="popupInner">' + '<div id="popupInner">' +
'<div id="popupTitleBar">' + '<div id="popupTitleBar">' +
'<div id="popupTitle"></div>' + '<div id="popupTitle">' + popTitle + '</div>' +
'<div id="popupControls">' + '<div id="popupControls">' +
'<img src="'+closeImage()+'" onclick="hidePopWin(false);" />' + '<img src="'+closeImage()+'" onclick="hidePopWin(false);" />' +
'</div>' + '</div>' +
@ -152,6 +153,7 @@ function initPopUp() {
} }
} }
} }
hidePopWin();
} }
@ -196,7 +198,7 @@ function showPopWin(url, width, height, returnFunc) {
hideSelectBoxes(); hideSelectBoxes();
} }
window.setTimeout("setPopTitle();", 600); // window.setTimeout("setPopTitle();", 600);
} }
// //
@ -227,9 +229,9 @@ function centerPopWin(width, height) {
var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10); var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10);
gPopupContainer.style.top = (scTop + ((fullHeight - (height+titleBarHeight)) / 2)) + "px"; gPopupContainer.style.top = "100px"; //(scTop + ((fullHeight - (height+titleBarHeight)) / 2)) + "px";
gPopupContainer.style.left = (scLeft + ((fullWidth - width) / 2)) + "px"; gPopupContainer.style.left = "100px"; //(scLeft + ((fullWidth - width) / 4)) + "px";
//alert(fullWidth + " " + width + " " + gPopupContainer.style.left); //alert(scTop + " " + fullWidth + " " + height + " " + " " + titleBarHeight + " " + gPopupContainer.style.top);
} }
} }
addEvent(window, "resize", centerPopWin); addEvent(window, "resize", centerPopWin);