|
|
@ -9,7 +9,7 @@ var gReturnVal = null; |
|
|
|
|
|
|
|
var gTabIndexes = new Array(); |
|
|
|
// Pre-defined list of tags we want to disable/enable tabbing into
|
|
|
|
var gTabbableTags = new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME"); |
|
|
|
var gTabbableTags = new Array("A", "BUTTON", "TEXTAREA", "INPUT", "IFRAME"); |
|
|
|
|
|
|
|
// If using Mozilla or Firefox, use Tab-key trap.
|
|
|
|
if (!document.all) { |
|
|
@ -34,7 +34,10 @@ function initPopUp() { |
|
|
|
'<img src="close.gif" onclick="hidePopWin(false);" id="popCloseBox" />' + |
|
|
|
'</div>' + |
|
|
|
'</div>' + |
|
|
|
'<iframe src="'+ gDefaultPage +'" style="width:100%;height:100%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"></iframe>' + |
|
|
|
'<iframe src="'+ gDefaultPage + |
|
|
|
'" style="width:100%;height:100%;background-color:transparent;" scrolling="auto"' + |
|
|
|
' frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" ' + |
|
|
|
' width="100%" height="100%"></iframe>' + |
|
|
|
'</div>'; |
|
|
|
theBody.appendChild(popmask); |
|
|
|
theBody.appendChild(popcont); |
|
|
@ -54,8 +57,6 @@ function initPopUp() { |
|
|
|
var elms = document.getElementsByTagName('a'); |
|
|
|
for (i = 0; i < elms.length; i++) { |
|
|
|
if (elms[i].className.indexOf("submodal") == 0) { |
|
|
|
// var onclick = 'function (){showPopWin(\''+elms[i].href+'\','+width+', '+height+', null);return false;};';
|
|
|
|
// elms[i].onclick = eval(onclick);
|
|
|
|
elms[i].onclick = function(){ |
|
|
|
// default width and height
|
|
|
|
var width = 400; |
|
|
@ -73,7 +74,7 @@ function initPopUp() { |
|
|
|
} |
|
|
|
addEvent(window, "load", initPopUp); |
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @argument width - int in pixels |
|
|
|
* @argument height - int in pixels |
|
|
|
* @argument url - url to display |
|
|
@ -96,7 +97,6 @@ function showPopWin(url, width, height, returnFunc, showCloseBox) { |
|
|
|
|
|
|
|
var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10); |
|
|
|
|
|
|
|
|
|
|
|
gPopupContainer.style.width = width + "px"; |
|
|
|
gPopupContainer.style.height = (height+titleBarHeight) + "px"; |
|
|
|
|
|
|
@ -117,7 +117,6 @@ function showPopWin(url, width, height, returnFunc, showCloseBox) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
var gi = 0; |
|
|
|
function centerPopWin(width, height) { |
|
|
|
if (gPopupIsShown == true) { |
|
|
@ -128,16 +127,12 @@ function centerPopWin(width, height) { |
|
|
|
height = gPopupContainer.offsetHeight; |
|
|
|
} |
|
|
|
|
|
|
|
//var theBody = document.documentElement;
|
|
|
|
var theBody = document.getElementsByTagName("BODY")[0]; |
|
|
|
//theBody.style.overflow = "hidden";
|
|
|
|
var scTop = parseInt(getScrollTop(),10); |
|
|
|
var scLeft = parseInt(theBody.scrollLeft,10); |
|
|
|
|
|
|
|
setMaskSize(); |
|
|
|
|
|
|
|
//window.status = gPopupMask.style.top + " " + gPopupMask.style.left + " " + gi++;
|
|
|
|
|
|
|
|
var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10); |
|
|
|
|
|
|
|
var fullHeight = getViewportHeight(); |
|
|
@ -145,14 +140,12 @@ function centerPopWin(width, height) { |
|
|
|
|
|
|
|
gPopupContainer.style.top = (scTop + ((fullHeight - (height+titleBarHeight)) / 2)) + "px"; |
|
|
|
gPopupContainer.style.left = (scLeft + ((fullWidth - width) / 2)) + "px"; |
|
|
|
//alert(fullWidth + " " + width + " " + gPopupContainer.style.left);
|
|
|
|
} |
|
|
|
} |
|
|
|
addEvent(window, "resize", centerPopWin); |
|
|
|
addEvent(window, "scroll", centerPopWin); |
|
|
|
window.onscroll = centerPopWin; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Sets the size of the popup mask. |
|
|
|
* |
|
|
@ -210,7 +203,9 @@ function hidePopWin(callReturnFunc) { |
|
|
|
// Tab key trap. iff popup is shown and key was [TAB], suppress it.
|
|
|
|
// @argument e - event - keyboard event that caused this function to be called.
|
|
|
|
function keyDownHandler(e) { |
|
|
|
if (gPopupIsShown && e.keyCode == 9) return false; |
|
|
|
if (gPopupIsShown && e.keyCode == 9) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// For IE. Go through predefined tags and disable tabbing into them.
|
|
|
@ -230,7 +225,6 @@ function disableTabIndexes() { |
|
|
|
|
|
|
|
function returnRefresh() |
|
|
|
{ |
|
|
|
//alert("I am active!");
|
|
|
|
window.location.reload(); |
|
|
|
} |
|
|
|
|
|
|
@ -249,7 +243,6 @@ function restoreTabIndexes() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Hides all drop down form select boxes on the screen so they do not appear above the mask layer. |
|
|
|
* IE has a problem with wanted select form tags to always be the topmost z-index or layer |
|
|
|