Skip to content

Commit 12074e2

Browse files
committed
refine top button
1 parent 9142cdd commit 12074e2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

core/src/main/resources/lib/form/hetero-list.jelly

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ THE SOFTWARE.
121121
<div class="jenkins-form-item hetero-list-container ${hasHeader?'with-drag-drop':''} ${attrs.oneEach?'one-each':''} ${attrs.honorOrder?'honor-order':''}"
122122
enableTopButton="${attrs.enableTopButton}">
123123
<j:if test="${!readOnlyMode and attrs.enableTopButton}">
124-
<div>
124+
<span>
125125
<button type="button" class="jenkins-button hetero-list-add hetero-list-add-top ${empty(attrs.items)?'jenkins-hidden':''}"
126126
menualign="${attrs.menuAlign}" suffix="${attrs.name}"><l:icon src="symbol-add"/>${attrs.addCaption?:'%Add'}
127127
</button>
128-
</div>
128+
</span>
129129
</j:if>
130130

131131
<!-- display existing items -->

src/main/js/components/dropdowns/hetero-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function generateButtons() {
8484
let btn = Array.from(c.querySelectorAll("BUTTON.hetero-list-add")).pop();
8585
let topButton = Array.from(
8686
c.querySelectorAll("BUTTON.hetero-list-add-top"),
87-
).pop();
87+
).shift();
8888

8989
let prototypes = c.lastElementChild;
9090
while (!prototypes.classList.contains("prototypes")) {

src/main/scss/form/_reorderable-list.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ div.repeated-chunk {
221221
}
222222
}
223223

224-
.repeatable-add-top {
224+
.repeatable-add-top, .hetero-list-add-top {
225225
margin-bottom: 1rem;
226226
}
227227

0 commit comments

Comments
 (0)