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

Unified Diff: appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html

Issue 2496303002: Float selected columns to the top (Closed)
Patch Set: Created 4 years, 1 month 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 | « appengine/swarming/ui/build/elements.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
diff --git a/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html b/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
index 5db25e09da18072b4877526939346884bc378386..cf9d4336ac9e27b74cadc367aeaf0307a5e33486 100644
--- a/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
+++ b/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
@@ -375,6 +375,17 @@
arr.indexOf(this._primarySelected) === -1) {
this.set("_primarySelected", arr[0]);
}
+ arr.sort(function(a, b){
+ var selA = this._columnState(a);
+ var selB = this._columnState(b);
+ if (selA && !selB) {
+ return -1;
+ }
+ if (selB && !selA) {
+ return 1;
+ }
+ return swarming.naturalCompare(a, b);
stephana 2016/11/14 18:15:45 is (!selA && !selB) possible ?
kjlubick 2016/11/14 18:24:43 Yes. If both are selected or both are not selecte
stephana 2016/11/15 13:16:08 Acknowledged.
+ }.bind(this));
return arr;
},
« no previous file with comments | « appengine/swarming/ui/build/elements.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698