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

Side by Side Diff: ui/file_manager/file_manager/foreground/elements/files_metadata_box.js

Issue 2313763003: Show a local folder's size in QuickView. (Closed)
Patch Set: Show a local folder's size in QuickView. Created 4 years, 3 months 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 var FilesMetadataBox = Polymer({ 5 var FilesMetadataBox = Polymer({
6 is: 'files-metadata-box', 6 is: 'files-metadata-box',
7 7
8 properties: { 8 properties: {
9 // File media type, e.g. image, video. 9 // File media type, e.g. image, video.
10 type: String, 10 type: String,
11 size: String, 11 size: String,
12 modiifcationTime: String, 12 modiifcationTime: String,
13 filePath: String, 13 filePath: String,
14 mediaMimeType: String, 14 mediaMimeType: String,
15 15
16 // File type specific metadata below. 16 // File type specific metadata below.
17 imageWidth: Number, 17 imageWidth: Number,
18 imageHeight: Number, 18 imageHeight: Number,
19 mediaTitle: String, 19 mediaTitle: String,
20 mediaArtist: String, 20 mediaArtist: String,
21
22 // Whether the size is the middle of loading.
23 isSizeLoading: Boolean,
21 }, 24 },
22 25
23 // Clears fields. 26 // Clears fields.
24 clear: function() { 27 clear: function() {
25 this.type = ''; 28 this.type = '';
26 this.size = ''; 29 this.size = '';
27 this.modiifcationTime = ''; 30 this.modiifcationTime = '';
28 this.mediaMimeType = ''; 31 this.mediaMimeType = '';
29 this.filePath = ''; 32 this.filePath = '';
30 33
31 this.imageWidth = 0; 34 this.imageWidth = 0;
32 this.imageHeight = 0; 35 this.imageHeight = 0;
33 this.mediaTitle = ''; 36 this.mediaTitle = '';
34 this.mediaArtist = ''; 37 this.mediaArtist = '';
38
39 this.isSizeLoading = false;
35 }, 40 },
36 41
37 /** 42 /**
38 * @param {string} type 43 * @param {string} type
39 * @return {boolean} 44 * @return {boolean}
40 * 45 *
41 * @private 46 * @private
42 */ 47 */
43 isImage_: function(type) { return type === 'image'; }, 48 isImage_: function(type) { return type === 'image'; },
44 49
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 * 85 *
81 * @private 86 * @private
82 */ 87 */
83 resolution_: function(imageWidth, imageHeight) { 88 resolution_: function(imageWidth, imageHeight) {
84 if (imageWidth && imageHeight) 89 if (imageWidth && imageHeight)
85 return imageWidth + " x " + imageHeight; 90 return imageWidth + " x " + imageHeight;
86 return ''; 91 return '';
87 }, 92 },
88 93
89 }); 94 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698