Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-55710, #28 - Fix icon upload iframe in global config #36

Merged
merged 4 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>

<!-- Disable resource filtering because *.jelly files contain
syntax like "${url}" that should refer to Jelly variables
at run time, rather than be replaced with POM properties
at build time. -->
<filtering>false</filtering>
</resource>
</resources>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<sl:links links="${it.links}"/>
</f:entry>
<f:entry>
<j:set var="url" value="${rootURL}/plugin/sidebar-link/startUpload"/>
<j:set var="url" value="${rootURL}/descriptorByName/hudson.plugins.sidebar_link.SidebarLinkPlugin/startUpload"/>
<iframe src="${url}" frameborder="0" style="width:100%;height:4em;margin-top:2em">
<a href="${url}" target="_blank">${%Upload image file...}</a>
</iframe>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:ajax>
<html>
<head>
<link rel="stylesheet" href="${resURL}/css/style.css" type="text/css" />
<link rel="stylesheet" href="${resURL}/css/color.css" type="text/css" />
</head>
<body>
<form method="post" action="upload" enctype="multipart/form-data">
<l:layout title="${%Upload image file}" type="full-screen">
<l:main-panel>
<form method="post" action="uploadLinkImage" enctype="multipart/form-data">
<span class="setting-name">${%Upload an image file:}</span>
<input type="file" name="linkimage.file" size="40"/>
<st:nbsp/>
<input type="submit" value="${%Upload}"/>
<br/>
<span class="setting-description">${%Image should be square; will be rendered as 24x24.}</span>
</form>
</body>
</html>
</l:ajax>
</l:main-panel>
</l:layout>
</j:jelly>