📄 folder.htt
字号:
}
function CSCGetStatusButton(status)
{
var s = "";
var L_SynchronizeButton_Text = "<p class=Button><button onclick='CSCSynchronize()'>同步</button>";
if ((status == 2) || (status == 3))
{
s = L_SynchronizeButton_Text;
}
return s;
}
function CSCShowStatusInfo(expand)
{
// var status = CSCFolderStatus(); Doesn't work on downlevel webview (IE4), so commenting out.
var status = -1;
if (status >= 0)
{
var fIsHot = (CSCText.style.color == document.linkColor);
CSCText.innerHTML = CSCGetStatusText(status);
if (expand)
{
CSCText.innerHTML += "<br>";
if (fIsHot)
CSCPlusMin.innerHTML = gMinusHot;
else
CSCPlusMin.innerHTML = gMinusCold;
CSCDetail.innerHTML = CSCGetStatusDetail(status) + "<br>";
if (document.dir == "rtl")
CSCDetail.style.marginRight = document.body.clientWidth - (CSCText.offsetLeft + CSCText.offsetWidth);
else
CSCDetail.style.marginLeft = CSCText.offsetLeft;
CSCDetail.style.display = "";
}
else
{
if (fIsHot)
CSCPlusMin.innerHTML = gPlusHot;
else
CSCPlusMin.innerHTML = gPlusCold;
CSCDetail.style.display = "none";
}
var cscButton = CSCGetStatusButton(status);
if (cscButton.length > 0)
{
CSCButton.innerHTML = cscButton;
CSCButton.style.display = ""
}
else
{
CSCButton.style.display = "none"
}
CSC.style.display = "";
}
else
{
CSC.style.display = "none";
}
}
function CSCShowExpandedStatus(expand)
{
CSCShowStatusInfo(true);
}
function CSCShowFoldedStatus(expand)
{
CSCShowStatusInfo(false);
}
function IsCSCStatusExpanded()
{
return ((CSCPlusMin.innerHTML.indexOf("mincold.gif") != -1) ||
(CSCPlusMin.innerHTML.indexOf("minhot.gif") != -1));
}
function IsCSCStatusFolded()
{
return ((CSCPlusMin.innerHTML.indexOf("pluscold.gif") != -1) ||
(CSCPlusMin.innerHTML.indexOf("plushot.gif") != -1));
}
function CSCShowStatus()
{
if (IsCSCStatusExpanded())
{
CSCShowExpandedStatus();
}
else // Default to folded status
{
CSCShowFoldedStatus();
}
}
function CSCShowStatus_FoldExpand_Toggle()
{
if (IsCSCStatusExpanded())
{
CSCShowFoldedStatus();
}
else if(IsCSCStatusFolded())
{
CSCShowExpandedStatus();
}
}
function CSC_MouseOver()
{
if (CSCText.style.cursor == "hand")
return;
if (IsCSCStatusExpanded())
CSCPlusMin.innerHTML = gMinusHot;
else
CSCPlusMin.innerHTML = gPlusHot;
CSCText.style.color = document.linkColor;
CSCPlusMin.style.cursor = "hand";
CSCText.style.cursor = "hand";
}
function CSC_MouseOut()
{
if (CSCText.style.cursor == "auto")
return;
if (element = window.event.toElement)
{
idCursor = element.id;
if (idCursor == "CSCDiv" ||
idCursor == "CSCText" ||
idCursor == "CSCPlusMin" ||
idCursor == "CSCBmp")
{
return;
}
}
if (IsCSCStatusExpanded())
CSCPlusMin.innerHTML = gMinusCold;
else
CSCPlusMin.innerHTML = gPlusCold;
CSCText.style.color = "black";
CSCPlusMin.style.cursor = "auto";
CSCText.style.cursor = "auto";
}
function NoneSelected() {
//var s = gIntroText + (FileList.Folder.Items().Count ? L_Prompt_Text : L_Empty_Text);
var s = gIntroText + L_Prompt_Text;
s += GetMessage();
if (false || gFolderPath.length == 3) { // true allows all subfolders to show the pie chart
drive = gFolderPath.substring(0, 3);
if (Thumbnail.displayFile(drive)) {
if (gFolderPath.length == 3)
s += "<p><br>" + L_TotalSize_Text + Thumbnail.totalSpace + "<p>";
else
s += "<p><br>" + drive.link(drive) + "<p><p>" + L_TotalSize_Text + Thumbnail.totalSpace;
s += "<p><table class=Legend width=12 height=12 border=1 ";
if (document.dir == "rtl")
s += "align=right";
else
s += "align=left";
s += " bgcolor=threedface bordercolordark=black bordercolorlight=black><tr><td title=\"";
s += L_UsedSpaceTitle_Text;
s += "\"></td></tr></table> " + L_UsedSpace_Text + Thumbnail.usedSpace;
s += "<p><table class=Legend width=12 height=12 border=1 ";
if (document.dir == "rtl")
s += "align=right";
else
s += "align=left";
s += " bgcolor=threedhighlight bordercolordark=black bordercolorlight=black><tr><td title=\"";
s += L_FreeSpaceTitle_Text;
s += "\"></td></tr></table> " + L_FreeSpace_Text + Thumbnail.freeSpace;
Thumbnail.style.display = "";
}
}
return s;
}
function ManySelected(items) {
var s = items + L_Multiple_Text + "<p>";
var size = 0;
if (items <= 100) {
for (var i = 0; i < items; i++) {
var itemsize = FileList.SelectedItems().Item(i).Size
if (itemsize < 0)
size += (itemsize + 4294967296);
else
size += itemsize;
}
if (size)
s += L_FileSize_Text + FormatNumber(size.toString()) + L_Bytes_Text + "<p>";
if (items <= 16)
for (i = 0; i < items; i++)
s += SanatizeString(FileList.SelectedItems().Item(i).Name) + "<br>";
}
return s;
}
// EVENTS
function Resize() {
if (document.body.clientWidth < Panel.style.pixelWidth * 2) {
Panel.style.visibility = "hidden";
FileList.style.pixelLeft = 0;
FileList.style.pixelWidth = document.body.clientWidth;
} else {
Panel.style.visibility = "visible";
if (document.dir == "rtl") {
FileList.style.pixelLeft = 0;
} else {
FileList.style.pixelLeft = Panel.style.pixelWidth;
}
FileList.style.pixelWidth = document.body.clientWidth - Panel.style.pixelWidth;
}
}
function ThumbnailReady() {
window.clearTimeout(gTimer);
Preview.innerHTML = "";
Preview.style.display = "none";
if (Thumbnail.haveThumbnail())
Thumbnail.style.display = "";
}
// INITIALIZATION
function Initialize(introText) {
gIntroText = introText;
gFolderPath = Info.innerHTML;
Thumbnail.style.display = "none";
CSCShowStatus();
Info.innerHTML = NoneSelected();
// fix styles
var L_SystemFont1_Text = "宋体, MS Song";
var L_SystemFont2_Text = "宋体, MS Song";
var L_SystemFont_Text = "宋体, MS Song";
var tr = document.body.createTextRange();
if (navigator.cpuClass != "Alpha") {
tr.collapse();
var actualFont = tr.queryCommandValue("FontName");
if (actualFont == L_SystemFont1_Text || actualFont == L_SystemFont2_Text)
document.body.style.fontFamily = L_SystemFont_Text;
} else
document.body.style.fontFamily = L_SystemFont_Text;
// init relative dates
gToday = new Date();
gToday = gToday.toLocaleString();
gToday = gToday.substring(0, gToday.indexOf(' '));
gYesterday = new Date(Date.parse(gToday) - (1000 * 60 * 60 * 24));
gYesterday = gYesterday.toLocaleString();
gYesterday = gYesterday.substring(0, gYesterday.indexOf(' '));
// call our Resize() function whenever the window gets resized
window.onresize = Resize;
}
function OnWebviewLinkEnter( aLink )
{
if( aLink.title )
{
window.status = aLink.title;
}
else
{
window.status = "";
}
return true;
}
function OnWebviewLinkExit()
{
window.status = "";
return false;
}
function errorHandler() {
return true; // Don't show the default error message box
}
function Load() {
Panel.style.overflow = "auto";
window.onerror = errorHandler;
Initialize("");
Resize();
}
function StopMediaPlayer()
{
if (Preview.innerHTML != "")
{
//MediaPlayer.Stop();
}
}
</script>
<script for="Thumbnail" event="OnThumbnailReady">
ThumbnailReady();
</script>
<script for="FileList" event="SelectionChanged">
window.clearTimeout(gTimer);
gTimer = window.setTimeout("ShowInfo()", gDoBlends ? 500 : 0); // need actual double-click time
</script>
<script for="FileList" event="VerbInvoked">
// If the user immediately double-clicks the file, we would get
// a selection changed event immediately followed by the VerbInvoked
// event and we would not have had enough time to create the MediaPlayer
// in the SelectionChanged event handler. So, we delay handling this
// event a little bit
window.setTimeout("StopMediaPlayer()", 500);
</script>
<script for="FileList" event="BeginDrag">
window.setTimeout("StopMediaPlayer()", 500);
</script>
<script for="WVLink" event="onmouseover">
return OnWebviewLinkEnter( this );
</script>
<script for="WVLink" event="onfocus">
return OnWebviewLinkEnter( this );
</script>
<script for="WVLink" event="onmouseout">
return OnWebviewLinkExit();
</script>
<script for="WVLink" event="onblur">
return OnWebviewLinkExit();
</script>
<body scroll=no onload=Load()>
<div id=Panel style="background: white URL(wvleft.bmp) no-repeat left top">
<div id=Corner>
<object id=FolderIcon classid="clsid:E5DF9D10-3B52-11D1-83E8-00A0C90DC849" tabIndex=-1>
<param name="scale" value=100>
</object>
<br>
<div id=FolderName>
%THISDIRNAME%
</div>
</div>
<img id=LogoLine src="wvline.gif">
<div id=Details>
<span id=CSC>
<div id=CSCDiv tabIndex=2 onmouseover="CSC_MouseOver()" onmouseout="CSC_MouseOut()" onclick="CSCShowStatus_FoldExpand_Toggle()" onkeypress="CSCShowStatus_FoldExpand_Toggle()">
<span id=CSCPlusMin>
</span>
<span id=CSCText>
</span>
<br>
</div>
<div id=CSCDetail>
</div>
<span id=CSCButton>
</span>
<hr CLASS=Divider NOSHADE>
</span>
<span id=Info>
%THISDIRPATH%
</span>
<div id=Preview style="display: none">
</div>
<br>
<object id=Thumbnail classid="clsid:1D2B4F40-1F10-11D1-9E88-00C04FDCAB92" tabIndex=-1>
</object>
<label id=ThumbnailLabel for="Thumbnail" style="display: none">
</label>
</div>
</div>
<object id=FileList classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2" tabIndex=1>
</object>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -