<!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>
      var css =
      ['list.css',
       'table.css',
       'menu.css'
      ];

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

       'cr.js',
       'cr/locale.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_selection_model.js',
       'cr/ui/table/table_single_selection_model.js',
       'cr/ui/table/table_data_model.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 url.
        var isHarness = document.location.protocol == 'file:';

        // 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>

    <script src="js/util.js"></script>
    <script src="js/file_manager.js"></script>
    <script src="js/main.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:BODY_FONT_FAMILY;
                     .style.fontSize:BODY_FONT_SIZE">
    <commands>
      <command id="rename"></command>
      <command id="delete"></command>
    </commands>

    <menu class=file-context-menu>
      <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>
      <!-- TODO(rginda): Add icons instead of unicode glyphs -->
      <button class=detail-view
              ><img src='images/icon-detail-view.png'></button
      ><button class=thumbnail-view
              ><img src='images/icon-thumb-view.png'></button>
      <button i18n-content=NEW_FOLDER_BUTTON_LABEL class='new-folder'
              visibleif='this.dialogType_ == "saveas-file" ||
                         this.dialogType_ == "full-page"'
              ></button>
    </div>
    <div class=dialog-body>
      <div class=list-container>
        <grid class=thumbnail-grid></grid>
        <div class=detail-table></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>
        <div class=preview-filename></div>
        <center><img class=preview-img></center>
        <div class=vertical-spacer></div>
        <div class=task-buttons></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
             visibleif='this.dialogType_ == "saveas-file"'>
      <div class=horizontal-spacer></div>
      <button class=ok disabled>[OK]</button>
      <button class=cancel i18n-content=CANCEL_LABEL>[CANCEL]</button>
    </div>

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