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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_metadata_formatter.js

Issue 2065933005: Quick View: Format metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 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 | « ui/file_manager/file_manager/foreground/js/metadata_update_controller.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/ui/file_metadata_formatter.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_metadata_formatter.js b/ui/file_manager/file_manager/foreground/js/ui/file_metadata_formatter.js
index 61703d0defad00420b0de234b195124a6da1d90f..21e97921f0c1bf64bb73743c131820342e4ae825 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_metadata_formatter.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_metadata_formatter.js
@@ -5,12 +5,18 @@
/**
* Formatter class for file metadatas.
* @constructor
+ * @extends {cr.EventTarget}
*/
function FileMetadataFormatter() {
this.setDateTimeFormat(true);
}
/**
+ * FileMetadataFormatter extends cr.EventTarget.
+ */
+FileMetadataFormatter.prototype.__proto__ = cr.EventTarget.prototype;
+
+/**
* Sets date and time format.
* @param {boolean} use12hourClock True if 12 hours clock, False if 24 hours.
*/
@@ -24,6 +30,7 @@ FileMetadataFormatter.prototype.setDateTimeFormat = function(use12hourClock) {
year: 'numeric', month: 'short', day: 'numeric',
hour: 'numeric', minute: 'numeric', hour12: use12hourClock
});
+ cr.dispatchSimpleEvent(this, 'date-time-format-changed');
};
/**
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/metadata_update_controller.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698