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