Skip to content

Commit

Permalink
Update hudson-behavior.js
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Nov 15, 2021
1 parent 20ed27c commit aa2cb1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions war/src/main/webapp/scripts/hudson-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ function rowvgStartEachRow(recursive,f) {
* @param {HTMLLabelElement} label
*/
Behaviour.specify('label.js-checkbox-label-empty', 'form-fallbacks', 1000, function(label) {
var labelParent = label.parentElement;
var labelParent = label.parentElement.parentElement;

if (!labelParent.classList.contains('setting-main')) return;

Expand All @@ -1510,17 +1510,18 @@ function rowvgStartEachRow(recursive,f) {
}
}

var settingName = findSettingName(labelParent.parentNode.parentNode);
var settingName = findSettingName(labelParent.parentNode);
if (settingName == undefined) return
var jenkinsHelpButton = settingName.querySelector('.jenkins-help-button');
var helpLink = jenkinsHelpButton !== null ? jenkinsHelpButton : settingName.querySelector('.setting-help');

if (helpLink) {
labelParent.classList.add('help-sibling');
labelParent.classList.add('jenkins-checkbox-help-wrapper');
labelParent.appendChild(helpLink);
}

labelParent.parentNode.parentNode.removeChild(settingName);
labelParent.parentNode.removeChild(settingName);

// Copy setting-name text and append it to the checkbox label
var labelText = settingName.innerText;
Expand Down

0 comments on commit aa2cb1b

Please sign in to comment.