Skip to content

Commit

Permalink
Still has debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Nov 18, 2021
1 parent 0023d7e commit 03cac28
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 19 deletions.
5 changes: 3 additions & 2 deletions core/src/main/resources/lib/form/optionalBlock.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ THE SOFTWARE.

<j:choose>
<j:when test="${attrs.title!=null}">
<div class="optionalBlock-container jenkins-form-item">
<div class="optionalBlock-container jenkins-form-item jenkins-form-item--tight">
<div class="help-sibling tr optional-block-start row-group-start ${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
<div class="jenkins-checkbox-help-wrapper">
<f:checkbox name="${attrs.name}" class="optional-block-control block-control" onclick="javascript:updateOptionalBlock(this,true)"
Expand All @@ -87,7 +87,8 @@ THE SOFTWARE.
</j:when>

<j:otherwise>
<f:rowSet name="${attrs.name}">
hello
<f:rowSet name="${attrs.name}" class="jenkins-form-item--tight">
<d:invokeBody />
</f:rowSet>
</j:otherwise>
Expand Down
12 changes: 9 additions & 3 deletions core/src/main/resources/lib/form/rowSet.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ THE SOFTWARE.
<st:attribute name="ref">
id of the thing that serves as the group head, if that's available separately
</st:attribute>
<st:attribute name="class">
Classes to apply to the row set
</st:attribute>
</st:documentation>

<j:choose>
Expand All @@ -43,9 +46,12 @@ THE SOFTWARE.
<d:invokeBody />
</j:when>
<j:otherwise>
<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>
<p>asda</p>
<div class="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>
</div>
</j:otherwise>
</j:choose>
</j:jelly>
3 changes: 3 additions & 0 deletions core/src/main/resources/lib/form/section_.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ var section = (function (){
if (e.nodeType==1) {
if (e.className == "jenkins-section__title" && isVisible(e)) {
var child = new SectionNode(e);

console.log(e.className)

parent.children.push(child);
// The next line seems to be unnecessary, as there are no children inside the section header itself.
// So this code will always returns a flat list of section headers.
Expand Down
2 changes: 1 addition & 1 deletion war/src/main/js/config-scrollspy.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
.jenkins-config {
// The Section header for the General section was manufactured,
// so the default is to not display it.
.section-header-row.config_general .jenkins-section__header {
.section-header-row.config_general .jenkins-section__title {
display: none;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function fromConfigTable(configTable) {
} else {
tr = 'div';
}
var generalRow = $('<'+tr+' class="section-header-row insert first tr" title="General"><div class="jenkins-section__header"><a class="section-anchor">#</a>General</div></'+tr+'>');
var generalRow = $('<'+tr+' class="section-header-row insert first tr" title="General"><div class="jenkins-section__title"><a class="section-anchor">#</a>General</div></'+tr+'>');
firstRow.before(generalRow);
firstRow = configTableMetadata.getFirstRow();
var newArray = $.makeArray(topRows);
Expand Down
1 change: 1 addition & 0 deletions war/src/main/js/widgets/config/tabbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export var addTabs = function(configTable, options) {
}

var section;

for (var i = 0; i < configTableMetadata.sections.length; i++) {
section = configTableMetadata.sections[i];
var tab = newTab(section);
Expand Down
4 changes: 4 additions & 0 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
clear: both;
}

&--tight + .jenkins-form-item--tight {
background: red;
}

&--small {
max-width: var(--form-item-max-width--small);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section0" class="section-anchor">#</a>Advanced Project Options</div>
<div class="jenkins-section__title"><a id="section0" class="section-anchor">#</a>Advanced Project Options</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -128,7 +128,7 @@
<tr style="display:none" class="row-set-end radio-block-end row-group-end"></tr>
<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section2" class="section-anchor">#</a>Build Triggers</div>
<div class="jenkins-section__title"><a id="section2" class="section-anchor">#</a>Build Triggers</div>
</td>
</tr>
<tr class="optional-block-start row-group-start row-set-start" hashelp="true" ref="cb19">
Expand All @@ -140,7 +140,7 @@
</tr>
<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section3" class="section-anchor">#</a>Build</div>
<div class="jenkins-section__title"><a id="section3" class="section-anchor">#</a>Build</div>
</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section0" class="section-anchor">#</a>oДопълнителни настройки на проекта</div>
<div class="jenkins-section__title"><a id="section0" class="section-anchor">#</a>oДопълнителни настройки на проекта</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -128,7 +128,7 @@
<tr style="display:none" class="row-set-end radio-block-end row-group-end"></tr>
<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section2" class="section-anchor">#</a>Автоматично изпълнявани действия при изграждане</div>
<div class="jenkins-section__title"><a id="section2" class="section-anchor">#</a>Автоматично изпълнявани действия при изграждане</div>
</td>
</tr>
<tr class="optional-block-start row-group-start row-set-start" hashelp="true" ref="cb19">
Expand All @@ -140,7 +140,7 @@
</tr>
<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section3" class="section-anchor">#</a>Изграждане</div>
<div class="jenkins-section__title"><a id="section3" class="section-anchor">#</a>Изграждане</div>
</td>
</tr>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions war/src/test/js/widgets/config/freestyle-config-tabbed.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<div class="tr">
<div colspan="4">
<div class="jenkins-section__header"><a id="section0" class="section-anchor">#</a>Advanced Project Options</div>
<div class="jenkins-section__title"><a id="section0" class="section-anchor">#</a>Advanced Project Options</div>
</div>
</div>
<div class="tr">
Expand Down Expand Up @@ -123,7 +123,7 @@
<div style="display:none" class="tr row-set-end radio-block-end row-group-end"></div>
<div class="tr">
<div colspan="4">
<div class="jenkins-section__header"><a id="section2" class="section-anchor">#</a>Build Triggers</div>
<div class="jenkins-section__title"><a id="section2" class="section-anchor">#</a>Build Triggers</div>
</div>
</div>
<div class="tr optional-block-start row-group-start row-set-start" hashelp="true" ref="cb19">
Expand All @@ -135,7 +135,7 @@
</div>
<div class="tr">
<div colspan="4">
<div class="jenkins-section__header"><a id="section3" class="section-anchor">#</a>Build</div>
<div class="jenkins-section__title"><a id="section3" class="section-anchor">#</a>Build</div>
</div>
</div>
<div class="tr">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section0" class="section-anchor">#</a>Допълнителни настройки на проекта</div>
<div class="jenkins-section__title"><a id="section0" class="section-anchor">#</a>Допълнителни настройки на проекта</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -123,7 +123,7 @@
<tr style="display:none" class="row-set-end radio-block-end row-group-end"></tr>
<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section2" class="section-anchor">#</a>Автоматично изпълнявани действия при изграждане</div>
<div class="jenkins-section__title"><a id="section2" class="section-anchor">#</a>Автоматично изпълнявани действия при изграждане</div>
</td>
</tr>
<tr class="optional-block-start row-group-start row-set-start" hashelp="true" ref="cb19">
Expand All @@ -135,7 +135,7 @@
</tr>
<tr>
<td colspan="4">
<div class="jenkins-section__header"><a id="section3" class="section-anchor">#</a>Изграждане</div>
<div class="jenkins-section__title"><a id="section3" class="section-anchor">#</a>Изграждане</div>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 03cac28

Please sign in to comment.