main.html revision ddb351dbec246cf1fab5ec20d2d5520909041de1
1<!DOCTYPE HTML>
2<!--
3  -- Copyright (c) 2011 The Chromium Authors. All rights reserved.
4  -- Use of this source code is governed by a BSD-style license that can be
5  -- found in the LICENSE file.
6  -->
7<html>
8  <head>
9    <script>
10      var css =
11      ['list.css',
12       'table.css',
13       'menu.css'
14      ];
15
16      var script =
17      ['local_strings.js',
18       'i18n_template.js',
19
20       'cr.js',
21       'cr/locale.js',
22       'cr/ui.js',
23       'cr/event_target.js',
24       'cr/ui/array_data_model.js',
25       'cr/ui/list_item.js',
26       'cr/ui/list_selection_model.js',
27       'cr/ui/list_single_selection_model.js',
28       'cr/ui/list_selection_controller.js',
29       'cr/ui/list.js',
30
31       'cr/ui/splitter.js',
32       'cr/ui/table/table_splitter.js',
33       'cr/ui/table/table_selection_model.js',
34       'cr/ui/table/table_single_selection_model.js',
35       'cr/ui/table/table_data_model.js',
36
37       'cr/ui/table/table_column.js',
38       'cr/ui/table/table_column_model.js',
39       'cr/ui/table/table_header.js',
40       'cr/ui/table/table_list.js',
41       'cr/ui/table.js',
42
43       'cr/ui/grid.js',
44
45       'cr/ui/command.js',
46       'cr/ui/position_util.js',
47       'cr/ui/menu_item.js',
48       'cr/ui/menu.js',
49       'cr/ui/context_menu_handler.js',
50      ];
51
52      (function() {
53        // Switch to 'test harness' mode when loading from a file url.
54        var isHarness = document.location.protocol == 'file:';
55
56        // In test harness mode we load resources from relative dirs.
57        var prefix = isHarness ? '/shared/' : 'chrome://resources/';
58
59        for (var i = 0; i < css.length; ++i) {
60          document.write('<link href="' + prefix + 'css/' + css[i] +
61                         '" rel="stylesheet"></link>');
62        }
63
64        for (var i = 0; i < script.length; ++i) {
65          document.write('<script src="' + prefix + 'js/' + script[i] +
66                         '"><\57script>');
67        }
68
69        if (isHarness)
70          document.write('<script src="js/mock_chrome.js"><\57script>');
71     })();
72
73    </script>
74
75    <link rel="stylesheet" href="css/file_manager.css"></link>
76
77    <script src="js/util.js"></script>
78    <script src="js/file_manager.js"></script>
79    <script src="js/main.js"></script>
80
81    <!-- We have to set some default title, or chrome will use the page
82      -- name.  As soon as we init and change to a directory, we'll use
83      -- the directory as the page title.  Until then, have a unicode glyph
84      -- of a tape reel.
85      -->
86    <title>&#x2707;</title>
87  </head>
88  <body i18n-values=".style.fontFamily:BODY_FONT_FAMILY;
89                     .style.fontSize:BODY_FONT_SIZE">
90    <commands>
91      <command id="rename"></command>
92      <command id="delete"></command>
93    </commands>
94
95    <menu class=file-context-menu>
96      <menuitem i18n-content=RENAME_BUTTON_LABEL command='#rename'></menuitem>
97      <menuitem i18n-content=DELETE_BUTTON_LABEL command='#delete'></menuitem>
98    </menu>
99
100    <div class=dialog-title visibleif='this.dialogType_ != "full-page"'
101         >[TITLE]</div>
102    <div class=dialog-header>
103      <div class=breadcrumbs></div>
104      <!-- TODO(rginda): Add icons instead of unicode glyphs -->
105      <button class=detail-view
106              ><img src='images/icon-detail-view.png'></button
107      ><button class=thumbnail-view
108              ><img src='images/icon-thumb-view.png'></button>
109      <button i18n-content=NEW_FOLDER_BUTTON_LABEL class='new-folder'
110              visibleif='this.dialogType_ == "saveas-file" ||
111                         this.dialogType_ == "full-page"'
112              ></button>
113    </div>
114    <div class=dialog-body>
115      <div class=list-container>
116        <grid class=thumbnail-grid></grid>
117        <div class=detail-table></div>
118      </div>
119      <div class=preview-container>
120        <div class=table-header style='width:100%'>
121          <div class=table-header-cell>
122            <div class='preview-label table-header-label'
123                 i18n-content=PREVIEW_COLUMN_LABEL>[PREVIEW]</div>
124          </div>
125        </div>
126        <div class=preview-filename></div>
127        <center><img class=preview-img></center>
128        <div class=vertical-spacer></div>
129        <div class=task-buttons></div>
130        <div class=preview-summary></div>
131      </div>
132    </div>
133    <div class=dialog-footer visibleif='this.dialogType_ != "full-page"'>
134      <div class=filename-label i18n-content=FILENAME_LABEL
135           visibleif='this.dialogType_ == "saveas-file"'
136           >[FILENAME]</div>
137      <input type=text class=filename-input spellcheck=false
138             visibleif='this.dialogType_ == "saveas-file"'>
139      <div class=horizontal-spacer></div>
140      <button class=ok disabled>[OK]</button>
141      <button class=cancel i18n-content=CANCEL_LABEL>[CANCEL]</button>
142    </div>
143
144    <script>init();</script>
145  </body>
146</html>
147