首页->控件应用->漂亮实用的自定义对话框源码及Demo>>Com.EEShou.Www.TreeControl/obj/Debug/Com.ToShou.Www.TreeControls.js.TreeControlsBackGround.js>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:漂亮实用的自定义对话框源码及Demo
当前文件:
DialogExample/Com.EEShou.Www.TreeControl/obj/Debug/Com.ToShou.Www.TreeControls.js.TreeControlsBackGround.js[4K,2009-6-12 11:38:49],打开代码结构图
DialogExample/Com.EEShou.Www.TreeControl/obj/Debug/Com.ToShou.Www.TreeControls.js.TreeControlsBackGround.js[4K,2009-6-12 11:38:49],打开代码结构图12
3
///////pageloadshowMsg 4
window.onload = function () 5
{ 6
iTree_DialogBox_pageHeight=TreeDocumentHeight(); 7
//iTree_DialogBox_pageHeight = document.documentElement.scrollHeight>iTree_DialogBox_pageHeight?document.documentElement.scrollHeight: iTree_DialogBox_pageHeight; 8
9
if(TreeDialogBox$('TreeOverlayBackgroundDiv')['style']['display']=="block") 10
{ 11
TreeDialogBox$('TreeOverlayBackgroundDiv').style.top=0; 12
TreeDialogBox$('TreeOverlayBackgroundDiv').style.height = iTree_DialogBox_pageHeight; 13
TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = TreeDocumentWidth(); 14
var oDialogBoxDiv = TreeDialogBox$("TreeDialogBoxDiv"); 15
if(oDialogBoxDiv) 16
{ 17
iTree_DialogBox_MoveMaxHeight = iTree_DialogBox_pageHeight - parseInt(TreeDialogBox$('TreeDialogBoxDiv').offsetHeight); 18
19
var sClientWidth = document.documentElement.clientWidth; 20
var sWidth = document.body.clientWidth; 21
22
if(sClientWidth < sWidth) 23
{ 24
iTree_DialogBox_scrollwidth = parseInt(document.documentElement.scrollWidth) - parseInt(document.body.clientWidth); 25
iTree_DialogBox_MoveMaxWidth = parseInt(sWidth) - iTree_DialogBox_scrollwidth - parseInt(TreeDialogBox$('TreeDialogBoxDiv').offsetWidth); 26
} 27
else if(sClientWidth == sWidth) 28
{ 29
iTree_DialogBox_MoveMaxWidth = parseInt(document.documentElement.offsetWidth) - iTree_DialogBox_scrollwidth - parseInt(TreeDialogBox$('TreeDialogBoxDiv').offsetWidth); 30
} 31
} 32
//TreeDialogBoxmiddle("TreeDialogBoxDiv"); 33
} 34
} 35
36
37
/*windowSizeChange*/ 38
window.onresize=function TreeDialogBoxSize() 39
{ 40
if(TreeDialogBox$('TreeOverlayBackgroundDiv')['style']['display']=="block") 41
{ 42
TreeDialogBox$('TreeOverlayBackgroundDiv').style.height = iTree_DialogBox_pageHeight; 43
44
var oTreeDialogBox = TreeDialogBox$("TreeDialogBoxDiv"); 45
if(oTreeDialogBox) 46
{ 47
48
iTree_DialogBox_MoveMaxHeight = iTree_DialogBox_pageHeight - parseInt(oTreeDialogBox.offsetHeight); 49
50
TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = TreeDocumentWidth(); 51
iTree_DialogBox_MoveMaxWidth = TreeDocumentWidth() - parseInt(oTreeDialogBox.offsetWidth); 52
// var sClientWidth = document.documentElement.scrollWidth; 53
// var sWidth = document.body.clientWidth; 54
// 55
// if(sWidth <= sClientWidth) 56
// { 57
// TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sClientWidth; 58
// // alert("sClientWidth:" + sClientWidth); 59
// iTree_DialogBox_MoveMaxWidth = sClientWidth - parseInt(oTreeDialogBox.offsetWidth); 60
// } 61
// else 62
// { 63
// TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sWidth-iTree_DialogBox_scrollwidth; 64
// //alert("sWidth:" + sWidth); 65
// iTree_DialogBox_MoveMaxWidth = sWidth-iTree_DialogBox_scrollwidth - parseInt(oTreeDialogBox.offsetWidth); 66
// } 67
TreeDialogBoxmiddle('TreeDialogBoxDiv'); 68
} 69
} 70
} 71
72
function TreeControls_ShowBackGround() 73
{ 74
var bgDivHeight = document.body.clientHeight; 75
bgDivHeight = document.documentElement.clientHeight>bgDivHeight?document.documentElement.clientHeight: bgDivHeight; 76
TreeDialogBox$('TreeOverlayBackgroundDiv').style.height = bgDivHeight; 77
78
var sClientWidth = document.documentElement.scrollWidth; 79
var sWidth = document.body.clientWidth; 80
if(sWidth < sClientWidth) 81
{ 82
TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sClientWidth; 83
iTree_DialogBox_MoveMaxWidth = sClientWidth - 398; 84
} 85
else if(sWidth == sClientWidth) 86
{ 87
TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sClientWidth; 88
iTree_DialogBox_scrollwidth = parseInt(document.documentElement.offsetWidth) - parseInt(document.body.clientWidth); 89
iTree_DialogBox_MoveMaxWidth = parseInt(document.documentElement.offsetWidth) - iTree_DialogBox_scrollwidth - 398; 90
} 91
else 92
{ 93
TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sWidth; 94
iTree_DialogBox_MoveMaxWidth = parseInt(sWidth)- 398; 95
} 96
}





iTree_DialogBox_pageHeight
}
}