Skip to content

Commit 376e95a

Browse files
authored
Merge branch 'master' into new-header
2 parents 36c7b20 + c6604ca commit 376e95a

File tree

8 files changed

+48
-28
lines changed

8 files changed

+48
-28
lines changed

bom/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ THE SOFTWARE.
7171
<!-- https://docs.spring.io/spring-security/reference/6.3/getting-spring-security.html#getting-maven-no-boot -->
7272
<groupId>org.springframework.security</groupId>
7373
<artifactId>spring-security-bom</artifactId>
74-
<version>6.4.3</version>
74+
<version>6.4.4</version>
7575
<type>pom</type>
7676
<scope>import</scope>
7777
</dependency>
@@ -144,7 +144,7 @@ THE SOFTWARE.
144144
<dependency>
145145
<groupId>net.java.dev.jna</groupId>
146146
<artifactId>jna</artifactId>
147-
<version>5.16.0</version>
147+
<version>5.17.0</version>
148148
</dependency>
149149
<dependency>
150150
<groupId>net.java.sezpoz</groupId>

core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ THE SOFTWARE.
4040
<j:set var="initialDescription" value="${request2.getParameter('description')}" defaultValue="${it.description}"/>
4141
<l:ajax>
4242
<form action="${submissionUrl}" method="post">
43-
<table>
44-
<f:entry help="${app.markupFormatter.helpUrl}">
45-
<f:textarea name="description" value="${initialDescription}"
46-
codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription"/>
47-
</f:entry>
48-
</table>
49-
<div align="right">
43+
<f:entry help="${app.markupFormatter.helpUrl}">
44+
<f:textarea name="description" value="${initialDescription}"
45+
codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription"/>
46+
</f:entry>
47+
<div class="jenkins-buttons-row jenkins-buttons-row--equal-width">
5048
<f:submit value="${%Save}" />
49+
<button type="button" class="jenkins-button description-cancel-button">${%Cancel}</button>
5150
</div>
5251
</form>
5352
</l:ajax>

core/src/main/resources/lib/hudson/editable-description.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* global replaceDescription */
22
(function () {
33
document.addEventListener("DOMContentLoaded", function () {
4-
let descriptionLink = document.querySelector("#description-link");
5-
let description = document.getElementById("description");
4+
const descriptionLink = document.querySelector("#description-link");
5+
const description = document.getElementById("description");
66
if (description != null) {
77
descriptionLink.classList.remove("jenkins-hidden");
88
descriptionLink.addEventListener("click", function (e) {
@@ -14,4 +14,25 @@
1414
});
1515
}
1616
});
17+
18+
Behaviour.specify(
19+
".description-cancel-button",
20+
"description-cancel-button",
21+
0,
22+
function (b) {
23+
b.onclick = function () {
24+
const descriptionLink = document.getElementById("description-link");
25+
const descriptionContent = document.getElementById(
26+
"description-content",
27+
);
28+
const descriptionEditForm = document.getElementById(
29+
"description-edit-form",
30+
);
31+
descriptionEditForm.innerHTML = "";
32+
descriptionEditForm.classList.add("jenkins-hidden");
33+
descriptionContent.classList.remove("jenkins-hidden");
34+
descriptionLink.classList.remove("jenkins-hidden");
35+
};
36+
},
37+
);
1738
})();

core/src/main/resources/lib/hudson/editableDescription.jelly

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ THE SOFTWARE.
4848
<j:set var="hideDescriptionButton" value="${hideButton}" defaultValue="false"/>
4949

5050
<div id="description" class="jenkins-!-margin-bottom-${hideButton?'3':'1'}">
51-
<div>
51+
<div id="description-content">
5252
<j:out value="${actualDescription!=null ? app.markupFormatter.translate(actualDescription) : ''}" />
5353
</div>
54-
54+
<div id="description-edit-form" class="jenkins-hidden"/>
5555
<j:if test="${!hideDescriptionButton}">
56-
<div class="jenkins-buttons-row jenkins-buttons-row--invert">
56+
<div class="jenkins-buttons-row jenkins-buttons-row--invert description-edit-button">
5757
<t:editDescriptionButton permission="${permission}" description="${actualDescription}" submissionUrl="${submissionUrl}"/>
5858
</div>
5959
</j:if>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ THE SOFTWARE.
8787
<changelog.url>https://www.jenkins.io/changelog</changelog.url>
8888

8989
<!-- Bundled Remoting version -->
90-
<remoting.version>3291.vb_131b_dc231fa_</remoting.version>
90+
<remoting.version>3299.v0d0d06908537</remoting.version>
9191

9292
<spotbugs.effort>Max</spotbugs.effort>
9393
<spotbugs.threshold>Medium</spotbugs.threshold>

test/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ THE SOFTWARE.
123123
<dependency>
124124
<groupId>org.jenkins-ci.plugins.workflow</groupId>
125125
<artifactId>workflow-api</artifactId>
126-
<version>1363.v03f731255494</version>
126+
<version>1366.vf1fb_e1a_f6b_22</version>
127127
</dependency>
128128
<dependency>
129129
<groupId>org.jenkins-ci.plugins.workflow</groupId>
@@ -242,7 +242,7 @@ THE SOFTWARE.
242242
<dependency>
243243
<groupId>org.jenkins-ci.plugins</groupId>
244244
<artifactId>matrix-auth</artifactId>
245-
<version>3.2.4</version>
245+
<version>3.2.5</version>
246246
<scope>test</scope>
247247
</dependency>
248248
<dependency>

war/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ THE SOFTWARE.
156156
<exclude>org.jenkins-ci:crypto-util</exclude>
157157
<exclude>org.jenkins-ci.main:cli</exclude>
158158
<exclude>org.jenkins-ci.main:jenkins-core</exclude>
159+
<exclude>org.jenkins-ci.main:remoting</exclude>
159160
<exclude>org.jenkins-ci.main:websocket-jetty12-ee9</exclude>
160161
<exclude>org.jenkins-ci.main:websocket-spi</exclude>
161162
<exclude>org.jenkins-ci:memory-monitor</exclude>
@@ -288,7 +289,7 @@ THE SOFTWARE.
288289
<!-- detached after 1.535 -->
289290
<groupId>org.jenkins-ci.plugins</groupId>
290291
<artifactId>matrix-auth</artifactId>
291-
<version>3.2.4</version>
292+
<version>3.2.5</version>
292293
<type>hpi</type>
293294
</artifactItem>
294295
<artifactItem>
@@ -323,7 +324,7 @@ THE SOFTWARE.
323324
<!-- dependency of junit, plugin-util-api, and workflow-support -->
324325
<groupId>org.jenkins-ci.plugins.workflow</groupId>
325326
<artifactId>workflow-api</artifactId>
326-
<version>1363.v03f731255494</version>
327+
<version>1366.vf1fb_e1a_f6b_22</version>
327328
<type>hpi</type>
328329
</artifactItem>
329330
<artifactItem>

war/src/main/webapp/scripts/hudson-behavior.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,12 +1874,10 @@ function xor(a, b) {
18741874
// used by editableDescription.jelly to replace the description field with a form
18751875
// eslint-disable-next-line no-unused-vars
18761876
function replaceDescription(initialDescription, submissionUrl) {
1877-
var d = document.getElementById("description");
1878-
let button = d.firstElementChild.nextElementSibling;
1879-
if (button !== null) {
1880-
d.firstElementChild.nextElementSibling.innerHTML =
1881-
"<div class='jenkins-spinner'></div>";
1882-
}
1877+
const descriptionContent = document.getElementById("description-content");
1878+
const descriptionEditForm = document.getElementById("description-edit-form");
1879+
descriptionEditForm.innerHTML = "<div class='jenkins-spinner'></div>";
1880+
descriptionContent.classList.add("jenkins-hidden");
18831881
let parameters = {};
18841882
if (initialDescription !== null && initialDescription !== "") {
18851883
parameters["description"] = initialDescription;
@@ -1895,10 +1893,11 @@ function replaceDescription(initialDescription, submissionUrl) {
18951893
body: objectToUrlFormEncoded(parameters),
18961894
}).then((rsp) => {
18971895
rsp.text().then((responseText) => {
1898-
d.innerHTML = responseText;
1896+
descriptionEditForm.innerHTML = responseText;
1897+
descriptionEditForm.classList.remove("jenkins-hidden");
18991898
evalInnerHtmlScripts(responseText, function () {
1900-
Behaviour.applySubtree(d);
1901-
d.getElementsByTagName("TEXTAREA")[0].focus();
1899+
Behaviour.applySubtree(descriptionEditForm);
1900+
descriptionEditForm.getElementsByTagName("TEXTAREA")[0].focus();
19021901
});
19031902
layoutUpdateCallback.call();
19041903
return false;

0 commit comments

Comments
 (0)