summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/file_manager/main.html
blob: c22aad8346b0558ec707165b010c9c2484c112a6 (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
<!DOCTYPE HTML>
<!--
  -- Copyright (c) 2011 The Chromium Authors. All rights reserved.
  -- Use of this source code is governed by a BSD-style license that can be
  -- found in the LICENSE file.
  -->
<html>
  <head>
    <script>
      // Resources from shared locations are loaded dynamically, so we can
      // get them from file:// when running as a normal web page, and from
      // chrome://resources/ when compiled directly into chrome.
      var css =
      ['list.css',
       'table.css',
       'menu.css'
      ];

      var script =
      ['local_strings.js',
       'i18n_template.js',

       'cr.js',
       'cr/ui.js',
       'cr/event_target.js',
       'cr/ui/array_data_model.js',
       'cr/ui/list_item.js',
       'cr/ui/list_selection_model.js',
       'cr/ui/list_single_selection_model.js',
       'cr/ui/list_selection_controller.js',
       'cr/ui/list.js',

       'cr/ui/splitter.js',
       'cr/ui/table/table_splitter.js',

       'cr/ui/table/table_column.js',
       'cr/ui/table/table_column_model.js',
       'cr/ui/table/table_header.js',
       'cr/ui/table/table_list.js',
       'cr/ui/table.js',

       'cr/ui/grid.js',

       'cr/ui/command.js',
       'cr/ui/position_util.js',
       'cr/ui/menu_item.js',
       'cr/ui/menu.js',
       'cr/ui/context_menu_handler.js',
      ];

      (function() {
        // Switch to 'test harness' mode when loading from a file or http url.
        var isHarness = document.location.protocol == 'file:' ||
                        document.location.protocol == 'http:';

        // In test harness mode we load resources from relative dirs.
        var prefix = isHarness ? '../shared/' : 'chrome://resources/';

        for (var i = 0; i < css.length; ++i) {
          document.write('<link href="' + prefix + 'css/' + css[i] +
                         '" rel="stylesheet"></link>');
        }

        for (var i = 0; i < script.length; ++i) {
          document.write('<script src="' + prefix + 'js/' + script[i] +
                         '"><\57script>');
        }

        if (isHarness)
          document.write('<script src="js/mock_chrome.js"><\57script>');
     })();

    </script>

    <link rel="stylesheet" href="css/file_manager.css"></link>
    <link rel="stylesheet" href="css/dialogs.css"></link>

    <script src="js/util.js"></script>
    <script src="js/file_copy_manager.js"></script>
    <script src="js/file_manager.js"></script>
    <script src="js/file_manager_pyauto.js"></script>
    <script src="js/dialogs.js"></script>
    <script src="js/main.js"></script>
    <script src="js/metadata_provider.js"></script>

    <!-- We have to set some default title, or chrome will use the page
      -- name.  As soon as we init and change to a directory, we'll use
      -- the directory as the page title.  Until then, have a unicode glyph
      -- of a tape reel.
      -->
    <title>&#x2707;</title>
  </head>
  <body i18n-values=".style.fontFamily:WEB_FONT_FAMILY;
                     .style.fontSize:WEB_FONT_SIZE">
    <commands>
      <command id="cut"></command>
      <command id="copy"></command>
      <command id="paste"></command>
      <command id="rename"></command>
      <command id="delete"></command>
    </commands>

    <menu class=file-context-menu>
      <menuitem i18n-content=CUT_BUTTON_LABEL command='#cut'></menuitem>
      <menuitem i18n-content=COPY_BUTTON_LABEL command='#copy'></menuitem>
      <menuitem i18n-content=PASTE_BUTTON_LABEL command='#paste'></menuitem>
      <hr>
      <menuitem i18n-content=RENAME_BUTTON_LABEL command='#rename'></menuitem>
      <menuitem i18n-content=DELETE_BUTTON_LABEL command='#delete'></menuitem>
    </menu>

    <div class=dialog-title visibleif='this.dialogType_ != "full-page"'
         >[TITLE]</div>
    <div class=dialog-header>
      <div class=breadcrumbs></div>
      <button class=detail-view tabindex=4
              ><img src='images/icon-detail-view.png'></button
      ><button class=thumbnail-view tabindex=5
              ><img src='images/icon-thumb-view.png'></button>
      <button i18n-content=NEW_FOLDER_BUTTON_LABEL class='new-folder'
              tabindex=6
              visibleif='this.dialogType_ == "saveas-file" ||
                         this.dialogType_ == "full-page"'
              ></button>
    </div>
    <div class=dialog-body>
      <div class=left-column>
        <div class=list-container>
          <div class=detail-table tabindex=0></div>
          <grid class=thumbnail-grid tabindex=0></grid>
        </div>
        <div class=downloads-warning>
          <img src=images/warning_icon_square_26x26.png>
          <div></div>
        </div>
      </div>
      <div class=preview-container>
        <div class=table-header style='width:100%'>
          <div class=table-header-cell>
            <div class='preview-label table-header-label'
                 i18n-content=PREVIEW_COLUMN_LABEL>[PREVIEW]</div>
          </div>
        </div>
        <center><img class=preview-img></center>
        <div class=preview-filename></div>
        <div class="preview-metadata">
            <table class="preview-metadata-table">
            </table>
        </div>
        <div class=vertical-spacer></div>
        <div class=task-buttons></div>
        <div class=clipboard-status>
          <div class=clipboard-buttons>
            <button class='clipboard-copy' command='#copy'
                    onclick='fileManager.copySelectionToClipboard()'
                    visibleif='this.dialogType_ == "full-page"'
               ><img src='images/button-icon-copy.png'
                ><span i18n-content=COPY_BUTTON_LABEL></span
            ></button>
            <button class='clipboard-paste' command='#paste'
                    onclick='fileManager.pasteFromClipboard()'
                    visibleif='this.dialogType_ == "full-page"'
               ><img src='images/button-icon-paste.png'
                ><span i18n-content=PASTE_BUTTON_LABEL></span
            ></button>
          </div>
        </div>
        <div class=preview-summary></div>
      </div>
    </div>
    <div class=dialog-footer visibleif='this.dialogType_ != "full-page"'>
      <div class=filename-label i18n-content=FILENAME_LABEL
           visibleif='this.dialogType_ == "saveas-file"'
           >[FILENAME]</div>
      <input type=text class=filename-input spellcheck=false
             tabindex=1
             visibleif='this.dialogType_ == "saveas-file"'>
      <div class=horizontal-spacer></div>
      <button class=ok disabled tabindex=2>[OK]</button>
      <button class=cancel tabindex=3 i18n-content=CANCEL_LABEL
              >[CANCEL]</button>
    </div>

    <script>init();</script>
  </body>
</html>