| author | akozak | 2011-11-21 09:56:26 (EST) |
|---|---|---|
| committer | Winston Prakash | 2011-12-01 20:46:52 (EST) |
| commit | 02c65ab570fdaf253f78b9a4256327f48a151121 (patch) (side-by-side diff) | |
| tree | 9c93f5205b08493e44a13451241e15e94b14bdf5 | |
| parent | 87f77de516798893892ea675511ac902be79e082 (diff) | |
| download | org.eclipse.hudson.core-02c65ab570fdaf253f78b9a4256327f48a151121.zip org.eclipse.hudson.core-02c65ab570fdaf253f78b9a4256327f48a151121.tar.gz org.eclipse.hudson.core-02c65ab570fdaf253f78b9a4256327f48a151121.tar.bz2 | |
Draft implementation of template highlighting for optionalBlock
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
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 |

