Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: ui/file_manager/file_manager/foreground/elements/files_quick_view.html

Issue 2540863004: Quick View: Support pdf and text preview. (Closed)
Patch Set: Fix nits. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!-- Copyright 2016 The Chromium Authors. All rights reserved. 1 <!-- Copyright 2016 The Chromium Authors. All rights reserved.
2 -- Use of this source code is governed by a BSD-style license that can be 2 -- Use of this source code is governed by a BSD-style license that can be
3 -- found in the LICENSE file. 3 -- found in the LICENSE file.
4 --> 4 -->
5 5
6 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l">
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial og.html"> 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial og.html">
10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-too lbar.html"> 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-too lbar.html">
11 <link rel="import" href="files_icon_button.html"> 11 <link rel="import" href="files_icon_button.html">
12 <link rel="import" href="files_metadata_box.html"> 12 <link rel="import" href="files_metadata_box.html">
13 <link rel="import" href="files_safe_media.html"> 13 <link rel="import" href="files_safe_media.html">
14 <link rel="import" href="files_tooltip.html"> 14 <link rel="import" href="files_tooltip.html">
15 <link rel="import" href="icons.html"> 15 <link rel="import" href="icons.html">
16 16
17 <dom-module id="files-quick-view"> 17 <dom-module id="files-quick-view">
18 <link rel="import" type="css" href="files_quick_view.css"> 18 <link rel="import" type="css" href="files_quick_view.css">
19 <template> 19 <template>
20 <paper-dialog id="dialog" modal> 20 <paper-dialog id="dialog" modal>
21 <paper-toolbar id="toolbar"> 21 <paper-toolbar id="toolbar">
22 <div>[[filePath]]</div> 22 <div>[[filePath]]</div>
23 <div id="buttons"> 23 <div id="buttons">
24 <paper-button id="open-button" on-tap="onOpenInNewButtonTap" hidden$= "[[isUnsupported_(type)]]" i18n-values="aria-label:QUICK_VIEW_OPEN_IN_NEW_BUTTON _LABEL" tabindex="0" has-tooltip> 24 <paper-button id="open-button" on-tap="onOpenInNewButtonTap" hidden$= "[[isUnsupported_(type, browsable)]]" i18n-values="aria-label:QUICK_VIEW_OPEN_IN _NEW_BUTTON_LABEL" tabindex="0" has-tooltip>
25 <iron-icon icon="files:open-in-new"></iron-icon> 25 <iron-icon icon="files:open-in-new"></iron-icon>
26 </paper-button> 26 </paper-button>
27 <files-icon-button toggles id="metadata-button" on-tap="onMetadataBut tonTap_" active="{{metadataBoxActive}}" i18n-values="aria-label:QUICK_VIEW_TOGGL E_METADATA_BOX_BUTTON_LABEL" tabindex="0" has-tooltip> 27 <files-icon-button toggles id="metadata-button" on-tap="onMetadataBut tonTap_" active="{{metadataBoxActive}}" i18n-values="aria-label:QUICK_VIEW_TOGGL E_METADATA_BOX_BUTTON_LABEL" tabindex="0" has-tooltip>
28 </files-icon-button> 28 </files-icon-button>
29 </div> 29 </div>
30 </paper-toolbar> 30 </paper-toolbar>
31 <div id="mainPanel"> 31 <div id="mainPanel">
32 <div id="contentPanel" metadata-box-active$="[[metadataBoxActive]]" on-t ap="onContentPanelTap_"> 32 <div id="contentPanel" metadata-box-active$="[[metadataBoxActive]]" on-t ap="onContentPanelTap_">
33 <div id="innerContentPanel" tabindex="0"> 33 <div id="innerContentPanel" type$="[[type]]" tabindex="0">
34 <!-- PDF, Text -->
35 <template is="dom-if" if="[[browsable]]">
36 <webview class="content" src="[[contentUrl]]"></webview>
37 </template>
38 <!-- Image -->
34 <template is="dom-if" if="[[isImage_(type)]]"> 39 <template is="dom-if" if="[[isImage_(type)]]">
35 <div hidden="[[!contentUrl]]"> 40 <files-safe-media hidden="[[!contentUrl]]" type="image" class="con tent no-close-on-click" src="[[contentUrl]]"></files-safe-media>
36 <files-safe-media type="image" class="content no-close-on-click" src="[[contentUrl]]"></files-safe-media>
37 </div>
38 <template is="dom-if" if="[[!contentUrl]]"> 41 <template is="dom-if" if="[[!contentUrl]]">
39 <div generic-thumbnail="image"></div> 42 <div generic-thumbnail="image"></div>
40 <div class="no-preivew">[[noPreviewText]]</div> 43 <div class="no-preivew">[[noPreviewText]]</div>
41 </template> 44 </template>
42 </template> 45 </template>
43 <!-- Video --> 46 <!-- Video -->
44 <template is="dom-if" if="[[isVideo_(type)]]"> 47 <template is="dom-if" if="[[isVideo_(type)]]">
45 <template is="dom-if" if="[[!contentUrl]]"> 48 <template is="dom-if" if="[[!contentUrl]]">
46 <div class="thumbnail" hidden="[[!videoPoster]]"> 49 <div class="thumbnail" hidden="[[!videoPoster]]">
47 <files-safe-media type="image" id="video-poster" src="[[videoP oster]]"></files-safe-media> 50 <files-safe-media type="image" id="video-poster" src="[[videoP oster]]"></files-safe-media>
(...skipping 12 matching lines...) Expand all
60 <div> 63 <div>
61 <files-safe-media type="audio" class="no-close-on-click" autoplay= "[[autoplay]]" controls src="[[audioUrl_(contentUrl, type)]]" hidden="[[!isAudio _(type)]]"></files-safe-media> 64 <files-safe-media type="audio" class="no-close-on-click" autoplay= "[[autoplay]]" controls src="[[audioUrl_(contentUrl, type)]]" hidden="[[!isAudio _(type)]]"></files-safe-media>
62 </div> 65 </div>
63 <template is="dom-if" if="[[isAudio_(type)]]"> 66 <template is="dom-if" if="[[isAudio_(type)]]">
64 <template is="dom-if" if="[[!contentUrl]]"> 67 <template is="dom-if" if="[[!contentUrl]]">
65 <div generic-thumbnail="audio"></div> 68 <div generic-thumbnail="audio"></div>
66 <div class="no-preivew">[[noPlaybackText]]</div> 69 <div class="no-preivew">[[noPlaybackText]]</div>
67 </template> 70 </template>
68 </template> 71 </template>
69 <!-- TODO(oka): Support folder icon --> 72 <!-- TODO(oka): Support folder icon -->
70 <div hidden="[[!isUnsupported_(type)]]"> 73 <div hidden="[[!isUnsupported_(type, browsable)]]">
71 <div generic-thumbnail></div> 74 <div generic-thumbnail></div>
72 <div class="no-preview">[[noPreviewText]]</div> 75 <div class="no-preview">[[noPreviewText]]</div>
73 </div> 76 </div>
74 </div> <!-- innerContentPanel --> 77 </div> <!-- innerContentPanel -->
75 </div> <!-- contentPanel --> 78 </div> <!-- contentPanel -->
76 <files-metadata-box id="metadata-box" hidden$="[[!metadataBoxActive]]">< /file-metadata-box> 79 <files-metadata-box id="metadata-box" hidden$="[[!metadataBoxActive]]">< /file-metadata-box>
77 </div> <!-- mainPanel --> 80 </div> <!-- mainPanel -->
78 </paper-dialog> 81 </paper-dialog>
79 <files-tooltip></files-tooltip> 82 <files-tooltip></files-tooltip>
80 </template> 83 </template>
81 </dom-module> 84 </dom-module>
82 85
83 <script src="files_quick_view.js"></script> 86 <script src="files_quick_view.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698