Repository: incubator-freemarker-online-tester Updated Branches: refs/heads/master c2c5072f7 -> 4ddb62e11
Added some help to dropdowns Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-online-tester/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-online-tester/commit/4ddb62e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-online-tester/tree/4ddb62e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker-online-tester/diff/4ddb62e1 Branch: refs/heads/master Commit: 4ddb62e1159f4866d161494ffcd9bea3b5ecd612 Parents: c2c5072 Author: ddekany <ddek...@apache.org> Authored: Tue Nov 7 22:49:28 2017 +0100 Committer: ddekany <ddek...@apache.org> Committed: Tue Nov 7 22:49:28 2017 +0100 ---------------------------------------------------------------------- src/main/resources/view/freemarker-online.ftl | 10 +++++++--- src/main/resources/view/utils.ftl | 10 ++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-freemarker-online-tester/blob/4ddb62e1/src/main/resources/view/freemarker-online.ftl ---------------------------------------------------------------------- diff --git a/src/main/resources/view/freemarker-online.ftl b/src/main/resources/view/freemarker-online.ftl index 7c57f3e..5152a4b 100644 --- a/src/main/resources/view/freemarker-online.ftl +++ b/src/main/resources/view/freemarker-online.ftl @@ -111,13 +111,17 @@ someXML = <example x="1">text</example></pre></div> >${dataModel}</textarea> <div class="formPanel"> <div class="horizontalBox"> - <@u.htmlSelect caption="Output format" name="outputFormat" selectionOptions=outputFormats /> + <@u.htmlSelect caption="Output format" name="outputFormat" selectionOptions=outputFormats + helpLink='http://freemarker.apache.org/docs/dgui_misc_autoescaping.html' + helpHover='Influences auto-escaping' /> </div> <div class="horizontalBox"> - <@u.htmlSelect caption="Locale" name="locale" selectionOptions=locales /> + <@u.htmlSelect caption="Locale" name="locale" selectionOptions=locales + helpHover='Influences how numbers and date/time values are formatted' /> </div> <div class="horizontalBox"> - <@u.htmlSelect caption="Time zone" name="timeZone" selectionOptions=timeZones /> + <@u.htmlSelect caption="Time zone" name="timeZone" selectionOptions=timeZones + helpHover='Date/time values are shown as seen from this time zone' /> </div> </div> <div class="formBottomButtonsContainer"> http://git-wip-us.apache.org/repos/asf/incubator-freemarker-online-tester/blob/4ddb62e1/src/main/resources/view/utils.ftl ---------------------------------------------------------------------- diff --git a/src/main/resources/view/utils.ftl b/src/main/resources/view/utils.ftl index 4140ccc..187c98d 100644 --- a/src/main/resources/view/utils.ftl +++ b/src/main/resources/view/utils.ftl @@ -23,14 +23,16 @@ --> -<#macro htmlSelect caption name selectionOptions> - <div>${caption}:</div> +<#macro htmlSelect caption name selectionOptions helpLink='' helpHover=''> + <div <@titleAttr helpHover />>${caption}<#if helpLink != ''> (<a href='${helpLink}' target='_blank'>?</a>)</#if></div> <div> - <select name="${name}" id="${name}" class="pure-input-1"> + <select name="${name}" id="${name}" class="pure-input-1" <@titleAttr helpHover />> <#list selectionOptions as selectionOption> <#local value = selectionOption.value> <option value="${value}"<#if value == .vars[name]!> selected</#if>>${selectionOption.label}</option> </#list> </select> </div> -</#macro> \ No newline at end of file +</#macro> + +<#macro titleAttr title><#if title != ''>title="${title}"</#if></#macro> \ No newline at end of file