OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <!-- | 2 <!-- |
3 -- Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 -- Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 -- Use of this source code is governed by a BSD-style license that can be | 4 -- Use of this source code is governed by a BSD-style license that can be |
5 -- found in the LICENSE file. | 5 -- found in the LICENSE file. |
6 --> | 6 --> |
7 <html i18n-values="dir:textdirection;"> | 7 <html i18n-values="dir:textdirection;"> |
8 <head> | 8 <head> |
9 <if expr="0"> | 9 <!-- We have to set some default title, or chrome will use the page name. |
10 <!-- <if ... /if> is removed while flattening HTML. --> | 10 -- As soon as we init and change to a directory, we'll show the directory |
11 <base href=""> | 11 -- path. Until then, use an invisible non-whitespace character. |
12 <script> | 12 --> |
13 // Instruction for enabling loading file manager files remotely (speeds up | 13 <title></title> |
14 // development cycle): | |
15 // | |
16 // 1. Find the IDR_FILE_MANAGER_MAIN resource in | |
17 // chrome/browser/resources/component_extension_resources.grd. | |
18 // Change the "flattenhtml" attribute to false. | |
19 // | |
20 // 2. Build and run the Chromium OS. | |
21 // | |
22 // 3. Make source files available via the HTTP protocol: | |
23 // twistd web --path chrome/browser/resources/ --port 1080 | |
24 // | |
25 // 4. Open the File Manager. Execute the following JS code in its context | |
26 // using DevTools: | |
27 // localStorage.base = 'http://yourmachine:1080/file_manager/' | |
28 // | |
29 // This will make the File Manager use fresh JS and CSS files from the | |
30 // development machine. HTML files and JS files for WebWorkers would still | |
31 // need a rebuild to update. | |
32 | |
33 document.querySelector('base').setAttribute('href', localStorage.base); | |
34 </script> | |
35 </if> | |
36 <!-- metrics.js initiates load performance tracking | |
37 so we want to parse it as early as possible --> | |
38 <script src="js/metrics.js"></script> | |
39 <script> | |
40 (function() { | |
41 // Switch to 'test harness' mode when loading from a file or http url. | |
42 var isHarness = document.location.protocol == 'file:' || | |
43 document.location.protocol == 'http:'; | |
44 | |
45 if (isHarness) | |
46 document.write('<script src="js/mock_chrome.js"><\57script>'); | |
47 })(); | |
48 | |
49 </script> | |
50 | |
51 <link rel="stylesheet" href="../shared/css/dialogs.css"></link> | 14 <link rel="stylesheet" href="../shared/css/dialogs.css"></link> |
52 <link rel="stylesheet" href="../shared/css/list.css"></link> | 15 <link rel="stylesheet" href="../shared/css/list.css"></link> |
53 <link rel="stylesheet" href="../shared/css/table.css"></link> | 16 <link rel="stylesheet" href="../shared/css/table.css"></link> |
54 <link rel="stylesheet" href="../shared/css/menu.css"></link> | 17 <link rel="stylesheet" href="../shared/css/menu.css"></link> |
55 | 18 |
56 <script src="../shared/js/local_strings.js"></script> | |
57 <script src="../shared/js/util.js"></script> | |
58 <script src="../shared/js/i18n_template.js"></script> | |
59 | |
60 <script src="../shared/js/event_tracker.js"></script> | |
61 <script src="../shared/js/cr.js"></script> | |
62 <script src="../shared/js/event_tracker.js"></script> | |
63 <script src="../shared/js/cr/ui.js"></script> | |
64 <script src="../shared/js/cr/event_target.js"></script> | |
65 <script src="../shared/js/cr/ui/touch_handler.js"></script> | |
66 <script src="../shared/js/cr/ui/array_data_model.js"></script> | |
67 <script src="../shared/js/cr/ui/dialogs.js"></script> | |
68 <script src="../shared/js/cr/ui/list_item.js"></script> | |
69 <script src="../shared/js/cr/ui/list_selection_model.js"></script> | |
70 <script src="../shared/js/cr/ui/list_single_selection_model.js"></script> | |
71 <script src="../shared/js/cr/ui/list_selection_controller.js"></script> | |
72 <script src="../shared/js/cr/ui/list.js"></script> | |
73 | |
74 <script src="../shared/js/cr/ui/splitter.js"></script> | |
75 <script src="../shared/js/cr/ui/table/table_splitter.js"></script> | |
76 | |
77 <script src="../shared/js/cr/ui/table/table_column.js"></script> | |
78 <script src="../shared/js/cr/ui/table/table_column_model.js"></script> | |
79 <script src="../shared/js/cr/ui/table/table_header.js"></script> | |
80 <script src="../shared/js/cr/ui/table/table_list.js"></script> | |
81 <script src="../shared/js/cr/ui/table.js"></script> | |
82 | |
83 <script src="../shared/js/cr/ui/grid.js"></script> | |
84 | |
85 <script src="../shared/js/cr/ui/command.js"></script> | |
86 <script src="../shared/js/cr/ui/position_util.js"></script> | |
87 <script src="../shared/js/cr/ui/menu_item.js"></script> | |
88 <script src="../shared/js/cr/ui/menu.js"></script> | |
89 <script src="../shared/js/cr/ui/menu_button.js"></script> | |
90 <script src="../shared/js/cr/ui/context_menu_handler.js"></script> | |
91 | |
92 <script src="js/combobutton.js"></script> | |
93 <link rel="stylesheet" href="css/combobutton.css"></link> | 19 <link rel="stylesheet" href="css/combobutton.css"></link> |
94 | |
95 <link rel="stylesheet" href="css/file_manager.css"></link> | 20 <link rel="stylesheet" href="css/file_manager.css"></link> |
96 <link rel="stylesheet" href="css/common.css"></link> | 21 <link rel="stylesheet" href="css/common.css"></link> |
97 | 22 |
98 <script src="js/util.js"></script> | 23 <script src="js/main_scripts.js"></script> |
99 <script src="js/directory_model.js"></script> | |
100 <script src="js/file_copy_manager.js"></script> | |
101 <script src="js/file_transfer_controller.js"></script> | |
102 <script src="js/file_manager.js"></script> | |
103 <script src="js/file_manager_pyauto.js"></script> | |
104 <script src="js/file_type.js"></script> | |
105 <script src="js/main.js"></script> | |
106 <script src="js/metadata/metadata_provider.js"></script> | |
107 | 24 |
108 <!-- For accurate load performance tracking | 25 <if expr="0"> |
109 place all scripts above this line --> | 26 <!-- This file has not been flattened, load individual scripts. |
110 <script> | 27 Keep the list in sync with js/main_scripts.js. --> |
111 metrics.recordInterval('Load.Script'); | 28 |
112 </script> | 29 <!-- metrics.js initiates load performance tracking |
113 | 30 so we want to parse it as early as possible --> |
114 <!-- We have to set some default title, or chrome will use the page | 31 <script src="js/metrics.js"></script> |
115 -- name. As soon as we init and change to a directory, we'll use | 32 |
116 -- the directory as the page title. Until then, have a unicode glyph | 33 <script src="../shared/js/local_strings.js"></script> |
117 -- of a tape reel. | 34 <script src="../shared/js/util.js"></script> |
118 --> | 35 <script src="../shared/js/i18n_template.js"></script> |
119 <title></title> | 36 |
| 37 <script src="../shared/js/cr.js"></script> |
| 38 <script src="../shared/js/event_tracker.js"></script> |
| 39 <script src="../shared/js/cr/ui.js"></script> |
| 40 <script src="../shared/js/cr/event_target.js"></script> |
| 41 <script src="../shared/js/cr/ui/touch_handler.js"></script> |
| 42 <script src="../shared/js/cr/ui/array_data_model.js"></script> |
| 43 <script src="../shared/js/cr/ui/dialogs.js"></script> |
| 44 <script src="../shared/js/cr/ui/list_item.js"></script> |
| 45 <script src="../shared/js/cr/ui/list_selection_model.js"></script> |
| 46 <script src="../shared/js/cr/ui/list_single_selection_model.js"></script> |
| 47 <script src="../shared/js/cr/ui/list_selection_controller.js"></script> |
| 48 <script src="../shared/js/cr/ui/list.js"></script> |
| 49 |
| 50 <script src="../shared/js/cr/ui/splitter.js"></script> |
| 51 <script src="../shared/js/cr/ui/table/table_splitter.js"></script> |
| 52 |
| 53 <script src="../shared/js/cr/ui/table/table_column.js"></script> |
| 54 <script src="../shared/js/cr/ui/table/table_column_model.js"></script> |
| 55 <script src="../shared/js/cr/ui/table/table_header.js"></script> |
| 56 <script src="../shared/js/cr/ui/table/table_list.js"></script> |
| 57 <script src="../shared/js/cr/ui/table.js"></script> |
| 58 |
| 59 <script src="../shared/js/cr/ui/grid.js"></script> |
| 60 |
| 61 <script src="../shared/js/cr/ui/command.js"></script> |
| 62 <script src="../shared/js/cr/ui/position_util.js"></script> |
| 63 <script src="../shared/js/cr/ui/menu_item.js"></script> |
| 64 <script src="../shared/js/cr/ui/menu.js"></script> |
| 65 <script src="../shared/js/cr/ui/menu_button.js"></script> |
| 66 <script src="../shared/js/cr/ui/context_menu_handler.js"></script> |
| 67 |
| 68 <script src="js/combobutton.js"></script> |
| 69 |
| 70 <script src="js/util.js"></script> |
| 71 <script src="js/directory_model.js"></script> |
| 72 <script src="js/file_copy_manager.js"></script> |
| 73 <script src="js/file_manager.js"></script> |
| 74 <script src="js/file_manager_pyauto.js"></script> |
| 75 <script src="js/file_transfer_controller.js"></script> |
| 76 <script src="js/file_type.js"></script> |
| 77 <script src="js/metadata/metadata_provider.js"></script> |
| 78 <!-- For accurate load performance tracking main.js should be |
| 79 the last script to include. --> |
| 80 <script src="js/main.js"></script> |
| 81 </if> |
| 82 |
120 </head> | 83 </head> |
121 <body i18n-values=".style.fontFamily:WEB_FONT_FAMILY; | 84 <body i18n-values=".style.fontFamily:WEB_FONT_FAMILY; |
122 .style.fontSize:WEB_FONT_SIZE"> | 85 .style.fontSize:WEB_FONT_SIZE"> |
123 <commands> | 86 <commands> |
124 <command id="cut" i18n-values="label:CUT_BUTTON_LABEL"></command> | 87 <command id="cut" i18n-values="label:CUT_BUTTON_LABEL"></command> |
125 <command id="copy" i18n-values="label:COPY_BUTTON_LABEL"></command> | 88 <command id="copy" i18n-values="label:COPY_BUTTON_LABEL"></command> |
126 <command id="paste" i18n-values="label:PASTE_BUTTON_LABEL"></command> | 89 <command id="paste" i18n-values="label:PASTE_BUTTON_LABEL"></command> |
127 <command id="rename" i18n-values="label:RENAME_BUTTON_LABEL"></command> | 90 <command id="rename" i18n-values="label:RENAME_BUTTON_LABEL"></command> |
128 <command id="delete" i18n-values="label:DELETE_BUTTON_LABEL"></command> | 91 <command id="delete" i18n-values="label:DELETE_BUTTON_LABEL"></command> |
129 <command id="newfolder" i18n-values="label:NEW_FOLDER_BUTTON_LABEL" | 92 <command id="newfolder" i18n-values="label:NEW_FOLDER_BUTTON_LABEL" |
130 ></command> | 93 ></command> |
131 | 94 |
132 <command id="unmount" i18n-values="label:UNMOUNT_DEVICE_BUTTON_LABEL" | 95 <command id="unmount" i18n-values="label:UNMOUNT_DEVICE_BUTTON_LABEL" |
133 ></command> | 96 ></command> |
134 <command id="format" i18n-values="label:FORMAT_DEVICE_BUTTON_LABEL" | 97 <command id="format" i18n-values="label:FORMAT_DEVICE_BUTTON_LABEL" |
135 ></command> | 98 ></command> |
136 </commands> | 99 </commands> |
137 | 100 |
138 <menu class=file-context-menu> | 101 <menu class=file-context-menu> |
139 <menuitem command='#cut' visibleif='this.dialogType_ == | 102 <menuitem command='#cut' visibleif='full-page'></menuitem> |
140 "full-page"'></menuitem> | 103 <menuitem command='#copy' visibleif='full-page'></menuitem> |
141 <menuitem command='#copy' visibleif='this.dialogType_ == | 104 <menuitem command='#paste' visibleif='full-page'></menuitem> |
142 "full-page"'></menuitem> | 105 <hr visibleif='full-page'> |
143 <menuitem command='#paste'visibleif='this.dialogType_ == | |
144 "full-page"'></menuitem> | |
145 <hr visibleif='this.dialogType_ == "full-page"'> | |
146 <menuitem command='#rename'></menuitem> | 106 <menuitem command='#rename'></menuitem> |
147 <menuitem command='#delete'></menuitem> | 107 <menuitem command='#delete'></menuitem> |
148 <hr visibleif='this.dialogType_ == "saveas-file" || | 108 <hr visibleif='saveas-file full-page'> |
149 this.dialogType_ == "full-page"'> | |
150 <menuitem command='#newfolder' | 109 <menuitem command='#newfolder' |
151 visibleif='this.dialogType_ == "saveas-file" || | 110 visibleif='saveas-file full-page'></menuitem> |
152 this.dialogType_ == "full-page"'></menuitem> | |
153 </menu> | 111 </menu> |
154 | 112 |
155 <menu class=roots-context-menu> | 113 <menu class=roots-context-menu> |
156 <menuitem command='#unmount'></menuitem> | 114 <menuitem command='#unmount'></menuitem> |
157 <menuitem command='#format'></menuitem> | 115 <menuitem command='#format'></menuitem> |
158 </menu> | 116 </menu> |
159 | 117 |
160 <menu id=docs-settings> | 118 <menu id=docs-settings> |
161 <menuitem id=gdata-sync-settings | 119 <menuitem id=gdata-sync-settings |
162 i18n-content=GDATA_MOBILE_CONNECTION_OPTION></menuitem> | 120 i18n-content=GDATA_MOBILE_CONNECTION_OPTION></menuitem> |
163 <menuitem id=gdata-hosted-settings | 121 <menuitem id=gdata-hosted-settings |
164 i18n-content=GDATA_SHOW_HOSTED_FILES_OPTION></menuitem> | 122 i18n-content=GDATA_SHOW_HOSTED_FILES_OPTION></menuitem> |
165 </menu> | 123 </menu> |
166 | 124 |
167 <!-- TODO(bshe): Remove isAura flag after all chromeos use aura. --> | 125 <div class=dialog-title invisibleif='full-page'>[TITLE]</div> |
168 <if expr="pp_ifdef('use_aura')"> | |
169 <script>FileManager.prototype.isAura_ = true;</script> | |
170 </if> | |
171 <if expr="not pp_ifdef('use_aura')"> | |
172 <!-- When loading directly from disk, isAura flag also sets to false | |
173 -- because the preprocessor is ignored. It should be fine for now. The | |
174 -- div title still shows in this case. It resembles the look of file | |
175 -- dialog in chromeos non aura builds. After all chromeos switches to | |
176 -- aura, we should use !cr.isChromeOS in the visibleif condition. Since | |
177 -- aura has its own window frame, we do not want to have this title div | |
178 -- visiable in aura. | |
179 --> | |
180 <script>FileManager.prototype.isAura_ = false;</script> | |
181 </if> | |
182 <div class=dialog-title visibleif='this.dialogType_ != "full-page" && | |
183 !this.isAura_'>[TITLE]</div> | |
184 <div class=dialog-container sidebar=sidebar> | 126 <div class=dialog-container sidebar=sidebar> |
185 <div class=dialog-sidebar> | 127 <div class=dialog-sidebar> |
186 <div class=close-sidebar tabindex=0 role="button"></div> | 128 <div class=close-sidebar tabindex=0 role="button"></div> |
187 <list class=roots-list></list> | 129 <list class=roots-list></list> |
188 </div> | 130 </div> |
189 <div class=dialog-main> | 131 <div class=dialog-main> |
190 <div class=dialog-header> | 132 <div class=dialog-header> |
191 <div class=open-sidebar tabindex=0 role="button"></div> | 133 <div class=open-sidebar tabindex=0 role="button"></div> |
192 <div class=breadcrumbs></div> | 134 <div class=breadcrumbs></div> |
193 <div class=detail-view role=button tabindex=4 disabled></div> | 135 <div class=detail-view role=button tabindex=4 disabled></div> |
194 <div class=thumbnail-view role=button tabindex=5></div> | 136 <div class=thumbnail-view role=button tabindex=5></div> |
195 <div visibleif='this.dialogType_ == "full-page"'><button | 137 <div visibleif='full-page'><button |
196 menu="#docs-settings" class="settings" tabindex="6"></button></div> | 138 menu="#docs-settings" class="settings" tabindex="6"></button></div> |
197 </div> | 139 </div> |
198 <div class=dialog-body> | 140 <div class=dialog-body> |
199 <div class=filelist-panel> | 141 <div class=filelist-panel> |
200 <div class=list-container> | 142 <div class=list-container> |
201 <div class=detail-table tabindex=0></div> | 143 <div class=detail-table tabindex=0></div> |
202 <grid class=thumbnail-grid tabindex=0></grid> | 144 <grid class=thumbnail-grid tabindex=0></grid> |
203 <div class=spinner></div> | 145 <div class=spinner></div> |
204 </div> | 146 </div> |
205 <div class=downloads-warning hidden> | 147 <div class=downloads-warning hidden> |
206 <img src=images/warning_icon_square_26x26.png> | 148 <img src=images/warning_icon_square_26x26.png> |
207 <div></div> | 149 <div></div> |
208 </div> | 150 </div> |
209 </div> | 151 </div> |
210 <div class=preview-panel visibility=hidden> | 152 <div class=preview-panel visibility=hidden> |
211 <div><div class=preview-thumbnails></div></div> | 153 <div><div class=preview-thumbnails></div></div> |
212 <div class=preview-summary></div> | 154 <div class=preview-summary></div> |
213 <div class=spacer></div> | 155 <div class=spacer></div> |
214 <div class=tasks></div> | 156 <div class=tasks></div> |
215 <div class='delete-button cr-button task-item' command='#delete' | 157 <div class='delete-button cr-button task-item' command='#delete' |
216 role="button" tabindex=0 | 158 role="button" tabindex=0 |
217 onclick='fileManager.deleteEntries( | 159 visibleif='full-page' |
218 fileManager.selection.entries, false)' | |
219 onkeypress='if (event.keyCode == 13 || | |
220 event.keyCode == 32) { | |
221 fileManager.deleteEntries( | |
222 fileManager.selection.entries, false);}' | |
223 visibleif='this.dialogType_ == "full-page"' | |
224 ><img src='images/button-icon-delete.png' | 160 ><img src='images/button-icon-delete.png' |
225 ><div i18n-content=DELETE_BUTTON_LABEL></div | 161 ><div i18n-content=DELETE_BUTTON_LABEL></div |
226 ></div> | 162 ></div> |
227 </div> | 163 </div> |
228 <div class='unmounted-panel'></div> | 164 <div class='unmounted-panel'></div> |
229 </div> | 165 </div> |
230 </div> | 166 </div> |
231 </div> | 167 </div> |
232 <div class=dialog-footer visibleif='this.dialogType_ != "full-page"'> | 168 <div class=dialog-footer invisibleif='full-page'> |
233 <div class=filename-label i18n-content=FILENAME_LABEL | 169 <div class=filename-label i18n-content=FILENAME_LABEL |
234 visibleif='this.dialogType_ == "saveas-file"' | 170 visibleif='saveas-file' |
235 >[FILENAME]</div> | 171 >[FILENAME]</div> |
236 <input type=text class=filename-input spellcheck=false | 172 <input type=text class=filename-input spellcheck=false |
237 tabindex=1 | 173 tabindex=1 |
238 visibleif='this.dialogType_ == "saveas-file"'> | 174 visibleif='saveas-file'> |
239 <div class=horizontal-spacer></div> | 175 <div class=horizontal-spacer></div> |
240 <button class=ok disabled tabindex=2>[OK]</button> | 176 <button class=ok disabled tabindex=2>[OK]</button> |
241 <div class=preparing-label i18n-content=PREPARING_LABEL>[PREPARING]</div> | 177 <div class=preparing-label i18n-content=PREPARING_LABEL>[PREPARING]</div> |
242 <div class=progress-bar> | 178 <div class=progress-bar> |
243 <div class=progress-track></div> | 179 <div class=progress-track></div> |
244 </div> | 180 </div> |
245 <button class=cancel tabindex=3 i18n-content=CANCEL_LABEL | 181 <button class=cancel tabindex=3 i18n-content=CANCEL_LABEL |
246 >[CANCEL]</button> | 182 >[CANCEL]</button> |
247 </div> | 183 </div> |
248 <div class="butter-bar before-show"> | 184 <div class="butter-bar before-show"> |
249 <div class="content"> | 185 <div class="content"> |
250 <div class="butter-message"></div> | 186 <div class="butter-message"></div> |
251 <div class="progress-bar hide-in-butter"> | 187 <div class="progress-bar hide-in-butter"> |
252 <div class="progress-track"></div> | 188 <div class="progress-track"></div> |
253 </div> | 189 </div> |
254 </div> | 190 </div> |
255 <div class="actions hide-in-butter"></div> | 191 <div class="actions hide-in-butter"></div> |
256 </div> | 192 </div> |
257 <div id=drag-image-container></div> | 193 <div id=drag-image-container></div> |
258 <iframe id=command-dispatcher hidden></iframe> | 194 <iframe id=command-dispatcher hidden></iframe> |
259 | |
260 <script>init();</script> | |
261 </body> | 195 </body> |
262 </html> | 196 </html> |
OLD | NEW |