aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-21 09:56:26 (EST)
committerWinston Prakash2011-12-01 20:46:52 (EST)
commitae4d34e02c10b161066aa24441b444a143025493 (patch)
tree0c6d43bd4d2b984802d2ebbb7137658a8d524506
parent93f3c6b6eecb9e39c828309d482e4b3edf6ff07b (diff)
downloadorg.eclipse.hudson.core-ae4d34e02c10b161066aa24441b444a143025493.zip
org.eclipse.hudson.core-ae4d34e02c10b161066aa24441b444a143025493.tar.gz
org.eclipse.hudson.core-ae4d34e02c10b161066aa24441b444a143025493.tar.bz2
Draft implementation of template highlighting for optionalBlock
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/main/resources/lib/form/optionalBlock.jelly13
-rw-r--r--hudson-core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly3
-rw-r--r--hudson-core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly3
-rw-r--r--hudson-core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly4
-rw-r--r--hudson-war/src/main/webapp/css/style.css4
5 files changed, 20 insertions, 7 deletions
diff --git a/hudson-core/src/main/resources/lib/form/optionalBlock.jelly b/hudson-core/src/main/resources/lib/form/optionalBlock.jelly
index fc2e7e4..99684c4 100644
--- a/hudson-core/src/main/resources/lib/form/optionalBlock.jelly
+++ b/hudson-core/src/main/resources/lib/form/optionalBlock.jelly
@@ -14,7 +14,6 @@
#
#************************************************************************** -->
-
<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">
<st:documentation>
Foldable block that can be expanded to show more controls by checking the checkbox.
@@ -45,21 +44,27 @@
<st:attribute name="inline">
if present, the foldable section will not be grouped into a separate JSON object upon submission
</st:attribute>
+ <st:attribute name="isTemplateValue">
+ if present and true - value is taken from parent template
+ </st:attribute>
</st:documentation>
<j:if test="${attrs.help==null}">
<!-- infer the help page from the current descriptor and field if possible -->
<j:set target="${attrs}" property="help"
value="${descriptor.getHelpFile(attrs.field)}" />
</j:if>
+ <j:if test="${attrs.isTemplateValue==null}">
+ <j:set target="${attrs}" property="isTemplateValue" value="false"/>
+ </j:if>
<tr class="optional-block-start ${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
- <td colspan="3">
+ <td colspan="3" class="${attrs.isTemplateValue? 'modified': ''}">
<f:checkbox name="${attrs.name}" onclick="javascript:updateOptionalBlock(this,true)"
negative="${attrs.negative}" checked="${attrs.checked}" field="${attrs.field}" title="${title}" />
</td>
<j:if test="${attrs.help!=null}">
<td>
- <a href="#" class="help-button" helpURL="${rootURL}${attrs.help}"><img src="${imagesURL}/16x16/help.png" alt="Help for feature: ${title}" /></a>
+ <a href="#" class="help-button" helpURL="${rootURL}${attrs.help}"><img src="${imagesURL}/16x16/help.gif" alt="Help for feature: ${title}" /></a>
</td>
</j:if>
</tr>
@@ -69,4 +74,4 @@
<d:invokeBody />
<!-- end marker -->
<tr class="${attrs.inline?'':'row-set-end'} optional-block-end" />
-</j:jelly>
+</j:jelly> \ No newline at end of file
diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly
index 39d44a4..e0c7e6b 100644
--- a/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly
+++ b/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly
@@ -20,5 +20,6 @@
<f:optionalBlock name="blockBuildWhenDownstreamBuilding"
title="${%Block build when downstream project is building}"
help="/help/project-config/block-downstream-building.html"
- checked="${it.blockBuildWhenDownstreamBuilding()}" />
+ checked="${it.blockBuildWhenDownstreamBuilding()}"
+ isTemplateValue="${null != it.blockBuildWhenDownstreamBuilding(false)}"/>
</j:jelly>
diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
index 8ac161b..cc863fa 100644
--- a/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
+++ b/hudson-core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
@@ -20,5 +20,6 @@
<f:optionalBlock name="blockBuildWhenUpstreamBuilding"
title="${%Block build when upstream project is building}"
help="/help/project-config/block-upstream-building.html"
- checked="${it.blockBuildWhenUpstreamBuilding()}" />
+ checked="${it.blockBuildWhenUpstreamBuilding()}"
+ isTemplateValue="${null != it.blockBuildWhenUpstreamBuilding(false)}"/>
</j:jelly>
diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly
index 3292e26..0090ede 100644
--- a/hudson-core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly
+++ b/hudson-core/src/main/resources/lib/hudson/project/config-cleanWorkspace.jelly
@@ -17,6 +17,8 @@
<!-- clean workspace -->
<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">
- <f:optionalBlock name="cleanWorkspaceRequired" title="${%Clean workspace before build}" checked="${it.cleanWorkspaceRequired}"
+ <f:optionalBlock name="cleanWorkspaceRequired" title="${%Clean workspace before build}"
+ checked="${it.cleanWorkspaceRequired}"
+ isTemplateValue="${null != it.cleanWorkspaceRequired(false)}"
help="/help/project-config/cleanWorkspace.html" />
</j:jelly>
diff --git a/hudson-war/src/main/webapp/css/style.css b/hudson-war/src/main/webapp/css/style.css
index 3e6fc7d..6d32271 100644
--- a/hudson-war/src/main/webapp/css/style.css
+++ b/hudson-war/src/main/webapp/css/style.css
@@ -1001,3 +1001,7 @@ div.deleteSlaveDialog h4 {
color: #F89938;
}
+/* ======================== "Cascading project" ==========================*/
+tr.optional-block-start > td.modified {
+ background-color: #FFE8C9;
+} \ No newline at end of file