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

Side by Side Diff: appengine/swarming/elements/res/imp/common/sort-toggle.html

Issue 2204483002: Add UI to new botlist to show summary (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@bot-summary-api
Patch Set: Add docs Created 4 years, 4 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 <!-- 1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 5
6 This in an HTML Import-able file that contains the definition 6 This in an HTML Import-able file that contains the definition
7 of the following elements: 7 of the following elements:
8 8
9 <sort-toggle> 9 <sort-toggle>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 style="bottom:0" 69 style="bottom:0"
70 class$="[[_hidden(direction,'desc')]]" 70 class$="[[_hidden(direction,'desc')]]"
71 icon="icons:arrow-drop-up"> 71 icon="icons:arrow-drop-up">
72 </iron-icon> 72 </iron-icon>
73 </span> 73 </span>
74 74
75 </template> 75 </template>
76 <script> 76 <script>
77 Polymer({ 77 Polymer({
78 is: "sort-toggle", 78 is: "sort-toggle",
79
79 properties: { 80 properties: {
80 current: { 81 current: {
81 type: Object, 82 type: Object,
82 observer: "_resetSort", 83 observer: "_resetSort",
83 }, 84 },
84 name: { 85 name: {
85 type: String, 86 type: String,
86 observer: "_resetSort", 87 observer: "_resetSort",
87 }, 88 },
88 89
(...skipping 24 matching lines...) Expand all
113 // Because of how Polymer inserts and moves elements around, we need to 114 // Because of how Polymer inserts and moves elements around, we need to
114 // update the direction value if the name changes so the ascending sort 115 // update the direction value if the name changes so the ascending sort
115 // by "os" doesn't become the ascending sort by "gpu" if a column gets 116 // by "os" doesn't become the ascending sort by "gpu" if a column gets
116 // added before "os", for example. Additionally, this makes sure that 117 // added before "os", for example. Additionally, this makes sure that
117 // only one sort-toggle is active at a given time. 118 // only one sort-toggle is active at a given time.
118 if (this.current && this.current.name === this.name) { 119 if (this.current && this.current.name === this.name) {
119 this.set("direction", this.current.direction); 120 this.set("direction", this.current.direction);
120 } else { 121 } else {
121 this.set("direction", ""); 122 this.set("direction", "");
122 } 123 }
123
124 }, 124 },
125 }); 125 });
126 </script> 126 </script>
127 </dom-module> 127 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698