📄 treecontrolsbackground.js
字号:
/////////////////////////////////////////////////////////////////////
//// ////
//// BackGround ////
//// Namespace: TreeControls.js.BackGround.js ////
//// CreateName: Tree ////
//// Email: treeyh@126.com ////
//// Version: 1.0 bate4 ////
//// CreateDate: 2008-2-18 ////
//// ////
/////////////////////////////////////////////////////////////////////
///pageloadshowMsg
Tree.addEvent(window,'load',function ()
{
iTree_DialogBox_pageHeight=Tree.docHeight();
if(Tree.$('TreeOverlayBackgroundDiv')['style']['display']=="block")
{
var obackGround = Tree.$('TreeOverlayBackgroundDiv');
obackGround.style.top="0px";
TreeDialogBoxmiddle("TreeDialogBoxDiv");
obackGround.style.height = iTree_DialogBox_pageHeight;
obackGround.style.width = Tree.docWidth();
var oDialogBoxDiv = Tree.$("TreeDialogBoxDiv");
if(oDialogBoxDiv)
{
iTree_DialogBox_MoveMaxHeight = iTree_DialogBox_pageHeight - parseInt(oDialogBoxDiv.offsetHeight);
var sClientWidth = document.documentElement.clientWidth;
var sWidth = document.body.clientWidth;
if(sClientWidth < sWidth)
{
iTree_DialogBox_scrollwidth = parseInt(document.documentElement.scrollWidth) - parseInt(document.body.clientWidth);
iTree_DialogBox_MoveMaxWidth = parseInt(sWidth) - iTree_DialogBox_scrollwidth - parseInt(oDialogBoxDiv.offsetWidth);
}
else if(sClientWidth == sWidth)
{
iTree_DialogBox_MoveMaxWidth = parseInt(document.documentElement.offsetWidth) - iTree_DialogBox_scrollwidth - parseInt(oDialogBoxDiv.offsetWidth);
}
}
}
});
/*windowSizeChange*/
Tree.addEvent(window, 'resize' , function ()
{
if(Tree.$('TreeOverlayBackgroundDiv')['style']['display']=="block")
{
Tree.$('TreeOverlayBackgroundDiv').style.height = parseInt(iTree_DialogBox_pageHeight) > parseInt(Tree.docWidth()) ? iTree_DialogBox_pageHeight : Tree.docWidth();
var oTreeDialogBox = Tree.$("TreeDialogBoxDiv");
if(oTreeDialogBox)
{
iTree_DialogBox_MoveMaxHeight = iTree_DialogBox_pageHeight - parseInt(oTreeDialogBox.offsetHeight);
Tree.$('TreeOverlayBackgroundDiv').style.width = Tree.docWidth();
iTree_DialogBox_MoveMaxWidth = Tree.docWidth() - parseInt(oTreeDialogBox.offsetWidth);
TreeDialogBoxmiddle('TreeDialogBoxDiv');
}
}
});
function TreeControls_ShowBackGround()
{
var bgDivHeight = document.body.clientHeight;
bgDivHeight = document.documentElement.clientHeight>bgDivHeight?document.documentElement.clientHeight: bgDivHeight;
Tree.$('TreeOverlayBackgroundDiv').style.height = bgDivHeight;
var sClientWidth = document.documentElement.scrollWidth;
var sWidth = document.body.clientWidth;
if(sWidth < sClientWidth)
{
Tree.$('TreeOverlayBackgroundDiv').style.width = sClientWidth;
iTree_DialogBox_MoveMaxWidth = sClientWidth - 398;
}
else if(sWidth == sClientWidth)
{
Tree.$('TreeOverlayBackgroundDiv').style.width = sClientWidth;
iTree_DialogBox_scrollwidth = parseInt(document.documentElement.offsetWidth) - parseInt(document.body.clientWidth);
iTree_DialogBox_MoveMaxWidth = parseInt(document.documentElement.offsetWidth) - iTree_DialogBox_scrollwidth - 398;
}
else
{
Tree.$('TreeOverlayBackgroundDiv').style.width = sWidth;
iTree_DialogBox_MoveMaxWidth = parseInt(sWidth)- 398;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -