From c1dc2122713caac3a0150072805049185bf370a7 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:42:30 +0100 Subject: [PATCH 1/2] Add min width/height to help button to ensure it doesnt get squished --- war/src/main/less/modules/form.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/war/src/main/less/modules/form.less b/war/src/main/less/modules/form.less index fb932baad5d3..c77b279b0a9f 100644 --- a/war/src/main/less/modules/form.less +++ b/war/src/main/less/modules/form.less @@ -295,6 +295,8 @@ position: relative; width: 18px; height: 18px; + min-width: 18px; + min-height: 18px; margin-left: 1ch; display: inline-flex; justify-content: center; From 79742deb22b0d31c3c792a57c05988cf0a4e7bdb Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue, 26 Oct 2021 22:02:59 +0100 Subject: [PATCH 2/2] Fix missing help buttons and help buttons that only show as ? --- war/src/main/webapp/scripts/hudson-behavior.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 0a2f0cb403b7..0f082b50b9df 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -1486,6 +1486,7 @@ function rowvgStartEachRow(recursive,f) { */ Behaviour.specify('label.js-checkbox-label-empty', 'form-fallbacks', 1000, function(label) { var labelParent = label.parentElement; + if (!labelParent.classList.contains('setting-main')) return; function findSettingName(formGroup) { @@ -1497,13 +1498,7 @@ function rowvgStartEachRow(recursive,f) { var settingName = findSettingName(labelParent.parentNode); if (settingName == undefined) return - var helpLink = settingName.querySelector('.setting-help'); - - // Copy setting-name text and append it to the checkbox label - var labelText = settingName.innerText; - var spanTag = document.createElement('span') - spanTag.innerHTML = labelText - label.appendChild(spanTag) + var helpLink = settingName.querySelector('.jenkins-help-button'); if (helpLink) { labelParent.classList.add('help-sibling'); @@ -1511,6 +1506,13 @@ function rowvgStartEachRow(recursive,f) { } labelParent.parentNode.removeChild(settingName); + + // Copy setting-name text and append it to the checkbox label + var labelText = settingName.innerText; + + var spanTag = document.createElement('span') + spanTag.innerHTML = labelText + label.appendChild(spanTag) }); })();