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

Unified Diff: ui/file_manager/file_manager/foreground/elements/files_metadata_box.js

Issue 2938763002: Keep previous size in Directory QuickView. (Closed)
Patch Set: Resolve review comments. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/metadata_box_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/elements/files_metadata_box.js
diff --git a/ui/file_manager/file_manager/foreground/elements/files_metadata_box.js b/ui/file_manager/file_manager/foreground/elements/files_metadata_box.js
index bf36d4c81a8bd82c56fac0d2f650f27d3c4e93b4..7bdc47ee3ed51f4931b0297d5db2acb184a16c62 100644
--- a/ui/file_manager/file_manager/foreground/elements/files_metadata_box.js
+++ b/ui/file_manager/file_manager/foreground/elements/files_metadata_box.js
@@ -69,10 +69,12 @@ var FilesMetadataBox = Polymer({
hasFileSpecificInfo_: Boolean,
},
- // Clears fields.
- clear: function() {
+ /**
+ * Clears fields.
+ * @param {boolean} keepSizeFields do not clear size and isSizeLoading fields.
+ */
+ clear: function(keepSizeFields) {
this.type = '';
- this.size = '';
this.modiifcationTime = '';
this.mediaMimeType = '';
this.filePath = '';
@@ -88,7 +90,10 @@ var FilesMetadataBox = Polymer({
this.mediaYearRecorded = '';
this.ifd = null;
- this.isSizeLoading = false;
+ if (!keepSizeFields) {
+ this.size = '';
+ this.isSizeLoading = false;
+ }
},
/**
@@ -97,7 +102,9 @@ var FilesMetadataBox = Polymer({
*
* @private
*/
- isImage_: function(type) { return type === 'image'; },
+ isImage_: function(type) {
+ return type === 'image';
+ },
/**
* @param {string} type
@@ -105,7 +112,9 @@ var FilesMetadataBox = Polymer({
*
* @private
*/
- isVideo_: function(type) { return type === 'video'; },
+ isVideo_: function(type) {
+ return type === 'video';
+ },
/**
* @param {string} type
@@ -113,7 +122,9 @@ var FilesMetadataBox = Polymer({
*
* @private
*/
- isAudio_: function(type) { return type === 'audio'; },
+ isAudio_: function(type) {
+ return type === 'audio';
+ },
/**
* Update private properties computed from metadata.
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/metadata_box_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698