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

Side by Side Diff: chrome/browser/resources/md_history/grouped_list.js

Issue 2570253002: [MD History] Fix toolbar dates in grouped mode. (Closed)
Patch Set: rebase Created 3 years, 11 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 /** 5 /**
6 * @typedef {{domain: string, 6 * @typedef {{domain: string,
7 * visits: !Array<HistoryEntry>, 7 * visits: !Array<HistoryEntry>,
8 * rendered: boolean, 8 * rendered: boolean,
9 * expanded: boolean}} 9 * expanded: boolean}}
10 */ 10 */
(...skipping 17 matching lines...) Expand all
28 }, 28 },
29 29
30 /** 30 /**
31 * @type {Array<HistoryGroup>} 31 * @type {Array<HistoryGroup>}
32 */ 32 */
33 groupedHistoryData_: Array, 33 groupedHistoryData_: Array,
34 34
35 // An array of history entries in reverse chronological order. 35 // An array of history entries in reverse chronological order.
36 historyData: Array, 36 historyData: Array,
37 37
38 queryStartTime: String, 38 queryInterval: String,
39
40 queryEndTime: String,
41 39
42 range: Number, 40 range: Number,
43 }, 41 },
44 42
45 observers: ['updateGroupedHistoryData_(range, historyData)'], 43 observers: ['updateGroupedHistoryData_(range, historyData)'],
46 44
47 /** 45 /**
48 * @param {!Array<!HistoryEntry>} results 46 * @param {!Array<!HistoryEntry>} results
49 * @param {boolean} incremental 47 * @param {boolean} incremental
50 * @param {boolean} finished 48 * @param {boolean} finished
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 currentDayVisits = []; 116 currentDayVisits = [];
119 } 117 }
120 currentDayVisits.push(visit); 118 currentDayVisits.push(visit);
121 } 119 }
122 pushCurrentDay(); 120 pushCurrentDay();
123 121
124 this.groupedHistoryData_ = days; 122 this.groupedHistoryData_ = days;
125 } else if (this.range == HistoryRange.MONTH) { 123 } else if (this.range == HistoryRange.MONTH) {
126 // Group each all visits into a single list. 124 // Group each all visits into a single list.
127 this.groupedHistoryData_ = [{ 125 this.groupedHistoryData_ = [{
128 title: this.queryStartTime + ' – ' + this.queryEndTime, 126 title: this.queryInterval,
129 domains: this.createHistoryDomains_(this.historyData) 127 domains: this.createHistoryDomains_(this.historyData)
130 }]; 128 }];
131 } 129 }
132 }, 130 },
133 131
134 /** 132 /**
135 * @param {{model:Object, currentTarget:IronCollapseElement}} e 133 * @param {{model:Object, currentTarget:IronCollapseElement}} e
136 */ 134 */
137 toggleDomainExpanded_: function(e) { 135 toggleDomainExpanded_: function(e) {
138 var collapse = e.currentTarget.parentNode.querySelector('iron-collapse'); 136 var collapse = e.currentTarget.parentNode.querySelector('iron-collapse');
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 184
187 /** 185 /**
188 * @param {boolean} expanded 186 * @param {boolean} expanded
189 * @return {string} 187 * @return {string}
190 * @private 188 * @private
191 */ 189 */
192 getDropdownIcon_: function(expanded) { 190 getDropdownIcon_: function(expanded) {
193 return expanded ? 'cr:expand-less' : 'cr:expand-more'; 191 return expanded ? 'cr:expand-less' : 'cr:expand-more';
194 }, 192 },
195 }); 193 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/compiled_resources2.gyp ('k') | chrome/browser/resources/md_history/history_toolbar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698