Skip to content

Commit

Permalink
Merge branch 'new-new-view-page' into update-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Oct 26, 2021
2 parents 7eba6bc + 79742de commit 177c259
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@
position: relative;
width: 18px;
height: 18px;
min-width: 18px;
min-height: 18px;
margin-left: 1ch;
display: inline-flex;
justify-content: center;
Expand Down
16 changes: 9 additions & 7 deletions war/src/main/webapp/scripts/hudson-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -1497,20 +1498,21 @@ 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');
labelParent.appendChild(helpLink);
}

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)
});
})();

Expand Down

0 comments on commit 177c259

Please sign in to comment.