summaryrefslogtreecommitdiffstats
path: root/browser/components/downloads/content/downloadsPanel.inc.xhtml
blob: 66b77b24978ed7de1fe32f8fb06607fb547ca9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<commandset commandupdater="true" events="richlistbox-select"
            oncommandupdate="goUpdateCommand('cmd_delete');">
  <command id="downloadsCmd_doDefault"
           oncommand="goDoCommand('downloadsCmd_doDefault')"/>
  <command id="downloadsCmd_pauseResume"
           oncommand="goDoCommand('downloadsCmd_pauseResume')"/>
  <command id="downloadsCmd_cancel"
           oncommand="goDoCommand('downloadsCmd_cancel')"/>
  <command id="downloadsCmd_unblock"
           oncommand="goDoCommand('downloadsCmd_unblock')"/>
  <command id="downloadsCmd_chooseUnblock"
           oncommand="goDoCommand('downloadsCmd_chooseUnblock')"/>
  <command id="downloadsCmd_unblockAndOpen"
           oncommand="goDoCommand('downloadsCmd_unblockAndOpen')"/>
  <command id="downloadsCmd_unblockAndSave"
           oncommand="goDoCommand('downloadsCmd_unblockAndSave')"/>
  <command id="downloadsCmd_confirmBlock"
           oncommand="goDoCommand('downloadsCmd_confirmBlock')"/>
  <command id="downloadsCmd_open"
           oncommand="goDoCommand('downloadsCmd_open')"/>
  <command id="downloadsCmd_open:current"
           oncommand="goDoCommand('downloadsCmd_open:current')"/>
  <command id="downloadsCmd_open:tab"
           oncommand="goDoCommand('downloadsCmd_open:tab')"/>
  <command id="downloadsCmd_open:tabshifted"
           oncommand="goDoCommand('downloadsCmd_open:tabshifted')"/>
  <command id="downloadsCmd_open:window"
           oncommand="goDoCommand('downloadsCmd_open:window')"/>
  <command id="downloadsCmd_show"
           oncommand="goDoCommand('downloadsCmd_show')"/>
  <command id="downloadsCmd_retry"
           oncommand="goDoCommand('downloadsCmd_retry')"/>
  <command id="downloadsCmd_openReferrer"
           oncommand="goDoCommand('downloadsCmd_openReferrer')"/>
  <command id="downloadsCmd_copyLocation"
           oncommand="goDoCommand('downloadsCmd_copyLocation')"/>
  <command id="downloadsCmd_clearList"
           oncommand="goDoCommand('downloadsCmd_clearList')"/>
  <command id="downloadsCmd_openInSystemViewer"
           oncommand="goDoCommand('downloadsCmd_openInSystemViewer')"/>
  <command id="downloadsCmd_alwaysOpenInSystemViewer"
           oncommand="goDoCommand('downloadsCmd_alwaysOpenInSystemViewer')"/>
  <command id="downloadsCmd_alwaysOpenSimilarFiles"
           oncommand="goDoCommand('downloadsCmd_alwaysOpenSimilarFiles')"/>
  <command id="downloadsCmd_deleteFile"
           oncommand="goDoCommand('downloadsCmd_deleteFile')"/>
</commandset>

<!-- For accessibility to screen readers, we use a label on the panel instead
  of the anchor because the panel can also be displayed without an anchor. -->
<panel id="downloadsPanel"
       data-l10n-id="downloads-panel"
       class="cui-widget-panel panel-no-padding"
       role="group"
       type="arrow"
       orient="vertical"
       onpopupshown="DownloadsPanel.onPopupShown(event);"
       onpopuphidden="DownloadsPanel.onPopupHidden(event);"
       hidden="true">

  <linkset>
    <html:link rel="localization" href="browser/downloads.ftl" />
  </linkset>

  <!-- The following popup menu should be a child of the panel element,
       otherwise flickering may occur when the cursor is moved over the area
       of a disabled menu item that overlaps the panel.  See bug 492960. -->
  <menupopup id="downloadsContextMenu"
             class="download-state">
    <menuitem command="downloadsCmd_pauseResume"
              class="downloadPauseMenuItem"
              data-l10n-id="downloads-cmd-pause"/>
    <menuitem command="downloadsCmd_pauseResume"
              class="downloadResumeMenuItem"
              data-l10n-id="downloads-cmd-resume"/>
    <menuitem command="downloadsCmd_unblock"
              class="downloadUnblockMenuItem"
              data-l10n-id="downloads-cmd-unblock"/>
    <menuitem command="downloadsCmd_openInSystemViewer"
              class="downloadUseSystemDefaultMenuItem"
              data-l10n-id="downloads-cmd-use-system-default"/>
    <menuitem command="downloadsCmd_alwaysOpenInSystemViewer"
              type="checkbox"
              class="downloadAlwaysUseSystemDefaultMenuItem"
              data-l10n-id="downloads-cmd-always-use-system-default"/>
    <menuitem command="downloadsCmd_alwaysOpenSimilarFiles"
              type="checkbox"
              class="downloadAlwaysOpenSimilarFilesMenuItem"
              data-l10n-id="downloads-cmd-always-open-similar-files"/>
    <menuitem command="downloadsCmd_show"
              class="downloadShowMenuItem"
              data-l10n-id="downloads-cmd-show-menuitem-2"/>

    <menuseparator class="downloadCommandsSeparator"/>

    <menuitem command="downloadsCmd_openReferrer"
              class="downloadOpenReferrerMenuItem"
              data-l10n-id="downloads-cmd-go-to-download-page"/>
    <menuitem command="downloadsCmd_copyLocation"
              class="downloadCopyLocationMenuItem"
              data-l10n-id="downloads-cmd-copy-download-link"/>

    <menuseparator/>

    <menuitem command="downloadsCmd_deleteFile"
              class="downloadDeleteFileMenuItem"
              data-l10n-id="downloads-cmd-delete-file"/>
    <menuitem command="cmd_delete"
              class="downloadRemoveFromHistoryMenuItem"
              data-l10n-id="downloads-cmd-remove-from-history"/>
    <menuitem command="downloadsCmd_clearList"
              data-l10n-id="downloads-cmd-clear-list"/>
    <menuitem command="downloadsCmd_clearDownloads"
              hidden="true"
              data-l10n-id="downloads-cmd-clear-downloads"/>
  </menupopup>

  <panelmultiview id="downloadsPanel-multiView"
                  mainViewId="downloadsPanel-mainView"
                  disablekeynav="true">

    <panelview id="downloadsPanel-mainView">
      <vbox class="panel-view-body-unscrollable">
        <richlistbox id="downloadsListBox"
                     data-l10n-id="downloads-panel-items"
                     data-l10n-attrs="style"
                     context="downloadsContextMenu"
                     onmouseover="DownloadsView.onDownloadMouseOver(event);"
                     onmouseout="DownloadsView.onDownloadMouseOut(event);"
                     oncontextmenu="DownloadsView.onDownloadContextMenu(event);"
                     ondragstart="DownloadsView.onDownloadDragStart(event);"/>
        <description id="emptyDownloads"
                     data-l10n-id="downloads-panel-empty"/>
      </vbox>
      <vbox id="downloadsFooter">
        <stack>
          <hbox id="downloadsSummary"
                align="center"
                orient="horizontal"
                onkeydown="DownloadsSummary.onKeyDown(event);"
                onclick="DownloadsSummary.onClick(event);">
            <image class="downloadTypeIcon" />
            <vbox pack="center"
                  flex="1"
                  class="downloadContainer">
              <description id="downloadsSummaryDescription"/>
              <html:progress id="downloadsSummaryProgress"
                             class="downloadProgress"
                             max="100"/>
              <description id="downloadsSummaryDetails"
                           crop="end"/>
            </vbox>
          </hbox>
          <vbox id="downloadsFooterButtons">
            <toolbarseparator />
            <button id="downloadsHistory"
                    data-l10n-id="downloads-history"
                    class="downloadsPanelFooterButton subviewbutton panel-subview-footer-button toolbarbutton-1"
                    flex="1"
                    oncommand="DownloadsPanel.showDownloadsHistory();"
                    pack="start"/>
          </vbox>
        </stack>
      </vbox>
    </panelview>

    <panelview id="downloadsPanel-blockedSubview"
               data-l10n-id="downloads-details"
               class="PanelUI-subView">
      <vbox class="panel-view-body-unscrollable">
        <hbox class="downloadsPanel-blockedSubview-title-box">
          <description id="downloadsPanel-blockedSubview-title"/>
          <image class="downloadsPanel-blockedSubview-image"/>
        </hbox>
        <description id="downloadsPanel-blockedSubview-details1"/>
        <description id="downloadsPanel-blockedSubview-details2"/>
      </vbox>
      <html:moz-button-group id="downloadsPanel-blockedSubview-buttons"
            class="panel-footer">
        <button id="downloadsPanel-blockedSubview-unblockButton"
                class="footer-button"
                command="downloadsCmd_unblockAndOpen"/>
        <button id="downloadsPanel-blockedSubview-deleteButton"
                class="footer-button"
                oncommand="DownloadsBlockedSubview.confirmBlock();"
                default="true"/>
      </html:moz-button-group>
    </panelview>
  </panelmultiview>

</panel>