[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Sat, 28 Oct 2023 17:21:24 -0400 (EDT) |
branch: master
commit b80461b75e5b37ed503b5db21420125e159ee3ad
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Oct 28 23:01:03 2023 +0200
build-log.js: Tweak icon of the phase folding button.
* src/static/js/build-log.js: Change the class of the phase
collapse/expand button. Give it an ID and change its icon as a function
of OPENNESS.
---
src/static/js/build-log.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/static/js/build-log.js b/src/static/js/build-log.js
index 1e27007..8de9494 100644
--- a/src/static/js/build-log.js
+++ b/src/static/js/build-log.js
@@ -79,14 +79,20 @@ $(document).ready(function() {
// Add a button to collapse/expand phases.
var openness = true;
+ const classOpened = "d-flex mb-3 lead text-info oi oi-fullscreen-exit";
+ const classClosed = "d-flex mb-3 lead text-info oi oi-fullscreen-enter"
const button =
- $('<div>', { class: "d-flex mb-3 text-info oi oi-collapse-down",
- title: "Toggle phase visibility." })
+ $('<div>', { class: classOpened,
+ title: "Toggle phase visibility.",
+ id: "phase-folding-button" })
.on("click", _ => {
openness = !openness;
$("details").each(function(index) {
$(this).attr('open', openness);
});
+ console.log("button", $("#phase-folding-button"));
+ $("#phase-folding-button")
+ .attr("class", openness ? classOpened : classClosed);
});
$('#build-log').prepend(button);