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 9dba043 + 5d6476c commit 9ab33f2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 80 deletions.
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/form.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ THE SOFTWARE.
@enctype of the <form> HTML element.
</st:attribute>
<st:attribute name="id">
ID of the HTML element.
ID of the form.
</st:attribute>
<st:attribute name="target">
@target of the &lt;form> HTML element. Works like &lt;a target="...">
Expand Down
4 changes: 1 addition & 3 deletions core/src/main/resources/lib/hudson/newFromList/form.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ THE SOFTWARE.
-->
<input type="radio" name="mode" value="dummy1" style="display:none" />
<input type="radio" name="mode" value="dummy2" style="display:none" />
<button type="submit" id="ok" class="jenkins-button jenkins-button--primary jenkins-button--large">
${%Create}
</button>
<input type="submit" name="Submit" value="${%Create}" id="ok" />
</div>

<st:adjunct includes="lib.hudson.newFromList.validation" />
Expand Down
85 changes: 10 additions & 75 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
max-width: var(--form-item-max-width);
margin-bottom: 1.75rem;

// Workaround for float:right button controls
// (eg Global Credentials' Verify Configuration button being hidden by the floating submit bar)
&::after {
content: " "; /* Older browser do not support empty content */
visibility: hidden;
display: block;
height: 0;
clear: both;
}

&--small {
max-width: var(--form-item-max-width--small);
}
Expand Down Expand Up @@ -537,81 +547,6 @@
}
}

.jenkins-button {
position: relative;
display: inline-flex;
justify-content: center;
align-items: center;
min-height: 37px;
background: var(--btn-secondary-bg);
color: var(--btn-secondary-color);
padding: 10px 15px;
border-radius: 10px;
cursor: pointer;
text-shadow: 0 1px 0 var(--background-color);
box-shadow: var(--form-input-glow);
text-decoration: none;
outline: none;
font-weight: 500;
transition: var(--standard-transition);
border: 2px solid var(--btn-secondary-border);

&::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: inherit;
color: inherit;
border-bottom: 2px solid var(--button-foreground-color);
opacity: 0.05;
}

&:hover {
background: var(--btn-secondary-bg--hover);
color: var(--btn-secondary-color--hover);
}

&:active {
background: var(--btn-secondary-bg--focus);
color: var(--btn-secondary-color--focus);
box-shadow: var(--form-input-glow--focus);
}

&--large {
font-size: 0.9rem;
padding: 12px 20px;
}

&--primary {
background: var(--btn-primary-bg);
color: white;
border: none;

&:hover {
background: var(--btn-primary-bg-hover);
color: white;
}

&:active {
background: var(--btn-primary-bg-active);
color: white;
}

&::after {
border-bottom: 2px solid var(--btn-primary-bg);
opacity: 0.1;
}
}

&:disabled {
opacity: 0.5;
pointer-events: none;
}
}

.jenkins-help-button {
position: relative;
width: 18px;
Expand Down
2 changes: 1 addition & 1 deletion war/src/main/webapp/scripts/hudson-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ function rowvgStartEachRow(recursive,f) {
function findSettingName(formGroup) {
for (var i=0; i<formGroup.childNodes.length; i++) {
var child = formGroup.childNodes[i];
if (child.classList.contains('setting-name')) return child;
if (child.classList.contains('jenkins-form-label')) return child;
}
}

Expand Down

0 comments on commit 9ab33f2

Please sign in to comment.