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

Unified Diff: chrome/browser/resources/engagement/engagement_table.html

Issue 1407363010: Make table in chrome:site-engagement sortable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 2 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
Index: chrome/browser/resources/engagement/engagement_table.html
diff --git a/chrome/browser/resources/engagement/engagement_table.html b/chrome/browser/resources/engagement/engagement_table.html
index 434ee3d53db56949e048b1ee20c75ae89f9f904e..fced988418e82db92d93c53d2f15a6bba0c104d6 100644
--- a/chrome/browser/resources/engagement/engagement_table.html
+++ b/chrome/browser/resources/engagement/engagement_table.html
@@ -6,12 +6,16 @@
<table>
<thead>
<tr>
- <th>Origin</th>
- <th>Points</th>
+ <th on-tap="handleSortColumnTap" sort-key="origin">
+ Origin
+ </th>
+ <th id="initial-sort-column" on-tap="handleSortColumnTap" sort-key="score">
+ Points
+ </th>
</tr>
</thead>
<tbody>
- <template is="dom-repeat" items="{{engagementInfo}}" as="info">
+ <template id="engagement-table-items" is="dom-repeat" items="{{engagementInfo}}" as="info" sort="[[getTableSortFunction_(sortKey_, sortReverse_)]]">
tsergeant 2015/10/28 04:57:03 Nit: wrap to 80 chars
calamity 2015/10/28 05:43:11 Done.
<tr>
<td class="origin-cell">{{info.origin}}</td>
<td>{{info.score}}</td>

Powered by Google App Engine
This is Rietveld 408576698