зеркало из https://github.com/mozilla/pjs.git
Download manager. Not part of build. a=asa
This commit is contained in:
Родитель
da320ea01b
Коммит
0832f44c01
|
@ -83,15 +83,17 @@ function Startup()
|
|||
key = "Win";
|
||||
else if (navigator.platform.indexOf("Mac") != -1)
|
||||
key = "Mac";
|
||||
else
|
||||
else {
|
||||
key = "Unix";
|
||||
document.getElementById("btn_openfile").hidden = true;
|
||||
}
|
||||
|
||||
var bundle = document.getElementById("dlMgrBundle")
|
||||
var label = bundle.getString("showInShellLabel" + key);
|
||||
var accesskey = bundle.getString("showInShellAccesskey" + key);
|
||||
var btn = document.getElementById("btn_showinshell");
|
||||
btn.setAttribute("label", label);
|
||||
btn.setAttribute("accesskey", accesskey);
|
||||
var showBtn = document.getElementById("btn_showinshell");
|
||||
showBtn.setAttribute("label", label);
|
||||
showBtn.setAttribute("accesskey", accesskey);
|
||||
}
|
||||
|
||||
function openPropertiesDialog()
|
||||
|
|
|
@ -1,270 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com> (Original Author)
|
||||
Blake Ross <blaker@netscape.com>
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/"?>
|
||||
<?xml-stylesheet href="chrome://communicator/content/downloadmanager/downloadmanager.css"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % downloadManagerDTD SYSTEM "chrome://communicator/locale/downloadmanager/downloadmanager.ent">
|
||||
%downloadManagerDTD;
|
||||
<!ENTITY % downloadProgressDTD SYSTEM "chrome://global/locale/nsProgressDialog.dtd" >
|
||||
%downloadProgressDTD;
|
||||
]>
|
||||
|
||||
<window id="downloadManager"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
windowtype="Download:Manager"
|
||||
width="600" height="400" screenX="10" screenY="10"
|
||||
persist="width height screenX screenY"
|
||||
title="&downloadManager.title;"
|
||||
onload="Startup();">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
|
||||
<!-- gee, it would be lovely to use outliner, since tree sucks, and its column resizing
|
||||
is totally horked. But outliner doesn't support progressmeter in cells yet. -->
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/treePopups.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsTreeUtils.js"/>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/downloadmanager/downloadmanager.js"/>
|
||||
|
||||
<stringbundle id="dlMgrBundle"
|
||||
src="chrome://communicator/locale/downloadmanager/downloadmanager.properties"/>
|
||||
|
||||
<data id="strings.confirmCancel">&confirmCancel;</data>
|
||||
<data id="strings.progressMsgNoRate">&progressMsgNoRate;</data>
|
||||
<data id="strings.rateMsg">&rateMsg;</data>
|
||||
<data id="strings.completeMsg">&completeMsg;</data>
|
||||
<data id="strings.percentMsg">&percentMsg;</data>
|
||||
<data id="strings.shortTimeFormat">&shortTimeFormat;</data>
|
||||
<data id="strings.longTimeFormat">&longTimeFormat;</data>
|
||||
<data id="strings.unknownTime">&unknownTime;</data>
|
||||
<data id="strings.pausedMsg">&pausedMsg;</data>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="commandUpdate_Downloads"
|
||||
commandupdater="true"
|
||||
events="focus,tree-select"
|
||||
oncommandupdate="downloadViewController.onCommandUpdate()"/>
|
||||
|
||||
<commandset id="downloadCommands">
|
||||
<command id="cmd_properties"
|
||||
oncommand="goDoCommand('cmd_properties');"/>
|
||||
<command id="cmd_pause"
|
||||
oncommand="goDoCommand('cmd_pause');"/>
|
||||
<command id="cmd_cancel"
|
||||
oncommand="goDoCommand('cmd_cancel');"/>
|
||||
<command id="cmd_remove"
|
||||
oncommand="goDoCommand('cmd_remove');"/>
|
||||
<command id="cmd_openfile"
|
||||
oncommand="goDoCommand('cmd_openfile');"/>
|
||||
<command id="cmd_showinshell"
|
||||
oncommand="goDoCommand('cmd_showinshell');"/>
|
||||
</commandset>
|
||||
|
||||
<!-- File Menu -->
|
||||
<command id="cmd_newNavigator"/>
|
||||
<command id="cmd_close" oncommand="close()"/>
|
||||
<command id="cmd_quit"/>
|
||||
|
||||
</commands>
|
||||
|
||||
<keyset id="tasksKeys">
|
||||
<!-- File Menu -->
|
||||
<key id="key_newNavigator"/>
|
||||
<key id="key_close"/>
|
||||
<key id="key_quit"/>
|
||||
|
||||
<!-- These keybindings do not have a command specified in the overlay,
|
||||
which is good, but we need to specify it ourselves here -->
|
||||
<key id="key_selectAll" command="cmd_selectAll"/>
|
||||
|
||||
<key id="key_remove" keycode="VK_DELETE" command="cmd_remove"/>
|
||||
|
||||
<key id="key_properties" key="&cmd.properties.keybinding;"
|
||||
command="cmd_properties" modifiers="accel"/>
|
||||
</keyset>
|
||||
|
||||
<toolbox>
|
||||
<toolbar id="download-toolbar" class="chromeclass-toolbar" persist="collapsed">
|
||||
<toolbarbutton label="&cmd.properties.label;" accesskey="&cmd.properties.accesskey;"
|
||||
command="cmd_properties"/>
|
||||
<toolbarbutton label="&cmd.pause.label;" accesskey="&cmd.pause.accesskey;"
|
||||
command="cmd_pause"/>
|
||||
<toolbarseparator class="toolbarseparator-standard"/>
|
||||
<toolbarbutton label="&cmd.cancel.label;" accesskey="&cmd.cancel.accesskey;"
|
||||
command="cmd_cancel"/>
|
||||
<toolbarbutton label="&cmd.remove.label;" accesskey="&cmd.remove.accesskey;"
|
||||
command="cmd_remove"/>
|
||||
<toolbarseparator class="toolbarseparator-standard"/>
|
||||
<toolbarbutton label="&cmd.openfile.label;" accesskey="&cmd.openfile.accesskey;"
|
||||
command="cmd_openfile"/>
|
||||
<toolbarbutton id="btn_showinshell" command="cmd_showinshell"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<tree id="downloadView" ref="NC:DownloadsRoot"
|
||||
datasources="rdf:null"
|
||||
seltype="multiple" flags="dont-test-empty"
|
||||
ondblclick="return goDoCommand('cmd_properties');"
|
||||
onselect="onSelect(event);"
|
||||
style="height: 0px; width: 0px;" flex="1">
|
||||
|
||||
<treehead>
|
||||
<treerow id="headRow">
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.name.label;"
|
||||
onclick="return TriStateColumnSort('Name');"
|
||||
observes="Name" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.progress.label;"
|
||||
onclick="return TriStateColumnSort('Progress');"
|
||||
observes="Progress" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.progresstext.label;"
|
||||
onclick="return TriStateColumnSort('ProgressPercent');"
|
||||
observes="ProgressText" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.timeremaining.label;"
|
||||
onclick="return TriStateColumnSort('TimeRemaining');"
|
||||
observes="TimeRemaining" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.transferred.label;"
|
||||
onclick="return TriStateColumnSort('Transferred');"
|
||||
observes="Transferred" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.transferrate.label;"
|
||||
onclick="return TriStateColumnSort('TransferRate');"
|
||||
observes="TransferRate" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.timeelapsed.label;"
|
||||
onclick="return TriStateColumnSort('TimeElapsed');"
|
||||
observes="TimeElapsed" />
|
||||
<treecell class="treecell-header sortDirectionIndicator"
|
||||
label="&view.header.source.label;"
|
||||
onclick="return TriStateColumnSort('Source');"
|
||||
observes="Source" />
|
||||
<treecell class="treecell-header treecell-popup-icon" allowevents="true" id="popupCell">
|
||||
<menu align="center" pack="center">
|
||||
<menupopup popupanchor="bottomright" popupalign="topright"
|
||||
onpopupshowing="BuildTreePopup(document.getElementById('theColumns'),
|
||||
document.getElementById('headRow'), this,
|
||||
document.getElementById('popupCell'))"/>
|
||||
</menu>
|
||||
</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*" persist="open" class="download-item"
|
||||
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treecell class="treecell-indent"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
src="moz-icon:rdf:http://home.netscape.com/NC-rdf#File"
|
||||
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
|
||||
<treecell>
|
||||
<downloadstatus state="rdf:http://home.netscape.com/NC-rdf#DownloadState"
|
||||
value="rdf:http://home.netscape.com/NC-rdf#ProgressPercent"
|
||||
statustext="rdf:http://home.netscape.com/NC-rdf#StatusText"
|
||||
mode="normal"/>
|
||||
</treecell>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#ProgressPercent"/>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#TimeRemaining"/>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#Transferred"/>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#TransferRate"/>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#TimeElapsed"/>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#URL"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treechildren flex="1" id="downloadViewChildren" context="dlContext"/>
|
||||
|
||||
<treecolgroup id="theColumns">
|
||||
<treecol id="Name"
|
||||
sortSeparators="true" width="4*" flex="4"
|
||||
persist="width sortActive sortDirection"
|
||||
resource="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="Progress"
|
||||
sortSeparators="true" width="4*" flex="4"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#Progress"
|
||||
resource2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="ProgressPercent" hidden="true"
|
||||
sortSeparators="true" width="4*" flex="4"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#ProgressPercent"
|
||||
resourc2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="TimeRemaining"
|
||||
sortSeparators="true" width="1*" flex="1"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#TimeRemaining"
|
||||
resource2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="Transferred"
|
||||
sortSeparators="true" width="1*" flex="1"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#Transferred"
|
||||
resource2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="TransferRate"
|
||||
sortSeparators="true" width="1*" flex="1"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#TransferRate"
|
||||
resource2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="TimeElapsed"
|
||||
sortSeparators="true" width="1*" flex="1" hidden="true"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#TimeElapsed"
|
||||
resource2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="Source"
|
||||
sortSeparators="true" width="1*" flex="1" hidden="true"
|
||||
persist="width sortActive sortDirection hidden"
|
||||
resource="http://home.netscape.com/NC-rdf#Source"
|
||||
resource2="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<treecol persist="width" fixed="true" width="14" id="PopupColumn"/>
|
||||
</treecolgroup>
|
||||
</tree>
|
||||
|
||||
<statusbar id="status-bar" class="chromeclass-status">
|
||||
<statusbarpanel id="statusbar-text" label="" flex="1"/>
|
||||
</statusbar>
|
||||
|
||||
</window>
|
|
@ -19,8 +19,8 @@
|
|||
<!ENTITY cmd.remove.accesskey "r">
|
||||
<!ENTITY cmd.cancel.label "Cancel">
|
||||
<!ENTITY cmd.cancel.accesskey "c">
|
||||
<!ENTITY cmd.openfile.label "Open File">
|
||||
<!ENTITY cmd.openfile.accesskey "o">
|
||||
<!ENTITY cmd.openfile.label "Launch File">
|
||||
<!ENTITY cmd.openfile.accesskey "L">
|
||||
|
||||
<!ENTITY confirmCancel "Are you sure you want to cancel the saving of this file?">
|
||||
<!ENTITY progressMsgNoRate "#1KB of #2KB">
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<!ENTITY cmd.remove.accesskey "r">
|
||||
<!ENTITY cmd.cancel.label "Cancel">
|
||||
<!ENTITY cmd.cancel.accesskey "c">
|
||||
<!ENTITY cmd.openfile.label "Open File">
|
||||
<!ENTITY cmd.openfile.accesskey "o">
|
||||
<!ENTITY cmd.openfile.label "Launch File">
|
||||
<!ENTITY cmd.openfile.accesskey "L">
|
||||
|
||||
<!ENTITY confirmCancel "Are you sure you want to cancel the saving of this file?">
|
||||
<!ENTITY progressMsgNoRate "#1KB of #2KB">
|
||||
|
|
Загрузка…
Ссылка в новой задаче