📄 main_only.js
字号:
//////////////////////////////////scoll animation effect///////////////
function scrollSub(subId,height)
{
var subNode=document.getElementById(subId);
if(subNode.scrollDirection==1)
{
subNode.scrollDirection=0;
setTimeout(scUPfunction(subNode),50);
}
else if(subNode.scrollDirection==0)
{
subNode.scrollDirection=1;
subNode.style.display="block";
setTimeout(scDOWNfunction(subNode,height),50);
}
}
function scUPfunction(subObj)
{
return function()
{
if (subObj.scrollDirection==1) return;
var intHeight=parseInt(subObj.style.height,10)-20;
if (intHeight<=0)
{
subObj.style.display="none";
subObj.scrollDirection=0;
return;
}
else
{
subObj.style.height=intHeight+"px";
}
setTimeout(scUPfunction(subObj),50);
}
}
function scDOWNfunction(subObj,height)
{
return function()
{
if (subObj.scrollDirection==0) return;
var intHeight=parseInt(subObj.style.height,10)+20;
if (intHeight>=height)
{
subObj.style.height=height+"px";
return;
}
else
{
subObj.style.height=intHeight+"px";
}
setTimeout(scDOWNfunction(subObj,height),50);
}
}
function getSimpleFontStyle(str)
{
return "<div style='font-size:12px;font-family:Tahoma, Arial; padding-top:5px; padding-left:36px; color:#155E95;'>"+str+"</div>"
}
function getCheckFontStyle(str)
{
return "<div style='font-size:12px;font-family:Tahoma, Arial; padding-top:5px; padding-left:36px; color:#014880;'>"+str+"</div>"
}
//////////////////////////////////scoll animation effect///////////////
///////////////left menu click//////////////////////////
function ChangeAddIcon(divObj) {
if (divObj.style.backgroundImage == "url(images/left_click_add_icon.gif)") {
divObj.style.background="url(images/left_unclick_add_icon.gif)";
}
else {
divObj.style.background="url(images/left_click_add_icon.gif)";
}
}
///////////////left menu click//////////////////////////
////////////////main mini and exit window operation//////////////////////////
function MiniWindow() {
window.external.OnMinimize();
}
function ExitWindow() {
window.external.OnOK();
}
function LeftNavigation( operationType ) {
if ( parent.processFlag ) { return; }
var openURL;
//if can't click, then return;
if (!navigationFlag) { return; }
navigationFlag = false;
allLeftRadioContainer.Disable();
if ( divClickID == "Div_Main_DriverClone_Main" ) { $(divClickID).style.backgroundImage="url(images/left_main_menu2.gif)"; }
else { $(divClickID).style.backgroundImage="url(images/left_click_menu.gif)"; }
switch ( operationType ) {
case 1:
// backup 0 --- back drivers 1 ----- back file 2 -- back disk
openURL = BackupLocation(parseInt(allLeftRadioContainer.value));
break;
case 2:
// restore 0 --- restore drivers 1---- restore file
openURL = RestoreLocation(parseInt(allLeftRadioContainer.value)-10);
break;
case 3:
// clone 0 --- clone partition 1---- clone disk
openURL = CloneLocation(parseInt(allLeftRadioContainer.value)-20);
break;
}
timeOutObject = setTimeout("ChangeNavigationFlag();",100);
window.open(openURL,'IframeMainUI');
}
/////////////////main location 0 ----- summary 1-------- backup 2 --------- restore 3 ------- clone
//////////////////clickID is click div's id
function MainLocation( locationFlag, clickID ) {
if ( parent.processFlag ) { return; }
if ( !subFartherDivClickFlag ) { return; }
if ( clickID != divClickID ) {
if ( clickID == "Div_Main_DriverClone_Main" ) { $(clickID).style.backgroundImage="url(images/left_main_menu.gif)"; }
else { $(clickID).style.backgroundImage="url(images/left_click_menu2.gif)"; }
if ( divClickID == "Div_Main_DriverClone_Main" ) { $(divClickID).style.backgroundImage="url(images/left_main_menu2.gif)"; }
else { $(divClickID).style.backgroundImage="url(images/left_click_menu.gif)"; }
divClickID = clickID;
}
allLeftRadioContainer.unCheckAll();
switch (locationFlag) {
case 0:
IframeMainUI.location = "summary.htm";
break;
case 1:
IframeMainUI.location = "Backup.html";
break;
case 2:
IframeMainUI.location = "Restore.html";
break;
case 3:
IframeMainUI.location = "Clone.html";
break;
}
}
function ChangeNavigationFlag() { allLeftRadioContainer.Enable();navigationFlag = true; }
////////////////////webmenu function//////////////////////////////////////
function iniTopMenu(clickedObj)
{
currentOpenedTopMenuButton=clickedObj;
var menuTopLevelObj=document.getElementById(clickedObj.submenuid);
menuUpObj=menuTopLevelObj
appendedTopItem=clickedObj;
//alert(menuTopLevelObj.clientWidth)
menuTopLevelObj.style.left=-clickedObj.clientWidth+"px";
sdObj.className=("menushadow")
sdObj.style.height=menuTopLevelObj.clientHeight+"px";
sdObj.style.width=menuTopLevelObj.clientWidth+"px";
sdObj.style.top=(parseInt(menuTopLevelObj.offsetTop)+4)+"px";
sdObj.style.left=(parseInt(menuTopLevelObj.offsetLeft)+4)+"px";
clickedObj.parentNode.appendChild(sdObj);
menuTopLevelObj.style.visibility="visible";
sdObj.style.visibility="visible";
//alert(menuTopLevelObj.visibility)
var subMenuArr=menuTopLevelObj.childNodes;
for (i=0;i<subMenuArr.length;i++) {
subMenuArr[i].onmouseover=function() {
isMove=false;
var thisMenuSubListArr=this.parentNode.childNodes;
for (i=0;i<thisMenuSubListArr.length;i++) {
if (thisMenuSubListArr[i].className=="upMenuStyle") {
thisMenuSubListArr[i].style.backgroundImage="url(images/topMenuDiv.jpg)";
}
thisMenuSubListArr[i].style.backgroundColor="";
thisMenuSubListArr[i].style.color="#000000";
}
if (this.className=="upMenuStyle") {
this.style.backgroundImage="none";
}
this.style.backgroundColor="#316AC5";
this.style.color="#ffffff";
}
subMenuArr[i].onmouseout=function() {
isMove=true;
if (this.className=="upMenuStyle") {
this.style.backgroundImage="url(images/topMenuDiv.jpg)";
}
this.style.backgroundColor="";
this.style.color="#000000";
}
subMenuArr[i].onclick=function() {
menuFireEvent(this.iid)
}
}
submenuIsOpen=true;
}
function appendSubmenu(clickedObj) {
setTimeout(clickTimeout(clickedObj),20)
}
function clickTimeout(obj) {
return function() {
iniTopMenu(obj);
}
}
//submenu click
function menuFireEvent(id) {
fffa();
if ( parent.processFlag ) { return; }
id = parseInt(id);
switch (id) {
case 19:
FileExit();
break;
case 22:
ToolsCheckImage();
break;
case 23:
ToolsMountImage();
break;
case 24:
ToolsUmountIMage();
break;
case 31:
HelpHelp();
break;
case 32:
window.external.Navigate("mainui/aboutus.html", 450, 295);
break;
case 33:
window.open("http://www.farstone.com",'_blank');
break;
}
// if (id==11) {
// window.external.OnClose();
// }
// if (id==21) {
// if (window.external.IsPendClose()==true) {
// return;
// }
// clickNavButton(1);
// }
// if (id==22) {
// if (window.external.IsPendClose()==true) {
// return;
// }
// clickNavButton(6);
// }
// if (id==23) {
// if (window.external.IsPendClose()==true) {
// return;
// }
// clickNavButton(5);
// }
// if (id==31) { }
// if (id==34) {
// var isDoingThing=window.external.IsPendClose()
// window.external.PendClose(false);
// window.external.Navigate("mainui/about.htm",320,420);
// }
}
function closeTopSubNenu() {
if (currentOpenedTopMenuButton==null) {
return;
}
var parentMenuObj=document.getElementById(currentOpenedTopMenuButton.submenuid);
if (parentMenuObj==null) {
return;
}
var listArray1=parentMenuObj.childNodes;
for(i=0;i<listArray1.length;i++) {
if (listArray1[i].style.backgroundColor=="") { continue; }
listArray1[i].style.backgroundColor="";
listArray1[i].style.color="#000000";
if (listArray1[i].className=="upMenuStyle") {
listArray1[i].style.backgroundImage="url(images/topMenuDiv.jpg)";
}
}
currentOpenedTopMenuButton.style.backgroundColor="";
currentOpenedTopMenuButton.style.color="#000000";
currentOpenedTopMenuButton=null;
menuUpObj.style.visibility="hidden";
sdObj.style.visibility="hidden";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -