Skip to content

Commit

Permalink
servershell: Make column buttons only visible on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
seqizz committed Dec 13, 2024
1 parent f1f5c41 commit 0af9308
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions serveradmin/servershell/static/css/servershell.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ table tr:nth-child(odd) .disabled {
white-space: nowrap;
}

.attr-headericons {
opacity: 0;
transition: opacity 0.2s;
}

th:hover .attr-headericons {
opacity: 1;
}

.results-info:last-of-type {
margin-bottom: 1rem;
}
Expand Down
4 changes: 2 additions & 2 deletions serveradmin/servershell/static/js/servershell/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ servershell.update_result = function() {
servershell.shown_attributes.forEach((attribute, index) => header.append(
$('<th scope="col">').append(
$('<span>').text(attribute),
$(`<a href="#" class="attr-tooltip" title="Order by ${attribute} attribute">`).append(
$(`<a href="#" class="attr-headericons" title="Order by ${attribute} attribute">`).append(
$('<i class="fa-solid fa-arrow-down-a-z">')
).click(function(e) {
e.preventDefault();
servershell.commands.orderby(attribute);
}),
$(`<a href="#" class="attr-tooltip" title="Remove ${attribute} column">`).append(
$(`<a href="#" class="attr-headericons" title="Remove ${attribute} column">`).append(
$('<i class="fa-solid fa-xmark">')
).click(function(e) {
e.preventDefault();
Expand Down

0 comments on commit 0af9308

Please sign in to comment.