UPDATE autoResizeScreen Iframes

This commit is contained in:
Richard Yujra
2015-05-06 18:36:33 -04:00
parent 392e0f4229
commit 9a20750c6d
3 changed files with 82 additions and 33 deletions

View File

@@ -26,18 +26,34 @@ $_POST['qs'] = $filter->xssFilterHard($_POST['qs']);
function autoResizeScreen() {
var containerList1, containerList2;
oCasesFrame = document.getElementById('casesFrame');
oClientWinSize = getClientWindowSize();
containerList1 = document.getElementById("pm_header");
if (document.getElementById("mainMenuBG") &&
document.getElementById("mainMenuBG").parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode){
containerList2 = document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode;
}
if (containerList1 === containerList2) {
height = oClientWinSize.height - containerList1.clientHeight;
oCasesFrame.style.height = height;
if (oCasesFrame.height ) {
oCasesFrame.height = height;
}
} else {
height = getClientWindowSize().height-90;
oCasesFrame.style.height = height + 'px';;
oCasesFrame.style.height = height + 'px';
oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('casesSubFrame');
if(oCasesSubFrame){
oCasesSubFrame.style.height = (height-5) + 'px';;
}
else {
} else {
setTimeout('autoResizeScreen()', 2000);
}
}
}
</script>
</html>

View File

@@ -22,7 +22,24 @@
function autoResizeScreen() {
var containerList1, containerList2;
oCasesFrame = document.getElementById('casesFrame');
containerList1 = document.getElementById("pm_header");
if (document.getElementById("mainMenuBG") &&
document.getElementById("mainMenuBG").parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode){
containerList2 = document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode;
}
if (containerList1 === containerList2) {
height = oClientWinSize.height - containerList1.clientHeight;
oCasesFrame.style.height = height;
if (oCasesFrame.height ) {
oCasesFrame.height = height;
}
}else{
height = getClientWindowSize().height-90;
oCasesFrame.style.height = height;
oCasesSubFrame = oCasesFrame.contentWindow.document.getElementById('casesSubFrame');
@@ -32,8 +49,7 @@
else {
setTimeout('autoResizeScreen()', 2000);
}
}
}
</script>
</html>

View File

@@ -15,7 +15,23 @@
document.documentElement.style.overflowY = 'hidden';
function autoResizeScreen() {
var containerList1, containerList2;
oCasesFrame = document.getElementById('adminFrame');
containerList1 = document.getElementById("pm_header");
if (document.getElementById("mainMenuBG") &&
document.getElementById("mainMenuBG").parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode &&
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode){
containerList2 = document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode;
}
if (containerList1 === containerList2) {
height = oClientWinSize.height - containerList1.clientHeight;
oCasesFrame.style.height = height;
if (oCasesFrame.height ) {
oCasesFrame.height = height;
}
} else {
oClientWinSize = getClientWindowSize();
height = oClientWinSize.height-90;
oCasesFrame.style.height = height;
@@ -26,5 +42,6 @@
else
setTimeout('autoResizeScreen()', 2000);
}
}
</script>
</html>