Skip to content

Commit

Permalink
Fix issues with table to div migration
Browse files Browse the repository at this point in the history
  • Loading branch information
asc3ns10n authored and mtughan committed Jun 10, 2021
1 parent 3b35210 commit 6448741
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
15 changes: 15 additions & 0 deletions src/main/resources/lib/scriptler/blockWrapper.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:d="jelly:define">
<j:choose>
<j:when test="${divBasedFormLayout}">
<div style="${attrs.style}">
<d:invokeBody/>
</div>
</j:when>
<j:otherwise>
<table style="${attrs.style}">
<d:invokeBody/>
</table>
</j:otherwise>
</j:choose>
</j:jelly>
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:p="/lib/scriptler">

<l:layout permission="${it.scriptlerConfigure}" norefresh="true">
<st:include page="sidepanel.jelly" />
Expand All @@ -52,22 +52,22 @@ THE SOFTWARE.
<f:checkbox name="onlyMaster" checked="${script.onlyMaster}" />
</f:entry>
<f:block>
<table>
<p:blockWrapper>
<f:optionalBlock name="defineParams" title="${%ParametersDescription}" checked="${!empty(script.parameters)}">
<f:entry title="${%Parameters}" field="parameters">
<f:repeatable var="param" items="${script.parameters}" name="parameters" noAddButton="true" minimum="1">
<table width="100%">
<p:blockWrapper style="width:100%">
<f:entry>
${%ParameterName} <input type="text" name="name" value="${param.name}" size="50"/>
${%ParameterDefaultValue} <input type="text" name="value" value="${param.value}" size="80"/>
<input type="button" name="delete_button" value="${%DeleteParameter}" class="repeatable-delete show-if-not-only" style="margin-left: 1em;" />
<input type="button" name="add_button" value="${%AddParameter}" class="repeatable-add show-if-last" />
</f:entry>
</table>
</p:blockWrapper>
</f:repeatable>
</f:entry>
</f:optionalBlock>
</table>
</p:blockWrapper>
</f:block>
<f:entry title="${%Script}">
<textarea id="script" name="script" class="script">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.
<!--Used for the build step popup "view selected script"-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:p="/lib/scriptler">
<script src="${it.pluginResourcePath}lib/codemirror.js"></script>
<link rel="stylesheet" href="${it.pluginResourcePath}lib/codemirror.css" ></link>
<script src="${it.pluginResourcePath}mode/clike/clike.js"></script>
Expand Down Expand Up @@ -55,20 +55,20 @@ THE SOFTWARE.
<f:textbox name="comment" value="${script.comment}" disabled="true"/>
</f:entry>
<f:block>
<table>
<p:blockWrapper>
<f:optionalBlock name="defineParams" title="${%ParamDefinition}" checked="${!empty(script.parameters)}" >
<f:entry title="${%Parameters}" field="parameters" disabled="true">
<f:repeatable var="param" items="${script.parameters}" name="parameters" noAddButton="true" minimum="1">
<table width="100%">
<p:blockWrapper style="width:100%">
<f:entry>
${%ParameterName} <input type="text" name="name" value="${param.name}" size="50" disabled="true"/>
${%ParameterDefaultValue} <input type="text" name="value" value="${param.value}" size="80" disabled="true"/>
</f:entry>
</table>
</p:blockWrapper>
</f:repeatable>
</f:entry>
</f:optionalBlock>
</table>
</p:blockWrapper>
</f:block>
<f:entry title="${%Script}">
<textarea id="script" name="script" style="width:100%; height:20em">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:p="/lib/scriptler">

<st:adjunct assumes="org.kohsuke.stapler.framework.prototype.prototype" includes="org.kohsuke.stapler.bind"/>
<st:once>
Expand Down Expand Up @@ -41,22 +41,22 @@
</f:entry>
</f:block>
<f:block>
<table>
<p:blockWrapper>
<f:optionalBlock name="defineParams" title="${%ParametersDescription}" checked="${!empty(instance.parameters)}" help="/plugin/scriptler/help-params.html">
<f:entry title="${%Parameters}" field="parameters">
<f:repeatable var="param" items="${instance.parameters}" name="parameters" noAddButton="true" minimum="1">
<table width="100%">
<p:blockWrapper style="width:100%">
<f:entry>
${%ParameterName} <input type="text" name="name" value="${param.name}" size="50"/>
${%ParameterValue} <input type="text" name="value" value="${param.value}" size="80"/>
<input type="button" name="delete_button" value="${%DeleteParameter}" class="repeatable-delete show-if-not-only" style="margin-left: 1em;" />
<input type="button" name="add_button" value="${%AddParameter}" class="repeatable-add show-if-last" />
</f:entry>
</table>
</p:blockWrapper>
</f:repeatable>
</f:entry>
</f:optionalBlock>
</table>
</p:blockWrapper>
</f:block>
</f:entry>
</j:otherwise>
Expand Down

0 comments on commit 6448741

Please sign in to comment.