📄 downlist.js
字号:
var filesnum=0;
var rightsta="";
function start()
{
window.parent.document.all("path").innerText=DY_strTitle+"的内容";
window.parent.parent.frmTree.sta.innerText=" 共"+filesnum+"个对象";
window.parent.parent.frmTree.sta.setAttribute("ss"," 共"+filesnum+"个对象");
window.parent.document.all("sta").innerText=rightsta;
window.parent.document.all("sta").setAttribute("ss",rightsta);
window.parent.document.all("tdHeadname").innerText=DY_strTitleHead;
window.parent.parent.frmTree.txtFilter.value=DY_strfilter;
var s1=DY_requestBF;
var s=DY_strID;
var s2="";
// back or forward ==================================
if (s1!="backforward")
{
var a,a1,l;
var r=/,/gi;
var r1=/:/gi;
s1=window.parent.parent.title.txtHistory.value;
s2=window.parent.parent.title.txtHissrc.value;
if (s1!="")
{ a=s1.match(r);l=a.length;a1=s2.match(r1);}
else
l=0;
if (l>=20)
{ s1=s1.substr(s1.indexOf(",")+1);
window.parent.parent.title.txtHistory.value=s1+s+",";
s2=s2.substr(s2.indexOf(":")+1);
window.parent.parent.title.txtHissrc.value=s2+DY_requestFilter+" :";
}
else if (l<1)
{ window.parent.parent.title.txtHistory.value=s+",";
window.parent.parent.title.txtHissrc.value=DY_requestFilter+" :";
}
else
{
window.parent.parent.title.txtHistory.value=s1+s+",";
window.parent.parent.title.txtHissrc.value=s2+DY_requestFilter+" :";
window.parent.parent.title.document.all("imgBack").src="image/back1.gif";
window.parent.parent.title.document.all("imgForward").src="image/forward3.gif";
window.parent.parent.title.document.all("imgForward").setAttribute("flag",0);
}
window.parent.parent.title.document.all("imgBack").setAttribute("flag",l);
} // back or forward end==================================
//========
if (s.length<4)
{
window.parent.parent.title.document.all("imgUP").src="image/up3.gif";
window.parent.parent.title.document.all("imgUP").setAttribute("flag",0);
}
else
{ window.parent.parent.title.document.all("imgUP").src="image/up1.gif";
window.parent.parent.title.document.all("imgUP").setAttribute("flag",1);
}
//=========
}
function itemClk(sid)
{ var i,i1,j,s1,s2,tmps,o;
var src=document.all(sid);
var s=txtSelect.value;
if (window.event.shiftKey)
{
s2=txtallid.value;
if (s=="")
s1=s2.substr(0,s2.indexOf(",")+1);
else
{
s1=s.substr(0,s.indexOf(",")+1);
i=s.indexOf(",");
while(i>0)
{
tmps=s.substr(0,i);
s=s.substr(i+1);
o=document.all(tmps);
o.style.backgroundColor=0xffffff;
o.style.color=0x000000;
i=s.indexOf(",");
}
}
i=s2.indexOf(s1);
j=s2.indexOf(sid+",");
s="";
if (j<i)
{
i1=j;j=i;i=i1;
}
while(i<=j)
{
i1=s2.indexOf(",",i);
s1=s2.substr(i,i1-i);
o=document.all(s1);
o.style.backgroundColor="DarkBlue";
o.style.color=0xffffff;
i=i1+1;
s=s+s1+",";
}
} //shift press
else if(window.event.ctrlKey)
{
s1=sid+",";
i=s.indexOf(s1);
if (i>=0)
{
o=document.all(sid);
o.style.backgroundColor=0xffffff;
o.style.color=0x000000;
s=s.substr(0,i)+s.substr(i+s1.length);
}
else
{
o=document.all(sid);
o.style.backgroundColor="DarkBlue";
o.style.color=0xffffff;
s=s+sid+",";
}
} //ctrl press
else
{
if (s!="")
{
if (s!=sid+",")
{
i=s.indexOf(",");
while(i>0)
{
s1=s.substr(0,i);
s=s.substr(i+1);
o=document.all(s1);
o.style.backgroundColor=0xffffff;
o.style.color=0x000000;
i=s.indexOf(",");
}
o=null;
o=document.all(sid);
s="";
if (o!=null)
{
o.style.backgroundColor="DarkBlue";
o.style.color=0xffffff;
s=sid+",";
}
}
else //同一个item
{
o=document.all(sid);
o.style.backgroundColor=0xffffff;
o.style.color=0x000000;
o.className="fldInput1";
o.readOnly=false;
o.select();
o.focus();
}
} //s!==""
else
{
o=null;
o=document.all(sid);
s="";
if (o!=null)
{
o.style.backgroundColor="DarkBlue";
o.style.color=0xffffff;
s=sid+",";
}
}
} //shift ,ctrl not presss
txtSelect.value =s;
txtSelectchange();
if (o!=null)
if (o.className!="fldInput1") txtSelect.select();
}
function itemBlur(src)
{
var s2=src.name;
src.className="fldInput";
src.readOnly=true;
s2=s2.substr(s2.lastIndexOf("/")+1);
var re=/\?/gi;
src.value=s2.replace(re," ")
}
function itemDblClk(sid)
{ var s="";
var s1="";
var o=null;
o=document.all(sid);
o.className="fldInput";
o.readOnly=true;
if (o.getAttribute("isfloder")=="1") //文件夹
{
window.parent.parent.frmTree.document.all("txtcmd").value="expand "+sid;
} // 文件夹end
else //文件
{
s=window.prompt("请选择操作方式:下载download(d) 远程执行/打开(r) 取消操作(c)\r","d");
switch (s)
{
case "d":
window.parent.parent.download1.location.href="action.asp?cmd=download%20"+sid;
break;
case "r":
window.parent.parent.download1.location.href="action.asp?cmd=run%20"+sid;
break;
default:
break;
}
} // 文件 end
}
function itemkeypress(src)
{
switch( window.event.keyCode)
{
case 13:
window.parent.parent.download1.location.href="action.asp?cmd=rename%20"+src.name+","+src.value;
src.blur();
break;
case 27:
src.blur();
break;
}
}
function dele() //delete file
{
var s=txtSelect.value;
if (s!="")
{
if (window.confirm("是否确信删除所选文件/文件夹?"))
{
window.parent.parent.download1.location.href="action.asp?cmd=delete%20"+s;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -