From 440b71b7168415f995f4400e27e08f469fbbb4e4 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:30:18 +0100 Subject: [PATCH] Fix nesting --- .../ListView/configure-entries-resources.js | 3 +- .../model/ListView/configure-entries.jelly | 31 ++++++++++++------- war/src/main/scss/base/_style.scss | 23 -------------- war/src/main/scss/pages/_dashboard.scss | 14 +++++++++ 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/core/src/main/resources/hudson/model/ListView/configure-entries-resources.js b/core/src/main/resources/hudson/model/ListView/configure-entries-resources.js index 86ccbb6447a7..93333bf0552d 100644 --- a/core/src/main/resources/hudson/model/ListView/configure-entries-resources.js +++ b/core/src/main/resources/hudson/model/ListView/configure-entries-resources.js @@ -1,5 +1,6 @@ Behaviour.specify("#recurse", "ListView", 0, function (e) { - var nestedElements = document.querySelectorAll("SPAN.nested"); + // SPAN.nested is kept for backwards compatability + var nestedElements = document.querySelectorAll(".listview-jobs--nested, SPAN.nested"); e.onclick = function () { nestedElements.forEach(function (el) { el.style.display = e.checked ? "" : "none"; diff --git a/core/src/main/resources/hudson/model/ListView/configure-entries.jelly b/core/src/main/resources/hudson/model/ListView/configure-entries.jelly index af806d42c882..350235870b01 100644 --- a/core/src/main/resources/hudson/model/ListView/configure-entries.jelly +++ b/core/src/main/resources/hudson/model/ListView/configure-entries.jelly @@ -32,18 +32,27 @@ THE SOFTWARE. + + + + +
+ + + +
+
+
+
+ -
- - - - - - - - - - +
+ +
diff --git a/war/src/main/scss/base/_style.scss b/war/src/main/scss/base/_style.scss index 44b9e62f513a..273d583d4ca9 100644 --- a/war/src/main/scss/base/_style.scss +++ b/war/src/main/scss/base/_style.scss @@ -406,29 +406,6 @@ img.icon-help { vertical-align: text-top; } -/* ============================ list view entries ======================== */ -div.listview-jobs { - display: flex; - flex-direction: column; - gap: 0.3rem; - - .nested, - .notnested { - display: flex; - } - - .nested { - border-left: 2px solid color-mix(in sRGB, var(--input-border), transparent); - margin-left: 10px; - padding-left: 22px; - - & + .nested { - margin-top: -0.3rem; - padding-top: 0.3rem; - } - } -} - /* ============================ health report hover ========================== */ .healthReport a { diff --git a/war/src/main/scss/pages/_dashboard.scss b/war/src/main/scss/pages/_dashboard.scss index 3ace60fac309..4d6f49017566 100644 --- a/war/src/main/scss/pages/_dashboard.scss +++ b/war/src/main/scss/pages/_dashboard.scss @@ -180,3 +180,17 @@ $min-button-size: 36px; height: 1rem; } } + +div.listview-jobs { + display: flex; + flex-direction: column; + gap: 0.3rem; + + &--nested { + display: flex; + flex-direction: column; + border-left: 2px solid color-mix(in sRGB, var(--input-border), transparent); + margin-left: 10px; + padding-left: 22px; + } +}