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

Unified Diff: chrome/browser/resources/md_history/history_toolbar.js

Issue 2570253002: [MD History] Fix toolbar dates in grouped mode. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_history/history_toolbar.js
diff --git a/chrome/browser/resources/md_history/history_toolbar.js b/chrome/browser/resources/md_history/history_toolbar.js
index fbe0359cf4e4a7509cf13028eea962723dd3b986..d0fa68ef4d251fbcd07b4d772bee9be6334cf4a2 100644
--- a/chrome/browser/resources/md_history/history_toolbar.js
+++ b/chrome/browser/resources/md_history/history_toolbar.js
@@ -51,15 +51,11 @@ Polymer({
notify: true,
},
- querying: Boolean,
-
hasMoreResults: Boolean,
- // The start time of the query range.
- queryStartTime: String,
+ querying: Boolean,
- // The end time of the query range.
- queryEndTime: String,
+ queryInfo: Object,
calamity 2016/12/15 02:17:52 Just FYI, I considered adding a couple more String
// Whether to show the menu promo (a tooltip that points at the menu button
// in narrow mode).
@@ -131,10 +127,15 @@ Polymer({
},
/** @private */
- getHistoryInterval_: function(queryStartTime, queryEndTime) {
- // TODO(calamity): Fix the format of these dates.
- return loadTimeData.getStringF(
- 'historyInterval', queryStartTime, queryEndTime);
+ getHistoryInterval_: function() {
+ var info = this.queryInfo;
+ if (this.groupedRange == HistoryRange.WEEK) {
+ return loadTimeData.getStringF(
+ 'historyInterval', info.queryStartTimeShort, info.queryEndTimeShort);
+ }
+
+ if (this.groupedRange == HistoryRange.MONTH)
+ return info.queryStartMonth;
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698