From 9e4d5ecbc453b3d5187d00d14faba3e4064b0b86 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sat, 20 Jul 2024 08:16:15 +0200 Subject: [PATCH 1/8] WW-5444 Defines new html5 theme --- .../struts2/showcase/action/Html5Action.java | 14 ++ apps/showcase/src/main/resources/struts.xml | 6 + .../main/resources/template/html5/a-close.ftl | 50 ++++++ .../src/main/resources/template/html5/a.ftl | 20 +++ .../resources/template/html5/actionerror.ftl | 44 ++++++ .../template/html5/actionmessage.ftl | 44 ++++++ .../resources/template/html5/checkbox.ftl | 52 ++++++ .../resources/template/html5/checkboxlist.ftl | 120 ++++++++++++++ .../resources/template/html5/combobox.ftl | 102 ++++++++++++ .../template/html5/common-attributes.ftl | 25 +++ .../template/html5/controlfooter.ftl | 20 +++ .../template/html5/controlheader.ftl | 20 +++ .../src/main/resources/template/html5/css.ftl | 35 ++++ .../template/html5/datetextfield.ftl | 21 +++ .../main/resources/template/html5/debug.ftl | 92 +++++++++++ .../resources/template/html5/doubleselect.ftl | 21 +++ .../template/html5/dynamic-attributes.ftl | 45 ++++++ .../main/resources/template/html5/empty.ftl | 20 +++ .../resources/template/html5/fielderror.ftl | 84 ++++++++++ .../main/resources/template/html5/file.ftl | 49 ++++++ .../resources/template/html5/form-close.ftl | 22 +++ .../main/resources/template/html5/form.ftl | 72 +++++++++ .../main/resources/template/html5/head.ftl | 23 +++ .../main/resources/template/html5/hidden.ftl | 43 +++++ .../template/html5/inputtransferselect.ftl | 21 +++ .../main/resources/template/html5/label.ftl | 42 +++++ .../main/resources/template/html5/link.ftl | 74 +++++++++ .../main/resources/template/html5/nonce.ftl | 25 +++ .../resources/template/html5/optgroup.ftl | 71 +++++++++ .../template/html5/optiontransferselect.ftl | 21 +++ .../resources/template/html5/password.ftl | 55 +++++++ .../html5/prefixed-dynamic-attributes.ftl | 37 +++++ .../resources/template/html5/radiomap.ftl | 107 +++++++++++++ .../main/resources/template/html5/reset.ftl | 84 ++++++++++ .../resources/template/html5/script-close.ftl | 21 +++ .../main/resources/template/html5/script.ftl | 53 +++++++ .../template/html5/scripting-events.ftl | 64 ++++++++ .../main/resources/template/html5/select.ftl | 149 ++++++++++++++++++ .../resources/template/html5/submit-close.ftl | 29 ++++ .../main/resources/template/html5/submit.ftl | 94 +++++++++++ .../main/resources/template/html5/text.ftl | 56 +++++++ .../resources/template/html5/textarea.ftl | 65 ++++++++ .../main/resources/template/html5/token.ftl | 22 +++ .../resources/template/html5/updownselect.ftl | 21 +++ .../src/main/webapp/WEB-INF/html5/index.jsp | 69 ++++++++ 45 files changed, 2224 insertions(+) create mode 100644 apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java create mode 100644 apps/showcase/src/main/resources/template/html5/a-close.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/a.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/actionerror.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/actionmessage.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/checkbox.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/checkboxlist.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/combobox.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/common-attributes.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/controlfooter.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/controlheader.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/css.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/datetextfield.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/debug.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/doubleselect.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/dynamic-attributes.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/empty.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/fielderror.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/file.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/form-close.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/form.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/head.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/hidden.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/inputtransferselect.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/label.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/link.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/nonce.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/optgroup.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/optiontransferselect.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/password.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/radiomap.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/reset.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/script-close.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/script.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/scripting-events.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/select.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/submit-close.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/submit.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/text.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/textarea.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/token.ftl create mode 100644 apps/showcase/src/main/resources/template/html5/updownselect.ftl create mode 100644 apps/showcase/src/main/webapp/WEB-INF/html5/index.jsp diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java new file mode 100644 index 0000000000..b80c73d751 --- /dev/null +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/Html5Action.java @@ -0,0 +1,14 @@ +package org.apache.struts2.showcase.action; + +import com.opensymphony.xwork2.ActionSupport; + +public class Html5Action extends ActionSupport { + + @Override + public String execute() throws Exception { + addActionError("Action error: only html5"); + addActionMessage("Action message: only html5"); + addFieldError("testField","Field error: only html5"); + return super.execute(); + } +} diff --git a/apps/showcase/src/main/resources/struts.xml b/apps/showcase/src/main/resources/struts.xml index 1b57083b33..5c1cf37ff8 100644 --- a/apps/showcase/src/main/resources/struts.xml +++ b/apps/showcase/src/main/resources/struts.xml @@ -160,6 +160,12 @@ + + + /WEB-INF/html5/index.jsp + + + diff --git a/apps/showcase/src/main/resources/template/html5/a-close.ftl b/apps/showcase/src/main/resources/template/html5/a-close.ftl new file mode 100644 index 0000000000..15465dec82 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/a-close.ftl @@ -0,0 +1,50 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<@compress single_line=true> + + id="${parameters.id}" + +<#if parameters.href??> + href="${parameters.href?no_esc}" + +<#if parameters.disabled!false> + disabled="disabled" + +<#if parameters.tabindex??> + tabindex="${parameters.tabindex}" + +<#if parameters.cssClass??> + class="${parameters.cssClass}" + +<#if parameters.cssStyle??> + style="${parameters.cssStyle}" + +<#if parameters.title??> + title="${parameters.title}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +>${tag.escapeHtmlBody()?then(parameters.body, parameters.body?no_esc)} + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/a.ftl b/apps/showcase/src/main/resources/template/html5/a.ftl new file mode 100644 index 0000000000..2ffa2ec5d1 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/a.ftl @@ -0,0 +1,20 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> \ No newline at end of file diff --git a/apps/showcase/src/main/resources/template/html5/actionerror.ftl b/apps/showcase/src/main/resources/template/html5/actionerror.ftl new file mode 100644 index 0000000000..e6586adefd --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/actionerror.ftl @@ -0,0 +1,44 @@ +<#ftl strip_whitespace=true strip_text=true/> +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#if (actionErrors?? && actionErrors?size > 0)> + <@compress single_line=true> + + + diff --git a/apps/showcase/src/main/resources/template/html5/actionmessage.ftl b/apps/showcase/src/main/resources/template/html5/actionmessage.ftl new file mode 100644 index 0000000000..606c460e34 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/actionmessage.ftl @@ -0,0 +1,44 @@ +<#ftl strip_whitespace=true strip_text=true/> +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#if (actionMessages?? && actionMessages?size > 0 && !parameters.isEmptyList)> + <@compress single_line=true> + + + diff --git a/apps/showcase/src/main/resources/template/html5/checkbox.ftl b/apps/showcase/src/main/resources/template/html5/checkbox.ftl new file mode 100644 index 0000000000..134f5d280a --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/checkbox.ftl @@ -0,0 +1,52 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + + checked="checked" + +<#if parameters.disabled!false> + disabled="disabled" + +<#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex}" + +<#if parameters.id?has_content> + id="${parameters.id}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> +<#if parameters.title?has_content> + title="${parameters.title}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +/> +<#if parameters.submitUnchecked!false> + + disabled="disabled" + + /> + + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/checkboxlist.ftl b/apps/showcase/src/main/resources/template/html5/checkboxlist.ftl new file mode 100644 index 0000000000..17745976cb --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/checkboxlist.ftl @@ -0,0 +1,120 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> +<#assign itemCount = 0/> +<#if parameters.list??> +<@s.iterator value="parameters.list"> + <#assign itemCount = itemCount + 1/> + <#if parameters.listKey??> + <#assign itemKey = stack.findValue(parameters.listKey)/> + <#assign itemKeyStr = stack.findString(parameters.listKey)/> + <#else> + <#assign itemKey = stack.findValue('top')/> + <#assign itemKeyStr = stack.findString('top')> + + <#if parameters.listLabelKey??> + <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale + file for it's localized value. This is then used as a label --> + <#assign itemValue = struts.getText(stack.findString(parameters.listLabelKey))/> + <#elseif parameters.listValue??> + <#assign itemValue = stack.findString(parameters.listValue)!""/> + <#else> + <#assign itemValue = stack.findString('top')/> + + <#if parameters.listCssClass??> + <#if stack.findString(parameters.listCssClass)??> + <#assign itemCssClass= stack.findString(parameters.listCssClass)/> + <#else> + <#assign itemCssClass = ''/> + + + <#if parameters.listCssStyle??> + <#if stack.findString(parameters.listCssStyle)??> + <#assign itemCssStyle= stack.findString(parameters.listCssStyle)/> + <#else> + <#assign itemCssStyle = ''/> + + + <#if parameters.listTitle??> + <#if stack.findString(parameters.listTitle)??> + <#assign itemTitle= stack.findString(parameters.listTitle)/> + <#else> + <#assign itemTitle = ''/> + + + + id="${parameters.id}-${itemCount}" +<#else> + id="${parameters.name}-${itemCount}" + +<#if tag.contains(parameters.nameValue, itemKey)> + checked="checked" + +<#if parameters.disabled!false> + disabled="disabled" + +<#if itemCssClass??> + class="${itemCssClass}" +<#else> +<#if parameters.cssClass?has_content> + class="${parameters.cssClass}" + + +<#if itemCssStyle??> + style="${itemCssStyle}" +<#else> +<#if parameters.cssStyle?has_content> + style="${parameters.cssStyle}" + + +<#if itemTitle??> + title="${itemTitle}" +<#else> +<#if parameters.title?has_content> + title="${parameters.title}" + + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> +<#global evaluate_dynamic_attributes = true/> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> + + + +<#else> + + + disabled="disabled" + + /> + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/combobox.ftl b/apps/showcase/src/main/resources/template/html5/combobox.ftl new file mode 100644 index 0000000000..3056e09353 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/combobox.ftl @@ -0,0 +1,102 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<@s.script> + function autoPopulate_${parameters.escapedId}(targetElement) { + <#if parameters.headerKey?? && parameters.headerValue??> + if (targetElement.options[targetElement.selectedIndex].value == '${parameters.headerKey?js_string}') { + return; + } + + <#if parameters.emptyOption!false> + if (targetElement.options[targetElement.selectedIndex].value == '') { + return; + } + + targetElement.form.elements['${parameters.name?js_string}'].value=targetElement.options[targetElement.selectedIndex].value; + } + +<#include "/${parameters.templateDir}/html5/text.ftl" /> +<#compress> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> + <#if parameters.list??> + + + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/common-attributes.ftl b/apps/showcase/src/main/resources/template/html5/common-attributes.ftl new file mode 100644 index 0000000000..0bfe73fc50 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/common-attributes.ftl @@ -0,0 +1,25 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#compress> +<#if parameters.accesskey?has_content> + accesskey="${parameters.accesskey}" + + diff --git a/apps/showcase/src/main/resources/template/html5/controlfooter.ftl b/apps/showcase/src/main/resources/template/html5/controlfooter.ftl new file mode 100644 index 0000000000..1626c3cd92 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/controlfooter.ftl @@ -0,0 +1,20 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> diff --git a/apps/showcase/src/main/resources/template/html5/controlheader.ftl b/apps/showcase/src/main/resources/template/html5/controlheader.ftl new file mode 100644 index 0000000000..1626c3cd92 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/controlheader.ftl @@ -0,0 +1,20 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> diff --git a/apps/showcase/src/main/resources/template/html5/css.ftl b/apps/showcase/src/main/resources/template/html5/css.ftl new file mode 100644 index 0000000000..07220ac9fa --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/css.ftl @@ -0,0 +1,35 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#compress> +<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors.get(parameters.name)??/> +<#if parameters.cssClass?has_content && !(hasFieldErrors && parameters.cssErrorClass??)> + class="${parameters.cssClass}" +<#elseif parameters.cssClass?has_content && (hasFieldErrors && parameters.cssErrorClass??)> + class="${parameters.cssClass} ${parameters.cssErrorClass}" +<#elseif !(parameters.cssClass?has_content) && (hasFieldErrors && parameters.cssErrorClass??)> + class="${parameters.cssErrorClass}" + +<#if parameters.cssStyle?has_content && !(hasFieldErrors && (parameters.cssErrorStyle?? || parameters.cssErrorClass??))> + style="${parameters.cssStyle}" +<#elseif hasFieldErrors && parameters.cssErrorStyle??> + style="${parameters.cssErrorStyle}" + + diff --git a/apps/showcase/src/main/resources/template/html5/datetextfield.ftl b/apps/showcase/src/main/resources/template/html5/datetextfield.ftl new file mode 100644 index 0000000000..25f198f447 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/datetextfield.ftl @@ -0,0 +1,21 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +
Tag
<s:datetextfield/>
works only with the JavaTemplates Plugin!
diff --git a/apps/showcase/src/main/resources/template/html5/debug.ftl b/apps/showcase/src/main/resources/template/html5/debug.ftl new file mode 100644 index 0000000000..8897022138 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/debug.ftl @@ -0,0 +1,92 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<@s.script> + function toggleDebug(debugId) { + var debugDiv = document.getElementById(debugId); + if (debugDiv) { + var display = debugDiv.style.display; + if (display == 'none') { + debugDiv.style.display = 'block'; + } else if (display == 'block') { + debugDiv.style.display = 'none'; + } + } + } + + + +
+ +[Debug] + +<@s.script> + document.getElementById('toggle-button').onclick = function() { + toggleDebug('<#if parameters.id??>${parameters.id}<#else>debug'); + return false; + } + diff --git a/apps/showcase/src/main/resources/template/html5/doubleselect.ftl b/apps/showcase/src/main/resources/template/html5/doubleselect.ftl new file mode 100644 index 0000000000..14ff8668c7 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/doubleselect.ftl @@ -0,0 +1,21 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +
Tag
<s:doubleselect/>
is not supported in this theme!
diff --git a/apps/showcase/src/main/resources/template/html5/dynamic-attributes.ftl b/apps/showcase/src/main/resources/template/html5/dynamic-attributes.ftl new file mode 100644 index 0000000000..246ec466f3 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/dynamic-attributes.ftl @@ -0,0 +1,45 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#compress> +<#function acceptKey(key)> + <#if dynamic_attributes_ignore??> + <#return !key?starts_with(dynamic_attributes_ignore) > + <#else> + <#return true> + + +<#if (parameters.dynamicAttributes?? && parameters.dynamicAttributes?size > 0)> +<#assign aKeys = parameters.dynamicAttributes.keySet()> +<#list aKeys?filter(acceptKey) as aKey> +<#assign keyValue = parameters.dynamicAttributes.get(aKey)/> +<#if keyValue?is_string> + <#if evaluate_dynamic_attributes!false == true> + <#assign value = struts.translateVariables(keyValue)!keyValue/> + <#else> + <#assign value = keyValue/> + +<#else> + <#assign value = keyValue?string/> + + ${aKey}="${value}" + + + diff --git a/apps/showcase/src/main/resources/template/html5/empty.ftl b/apps/showcase/src/main/resources/template/html5/empty.ftl new file mode 100644 index 0000000000..1626c3cd92 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/empty.ftl @@ -0,0 +1,20 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> diff --git a/apps/showcase/src/main/resources/template/html5/fielderror.ftl b/apps/showcase/src/main/resources/template/html5/fielderror.ftl new file mode 100644 index 0000000000..4381fdcd5e --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/fielderror.ftl @@ -0,0 +1,84 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#if fieldErrors??> + <#compress> + <#assign eKeys = fieldErrors.keySet()> + <#assign eKeysSize = eKeys.size()> + <#assign doneStartUlTag=false> + <#assign doneEndUlTag=false> + <#assign haveMatchedErrorField=false> + <#if (fieldErrorFieldNames?size > 0) > + <#list fieldErrorFieldNames as fieldErrorFieldName> + <#list eKeys as eKey> + <#if (eKey = fieldErrorFieldName)> + <#assign haveMatchedErrorField=true> + <#assign eValue = fieldErrors.get(fieldErrorFieldName)> + <#if (haveMatchedErrorField && (!doneStartUlTag))> + + <#assign doneEndUlTag=true> + + <#else> + <#if (eKeysSize > 0)> + + + + + diff --git a/apps/showcase/src/main/resources/template/html5/file.ftl b/apps/showcase/src/main/resources/template/html5/file.ftl new file mode 100644 index 0000000000..60a486f502 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/file.ftl @@ -0,0 +1,49 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + + size="${parameters.get("size")}" + +<#if parameters.disabled!false> + disabled="disabled" + +<#if parameters.accept?has_content> + accept="${parameters.accept}" + +<#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex}" + +<#if parameters.id?has_content> + id="${parameters.id}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> +<#if parameters.title?has_content> + title="${parameters.title}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +/> + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/form-close.ftl b/apps/showcase/src/main/resources/template/html5/form-close.ftl new file mode 100644 index 0000000000..f3aaa7491f --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/form-close.ftl @@ -0,0 +1,22 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/form.ftl b/apps/showcase/src/main/resources/template/html5/form.ftl new file mode 100644 index 0000000000..f0eaa4342a --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/form.ftl @@ -0,0 +1,72 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> +<#if (parameters.validate!false == false)> + <#if parameters.onsubmit?has_content> + ${tag.addParameter('onsubmit', "${parameters.onsubmit}") } + + +
+ id="${parameters.id}" + +<#if parameters.name?has_content> + name="${parameters.name}" + +<#if parameters.onsubmit?has_content> + onsubmit="<#outputformat 'JavaScript'>${parameters.onsubmit}" + +<#if parameters.onreset?has_content> + onreset="<#outputformat 'JavaScript'>${parameters.onreset}" + +<#if parameters.action?has_content> + action="${parameters.action}" + +<#if parameters.target?has_content> + target="${parameters.target}" + +<#if parameters.method?has_content> + method="${parameters.method}" +<#else> + method="post" + +<#if parameters.enctype?has_content> + enctype="${parameters.enctype}" + +<#if parameters.cssClass?has_content> + class="${parameters.cssClass}" + +<#if parameters.cssStyle?has_content> + style="${parameters.cssStyle}" + +<#if parameters.title?has_content> + title="${parameters.title}" + +<#if parameters.acceptcharset?has_content> + accept-charset="${parameters.acceptcharset}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +<#if parameters.onreset?has_content> + onreset="${parameters.onreset}" + +> + diff --git a/apps/showcase/src/main/resources/template/html5/head.ftl b/apps/showcase/src/main/resources/template/html5/head.ftl new file mode 100644 index 0000000000..01c5141a93 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/head.ftl @@ -0,0 +1,23 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<@compress single_line=true> +<@s.script src="${base}${parameters.staticContentPath}/utils.js" /> + diff --git a/apps/showcase/src/main/resources/template/html5/hidden.ftl b/apps/showcase/src/main/resources/template/html5/hidden.ftl new file mode 100644 index 0000000000..7e7184953f --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/hidden.ftl @@ -0,0 +1,43 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + + value="<@s.property value="parameters.nameValue"/>" + +<#if parameters.id?has_content> + id="${parameters.id}" + +<#if parameters.cssClass?has_content> + class="${parameters.cssClass}" + +<#if parameters.cssStyle?has_content> + style="${parameters.cssStyle}" + +<#if parameters.disabled!false> + disabled="disabled" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +/> + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/inputtransferselect.ftl b/apps/showcase/src/main/resources/template/html5/inputtransferselect.ftl new file mode 100644 index 0000000000..066f9534aa --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/inputtransferselect.ftl @@ -0,0 +1,21 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +
Tag
<s:inputtransferselect/>
is not supported in this theme!
\ No newline at end of file diff --git a/apps/showcase/src/main/resources/template/html5/label.ftl b/apps/showcase/src/main/resources/template/html5/label.ftl new file mode 100644 index 0000000000..730efb048e --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/label.ftl @@ -0,0 +1,42 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/link.ftl b/apps/showcase/src/main/resources/template/html5/link.ftl new file mode 100644 index 0000000000..891d237638 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/link.ftl @@ -0,0 +1,74 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<@compress single_line=true> + + rel="${parameters.rel}" + <#else> + rel="stylesheet" + + <#if parameters.type?has_content> + type="${parameters.type}" + <#else> + type="text/css" + + <#if parameters.href?has_content> + href="${parameters.href}" + + <#if parameters.hreflang?has_content> + hreflang="${parameters.hreflang}" + + <#if parameters.disabled?has_content && parameters.disabled == "true"> + disabled + + <#if parameters.media?has_content> + media="${parameters.media}" + <#else> + media="all" + + <#if parameters.title?has_content> + title="${parameters.title}" + + <#if parameters.as?has_content> + as="${parameters.as}" + + <#if parameters.referrerpolicy?has_content> + referrerpolicy="${parameters.referrerpolicy}" + + <#if parameters.sizes?has_content> + sizes="${parameters.sizes}" + + <#if parameters.crossorigin?has_content> + crossorigin="${parameters.crossorigin}" + + <#if parameters.integrity?has_content> + integrity="${parameters.integrity}" + + <#if parameters.importance?has_content> + importance="${parameters.importance}" + + <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/nonce.ftl" /> + /> + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/nonce.ftl b/apps/showcase/src/main/resources/template/html5/nonce.ftl new file mode 100644 index 0000000000..4e1efe1799 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/nonce.ftl @@ -0,0 +1,25 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#compress> +<#if parameters.nonce?has_content> + nonce="${parameters.nonce}" + + diff --git a/apps/showcase/src/main/resources/template/html5/optgroup.ftl b/apps/showcase/src/main/resources/template/html5/optgroup.ftl new file mode 100644 index 0000000000..8273a5d00f --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/optgroup.ftl @@ -0,0 +1,71 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#if parameters.optGroupInternalListUiBeanList??> + <#compress> + <#assign optGroupInternalListUiBeans=parameters.optGroupInternalListUiBeanList /> + <#list optGroupInternalListUiBeans as optGroupInternalListUiBean> + + <#if optGroupInternalListUiBean.parameters.label?has_content> + label="${optGroupInternalListUiBean.parameters.label}"<#rt> + + <#if optGroupInternalListUiBean.parameters.disabled!false> + disabled="disabled"<#rt> + + <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> + > + <#list optGroupInternalListUiBean.parameters.list as optGroupBean> + <#assign trash=stack.push(optGroupBean) /> + <#assign tmpKey=stack.findValue(optGroupInternalListUiBean.parameters.listKey) /> + <#assign tmpValue=stack.findValue(optGroupInternalListUiBean.parameters.listValue) /> + <#assign tmpKeyStr = tmpKey.toString() /> + <#assign optGroupItemCssClass = ''/> + <#if optGroupInternalListUiBean.parameters.listCssClass??> + <#assign optGroupItemCssClass= stack.findString(optGroupInternalListUiBean.parameters.listCssClass)!''/> + + <#assign optGroupItemCssStyle = ''/> + <#if optGroupInternalListUiBean.parameters.listCssStyle??> + <#assign optGroupItemCssStyle= stack.findString(optGroupInternalListUiBean.parameters.listCssStyle)!''/> + + <#assign optGroupItemTitle = ''/> + <#if optGroupInternalListUiBean.parameters.listTitle??> + <#assign optGroupItemTitle= stack.findString(optGroupInternalListUiBean.parameters.listTitle)!''/> + + <#lt> + <#assign trash=stack.pop() /> + + + + + diff --git a/apps/showcase/src/main/resources/template/html5/optiontransferselect.ftl b/apps/showcase/src/main/resources/template/html5/optiontransferselect.ftl new file mode 100644 index 0000000000..f689f195a3 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/optiontransferselect.ftl @@ -0,0 +1,21 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +
Tag
<s:optiontransferselect/>
is not supported in this theme!
\ No newline at end of file diff --git a/apps/showcase/src/main/resources/template/html5/password.ftl b/apps/showcase/src/main/resources/template/html5/password.ftl new file mode 100644 index 0000000000..222aa5947a --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/password.ftl @@ -0,0 +1,55 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + + size="${parameters.get("size")}" + +<#if parameters.maxlength?has_content> + maxlength="${parameters.maxlength}" + +<#if parameters.nameValue?? && parameters.showPassword!false> + value="<@s.property value="parameters.nameValue"/>" + +<#if parameters.disabled!false> + disabled="disabled" + +<#if parameters.readonly!false> + readonly="readonly" + +<#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex}" + +<#if parameters.id?has_content> + id="${parameters.id}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> +<#if parameters.title?has_content> + title="${parameters.title}" + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +/> + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl b/apps/showcase/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl new file mode 100644 index 0000000000..ad1dd1cd52 --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/prefixed-dynamic-attributes.ftl @@ -0,0 +1,37 @@ +<#ftl strip_text=true strip_whitespace=true/> +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#macro prefixedDynamicAttributes prefix> +<#if (parameters.dynamicAttributes?? && parameters.dynamicAttributes?size > 0)> +<#assign aKeys = parameters.dynamicAttributes.keySet()> +<#list aKeys as aKey> +<#if aKey?starts_with(prefix)> +<#assign keyValue = parameters.dynamicAttributes.get(aKey)/> +<#if keyValue?is_string> + <#assign value = struts.translateVariables(keyValue)!keyValue/> +<#else> + <#assign value = keyValue?string/> + + ${aKey?keep_after(prefix)}="${value}" + + + + diff --git a/apps/showcase/src/main/resources/template/html5/radiomap.ftl b/apps/showcase/src/main/resources/template/html5/radiomap.ftl new file mode 100644 index 0000000000..208f45f1dc --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/radiomap.ftl @@ -0,0 +1,107 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + <@s.iterator value="parameters.list"> + <#if parameters.listKey??> + <#assign itemKey = stack.findValue(parameters.listKey)/> + <#assign itemKeyStr = stack.findString(parameters.listKey)/> + <#else> + <#assign itemKey = stack.findValue('top')/> + <#assign itemKeyStr = stack.findString('top')> + + <#if parameters.listValueKey??> + <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale + file for it's localized value. This is then used as a label --> + <#assign valueKey = stack.findString(parameters.listValueKey)!''/> + <#if valueKey?has_content> + <#assign itemValue = struts.getText(valueKey) /> + <#else> + <#assign itemValue = parameters.listValueKey /> + + <#elseif parameters.listValue??> + <#assign itemValue = stack.findString(parameters.listValue)/> + <#else> + <#assign itemValue = stack.findString('top')/> + + <#if parameters.listCssClass??> + <#if stack.findString(parameters.listCssClass)??> + <#assign itemCssClass= stack.findString(parameters.listCssClass)/> + <#else> + <#assign itemCssClass = ''/> + + + <#if parameters.listCssStyle??> + <#if stack.findString(parameters.listCssStyle)??> + <#assign itemCssStyle= stack.findString(parameters.listCssStyle)/> + <#else> + <#assign itemCssStyle = ''/> + + + <#if parameters.listTitle??> + <#if stack.findString(parameters.listTitle)??> + <#assign itemTitle= stack.findString(parameters.listTitle)/> + <#else> + <#assign itemTitle = ''/> + + + + name="${parameters.name?no_esc}" + + id="${parameters.id}${itemKeyStr?replace(".", "_")}" + <#if tag.contains(parameters.nameValue!'', itemKey)> + checked="checked" + + <#if itemKey??> + value="${itemKeyStr}" + + <#if parameters.disabled!false> + disabled="disabled" + + <#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex}" + + <#if itemCssClass?has_content> + class="${itemCssClass}" + + <#if itemCssStyle?has_content> + style="${itemCssStyle}" + + <#if itemTitle?has_content> + title="${itemTitle}" + <#else> + <#if parameters.title?has_content> + title="${parameters.title}" + + + <#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> + <#global evaluate_dynamic_attributes = true/> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> + /> + + + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/reset.ftl b/apps/showcase/src/main/resources/template/html5/reset.ftl new file mode 100644 index 0000000000..56dc96aa7b --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/reset.ftl @@ -0,0 +1,84 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#compress> + <#if parameters.type?? && parameters.type=="button"> + + <#else> + + name="${parameters.name}" + + <#if parameters.nameValue??> + value="<@s.property value="parameters.nameValue"/>" + + <#if parameters.cssClass?has_content> + class="${parameters.cssClass}" + + <#if parameters.cssStyle?has_content> + style="${parameters.cssStyle}" + + <#if parameters.title?has_content> + title="${parameters.title}" + + <#if parameters.disabled!false> + disabled="disabled" + + <#if parameters.tabindex?has_content> + tabindex="${parameters.tabindex}" + + <#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> + <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> + /> + + +<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> diff --git a/apps/showcase/src/main/resources/template/html5/script-close.ftl b/apps/showcase/src/main/resources/template/html5/script-close.ftl new file mode 100644 index 0000000000..e0f64a41eb --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/script-close.ftl @@ -0,0 +1,21 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> + diff --git a/apps/showcase/src/main/resources/template/html5/script.ftl b/apps/showcase/src/main/resources/template/html5/script.ftl new file mode 100644 index 0000000000..b37b0b7c2f --- /dev/null +++ b/apps/showcase/src/main/resources/template/html5/script.ftl @@ -0,0 +1,53 @@ +<#-- +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<@compress single_line=true> +