Tweak js formatting, highlight header with sort order

This commit is contained in:
Dan Sosedoff 2015-04-28 10:01:34 -05:00
parent 637e7a4e24
commit ec6bb5590d
3 changed files with 31 additions and 20 deletions

File diff suppressed because one or more lines are too long

View File

@ -314,6 +314,15 @@
-webkit-font-smoothing: antialiased;
}
#results th.active {
background: #e3e3e3;
}
#results[data-mode="browse"] th:hover {
cursor: pointer;
background: #fafafa;
}
#results tbody tr:hover td {
background: #ffe;
}

View File

@ -99,8 +99,9 @@ function buildTable(results, sortColumn, sortOrder) {
results.columns.forEach(function(col) {
if (col === sortColumn) {
cols += "<th data='" + col + "'" + "data-sort-order=" + sortOrder + ">" + col + "&nbsp;" + sortArrow(sortOrder) + "</th>";
} else {
cols += "<th class='active' data='" + col + "'" + "data-sort-order=" + sortOrder + ">" + col + "&nbsp;" + sortArrow(sortOrder) + "</th>";
}
else {
cols += "<th data='" + col + "'>" + col + "</th>";
}
});
@ -458,7 +459,8 @@ $(document).ready(function() {
if (this.dataset.sortOrder === "ASC") {
this.dataset.sortOrder = "DESC"
} else {
}
else {
this.dataset.sortOrder = "ASC"
}