mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 03:36:33 +03:00
Tweak js formatting, highlight header with sort order
This commit is contained in:
parent
637e7a4e24
commit
ec6bb5590d
File diff suppressed because one or more lines are too long
@ -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;
|
||||
}
|
||||
|
@ -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 + " " + sortArrow(sortOrder) + "</th>";
|
||||
} else {
|
||||
cols += "<th class='active' data='" + col + "'" + "data-sort-order=" + sortOrder + ">" + col + " " + 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"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user