blob: 9cdcfa1fd9eb9d20d3acf9aeb91c244c373502fb (
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
<!DOCTYPE HTML>
<!--
-- Copyright (c) 2012 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 i18n-values="dir:textdirection;">
<head>
<if expr="0">
<!-- <if ... /if> is removed while flattening HTML. -->
<base href="">
<script>
// Instruction for enabling loading file manager files remotely (speeds up
// development cycle):
//
// 1. Find the IDR_FILE_MANAGER_MAIN resource in
// chrome/browser/resources/component_extension_resources.grd.
// Change the "flattenhtml" attribute to false.
//
// 2. Build and run the Chromium OS.
//
// 3. Make source files available via the HTTP protocol:
// twistd web --path chrome/browser/resources/ --port 1080
//
// 4. Open the File Manager. Execute the following JS code in its context
// using DevTools:
// localStorage.base = 'http://yourmachine:1080/file_manager/'
//
// This will make the File Manager use fresh JS and CSS files from the
// development machine. HTML files and JS files for WebWorkers would still
// need a rebuild to update.
document.querySelector('base').setAttribute('href', localStorage.base);
</script>
</if>
<!-- metrics.js initiates load performance tracking
so we want to parse it as early as possible -->
<script src="js/metrics.js"></script>
<script>
(function() {
// Switch to 'test harness' mode when loading from a file or http url.
var isHarness = document.location.protocol == 'file:' ||
document.location.protocol == 'http:';
if (isHarness)
document.write('<script src="js/mock_chrome.js"><\57script>');
})();
</script>
<link rel="stylesheet" href="../shared/css/dialogs.css"></link>
<link rel="stylesheet" href="../shared/css/list.css"></link>
<link rel="stylesheet" href="../shared/css/table.css"></link>
<link rel="stylesheet" href="../shared/css/menu.css"></link>
<script src="../shared/js/local_strings.js"></script>
<script src="../shared/js/i18n_template.js"></script>
<script src="../shared/js/event_tracker.js"></script>
<script src="../shared/js/util.js"></script>
<script src="../shared/js/cr.js"></script>
<script src="../shared/js/cr/ui.js"></script>
<script src="../shared/js/cr/event_target.js"></script>
<script src="../shared/js/cr/ui/touch_handler.js"></script>
<script src="../shared/js/cr/ui/array_data_model.js"></script>
<script src="../shared/js/cr/ui/dialogs.js"></script>
<script src="../shared/js/cr/ui/list_item.js"></script>
<script src="../shared/js/cr/ui/list_selection_model.js"></script>
<script src="../shared/js/cr/ui/list_single_selection_model.js"></script>
<script src="../shared/js/cr/ui/list_selection_controller.js"></script>
<script src="../shared/js/cr/ui/list.js"></script>
<script src="../shared/js/cr/ui/splitter.js"></script>
<script src="../shared/js/cr/ui/table/table_splitter.js"></script>
<script src="../shared/js/cr/ui/table/table_column.js"></script>
<script src="../shared/js/cr/ui/table/table_column_model.js"></script>
<script src="../shared/js/cr/ui/table/table_header.js"></script>
<script src="../shared/js/cr/ui/table/table_list.js"></script>
<script src="../shared/js/cr/ui/table.js"></script>
<script src="../shared/js/cr/ui/grid.js"></script>
<script src="../shared/js/cr/ui/command.js"></script>
<script src="../shared/js/cr/ui/position_util.js"></script>
<script src="../shared/js/cr/ui/menu_item.js"></script>
<script src="../shared/js/cr/ui/menu.js"></script>
<script src="../shared/js/cr/ui/context_menu_handler.js"></script>
<script src="js/combobutton.js"></script>
<link rel="stylesheet" href="css/combobutton.css"></link>
<link rel="stylesheet" href="css/file_manager.css"></link>
<link rel="stylesheet" href="css/common.css"></link>
<script src="js/util.js"></script>
<script src="js/directory_model.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/file_type.js"></script>
<script src="js/main.js"></script>
<script src="js/metadata/metadata_provider.js"></script>
<!-- For accurate load performance tracking
place all scripts above this line -->
<script>
metrics.recordInterval('Load.Script');
</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>✇</title>
</head>
<body i18n-values=".style.fontFamily:WEB_FONT_FAMILY;
.style.fontSize:WEB_FONT_SIZE">
<commands>
<command id="cut" i18n-values="label:CUT_BUTTON_LABEL"></command>
<command id="copy" i18n-values="label:COPY_BUTTON_LABEL"></command>
<command id="paste" i18n-values="label:PASTE_BUTTON_LABEL"></command>
<command id="rename" i18n-values="label:RENAME_BUTTON_LABEL"></command>
<command id="delete" i18n-values="label:DELETE_BUTTON_LABEL"></command>
<command id="newfolder" i18n-values="label:NEW_FOLDER_BUTTON_LABEL"></command>
</commands>
<menu class=file-context-menu>
<menuitem command='#cut'></menuitem>
<menuitem command='#copy'></menuitem>
<menuitem command='#paste'></menuitem>
<hr>
<menuitem command='#rename'></menuitem>
<menuitem command='#delete'></menuitem>
<hr visibleif='this.dialogType_ == "saveas-file" ||
this.dialogType_ == "full-page"'>
<menuitem command='#newfolder'
visibleif='this.dialogType_ == "saveas-file" ||
this.dialogType_ == "full-page"'></menuitem>
</menu>
<!-- TODO(bshe): Remove isAura flag after all chromeos use aura. -->
<if expr="pp_ifdef('use_aura')">
<script>FileManager.prototype.isAura_ = true;</script>
</if>
<if expr="not pp_ifdef('use_aura')">
<!-- When loading directly from disk, isAura flag also sets to false
-- because the preprocessor is ignored. It should be fine for now. The
-- div title still shows in this case. It resembles the look of file
-- dialog in chromeos non aura builds. After all chromeos switches to
-- aura, we should use !cr.isChromeOS in the visibleif condition. Since
-- aura has its own window frame, we do not want to have this title div
-- visiable in aura.
-->
<script>FileManager.prototype.isAura_ = false;</script>
</if>
<div class=dialog-title visibleif='this.dialogType_ != "full-page" &&
!this.isAura_'>[TITLE]</div>
<div class=dialog-container>
<div class=dialog-sidebar>
<div class=close-sidebar tabindex=0 role="button"></div>
<list class=roots-list></list>
</div>
<div class=dialog-main>
<div class=dialog-header>
<div class=open-sidebar tabindex=0 role="button"></div>
<div class=breadcrumbs></div>
<!-- The outter div is a hack to remove margin between buttons. -->
<div><button class="detail-view" tabindex="4" disabled></button></div>
<div><button class="thumbnail-view" tabindex="5"></button></div>
</div>
<div class=dialog-body>
<div class=filelist-panel>
<div class=list-container>
<div class=detail-table tabindex=0></div>
<grid class=thumbnail-grid tabindex=0></grid>
<div class=spinner></div>
</div>
<div class=downloads-warning hidden>
<img src=images/warning_icon_square_26x26.png>
<div></div>
</div>
</div>
<div class=preview-panel visibility=hidden>
<div><div class=preview-thumbnails></div></div>
<div><div class=preview-summary></div></div>
<div class=spacer></div>
<div class=tasks></div>
<div class='delete-button cr-button task-item' command='#delete'
role="button" tabindex=0
onclick='fileManager.deleteEntries(
fileManager.selection.entries, false)'
onkeypress='if (event.keyCode == 13 ||
event.keyCode == 32) {
fileManager.deleteEntries(
fileManager.selection.entries, false);}'
visibleif='this.dialogType_ == "full-page"'
><img src='images/button-icon-delete.png'
><div i18n-content=DELETE_BUTTON_LABEL></div
></div>
</div>
</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>
<div class="butter-bar before-show">
<div class="content">
<div class="butter-message"></div>
<div class="progress-bar hide-in-butter">
<div class="progress-track"></div>
</div>
</div>
<div class="actions hide-in-butter"></div>
</div>
<script>init();</script>
</body>
</html>
|