Skip to content

Commit

Permalink
[JENKINS-73586] Fix New Item page layout if no icon is defined for an…
Browse files Browse the repository at this point in the history
… item type (jenkinsci#9520)

* [new_item_page_fix] show problem

Signed-off-by: Thorsten Scherler <[email protected]>

* [new_item_page_fix] fix problem

Signed-off-by: Thorsten Scherler <[email protected]>

* [new_item_page_fix] revert freestyle hack

Signed-off-by: Thorsten Scherler <[email protected]>

---------

Signed-off-by: Thorsten Scherler <[email protected]>
(cherry picked from commit e763a49)
  • Loading branch information
scherler authored and NotMyFault committed Aug 14, 2024
1 parent 7f2d678 commit bb61a4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 4 additions & 2 deletions war/src/main/js/add-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ $.when(getItems()).done(function (data) {

var iconDiv = drawIcon(elem);
item.appendChild(iconDiv);
var labelContainer = document.createElement("div");
item.appendChild(labelContainer);

var label = item.appendChild(document.createElement("label"));
var label = labelContainer.appendChild(document.createElement("label"));

var radio = label.appendChild(document.createElement("input"));
radio.type = "radio";
Expand All @@ -158,7 +160,7 @@ $.when(getItems()).done(function (data) {

displayName.appendChild(document.createTextNode(elem.displayName));

var desc = item.appendChild(document.createElement("div"));
var desc = labelContainer.appendChild(document.createElement("div"));
desc.className = "desc";
desc.innerHTML = checkForLink(elem.description);

Expand Down
11 changes: 4 additions & 7 deletions war/src/main/js/widgets/add/addform.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,13 @@
}

.default-icon {
position: absolute;
left: 10px;
top: 10px;
height: 48px;
width: 48px;
height: 40px;
width: 40px;
border-radius: 50%;
text-align: center;
line-height: 48px;
line-height: 36px;
font-weight: bold;
font-size: 175%;
font-size: 125%;
color: #ffffff;
text-shadow: rgba(0, 0, 0, 0.25) 0 -1px 1px;
opacity: 0.75;
Expand Down

0 comments on commit bb61a4e

Please sign in to comment.