Skip to content

Commit

Permalink
Fix additional paddings at bottom of forms/optional blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Nov 30, 2021
1 parent f120f18 commit 88e1017
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form">
<f:entry title="${%File path}" field="path">
<f:entry title="${%File path}" field="path" class="jenkins-!-margin-bottom-0">
<f:textbox />
</f:entry>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName) {
Functions.getSortedDescriptorsForGlobalConfigByDescriptor(my.FILTER).each { Descriptor descriptor ->
set("descriptor",descriptor)
set("instance",descriptor)
f.rowSet(name:descriptor.jsonSafeClassName, isFormItem: "false") {
f.rowSet(name:descriptor.jsonSafeClassName, class: "jenkins-!-margin-bottom-0") {
st.include(from:descriptor, page:descriptor.globalConfigPage)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ THE SOFTWARE.
This content is HTML (unless the boolean variable escapeEntryTitleAndDescription is set). Use h.escape if necessary.
</st:attribute>
<st:attribute name="class">
Classes to apply to the form
Classes to apply to the form item
</st:attribute>
<st:attribute name="help">
URL to the HTML page. When this attribute is specified, the entry gets
Expand Down
5 changes: 4 additions & 1 deletion core/src/main/resources/lib/form/rowSet.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ THE SOFTWARE.
<st:attribute name="isFormItem">
Removes the "jenkins-form-item" class if false
</st:attribute>
<st:attribute name="class">
Classes to apply to the container (this will be the form item if 'isFormItem' is true)
</st:attribute>
</st:documentation>

<j:choose>
Expand All @@ -46,7 +49,7 @@ THE SOFTWARE.
<d:invokeBody />
</j:when>
<j:otherwise>
<div class="${isFormItem.equals('false') ? '' : 'jenkins-form-item'}">
<div class="${isFormItem.equals('false') ? '' : 'jenkins-form-item'} ${class}">
<div ref="${attrs.ref}" class="row-set-start row-group-start tr" style="display:none" name="${attrs.name}"></div>
<d:invokeBody />
<div class="row-set-end row-group-end tr"></div>
Expand Down
1 change: 1 addition & 0 deletions war/src/main/less/base/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ table.fingerprint-in-build td {
opacity: 0!important;
max-height: 0!important;
height: 0!important;
overflow: hidden;
}

.row-set-end { display: none; }
Expand Down
5 changes: 5 additions & 0 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -637,3 +637,8 @@
}
}
}

// TODO Remove when https://github.com/jenkinsci/jenkins/pull/5916 is merged in
.jenkins-\!-margin-bottom-0 {
margin-bottom: 0 !important;
}

0 comments on commit 88e1017

Please sign in to comment.