This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch feature/WW-5256-compress
in repository https://gitbox.apache.org/repos/asf/struts.git

commit b4204bd34468d4c68cb45cf9e941293d34137e70
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Sun Jul 14 09:34:57 2024 +0200

    WW-5256 Improves html rendering in xhtml theme by using compress directive
---
 core/src/main/resources/template/xhtml/checkbox.ftl             | 2 ++
 core/src/main/resources/template/xhtml/checkboxlist.ftl         | 2 ++
 core/src/main/resources/template/xhtml/control.ftl              | 4 +++-
 core/src/main/resources/template/xhtml/controlfooter.ftl        | 3 ++-
 core/src/main/resources/template/xhtml/controlheader-core.ftl   | 2 ++
 core/src/main/resources/template/xhtml/controlheader.ftl        | 2 ++
 core/src/main/resources/template/xhtml/datetextfield.ftl        | 2 ++
 core/src/main/resources/template/xhtml/doubleselect.ftl         | 2 ++
 core/src/main/resources/template/xhtml/file.ftl                 | 2 ++
 core/src/main/resources/template/xhtml/form-close.ftl           | 2 ++
 core/src/main/resources/template/xhtml/form.ftl                 | 2 ++
 core/src/main/resources/template/xhtml/head.ftl                 | 2 ++
 core/src/main/resources/template/xhtml/hidden.ftl               | 2 ++
 core/src/main/resources/template/xhtml/inputtransferselect.ftl  | 2 ++
 core/src/main/resources/template/xhtml/label.ftl                | 2 ++
 core/src/main/resources/template/xhtml/optiontransferselect.ftl | 2 ++
 core/src/main/resources/template/xhtml/password.ftl             | 2 ++
 core/src/main/resources/template/xhtml/radiomap.ftl             | 2 ++
 core/src/main/resources/template/xhtml/reset.ftl                | 2 ++
 core/src/main/resources/template/xhtml/select.ftl               | 2 ++
 core/src/main/resources/template/xhtml/submit-close.ftl         | 2 ++
 core/src/main/resources/template/xhtml/submit.ftl               | 2 ++
 core/src/main/resources/template/xhtml/text.ftl                 | 2 ++
 core/src/main/resources/template/xhtml/textarea.ftl             | 2 ++
 core/src/main/resources/template/xhtml/tooltip.ftl              | 2 ++
 core/src/main/resources/template/xhtml/updownselect.ftl         | 2 ++
 26 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/core/src/main/resources/template/xhtml/checkbox.ftl 
b/core/src/main/resources/template/xhtml/checkbox.ftl
index 19ee478a7..486f27631 100644
--- a/core/src/main/resources/template/xhtml/checkbox.ftl
+++ b/core/src/main/resources/template/xhtml/checkbox.ftl
@@ -18,6 +18,7 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#assign hasFieldErrors = fieldErrors?? && fieldErrors.get(attributes.name)??/>
 <#if hasFieldErrors>
 <#list fieldErrors.get(attributes.name) as error>
@@ -124,3 +125,4 @@ ${attributes.label}<#t/>
 </#if>
 </#if>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/checkboxlist.ftl 
b/core/src/main/resources/template/xhtml/checkboxlist.ftl
index 435c334b5..d2686cb3d 100644
--- a/core/src/main/resources/template/xhtml/checkboxlist.ftl
+++ b/core/src/main/resources/template/xhtml/checkboxlist.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/checkboxlist.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/control.ftl 
b/core/src/main/resources/template/xhtml/control.ftl
index 27d4d5f14..00c2f6322 100644
--- a/core/src/main/resources/template/xhtml/control.ftl
+++ b/core/src/main/resources/template/xhtml/control.ftl
@@ -18,7 +18,9 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <table class="${attributes.cssClass!'wwFormTable'}"<#rt/>
 <#if attributes.cssStyle??> style="${attributes.cssStyle}"<#rt/>
 </#if>
->
\ No newline at end of file
+>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/controlfooter.ftl 
b/core/src/main/resources/template/xhtml/controlfooter.ftl
index 1fbad781b..c729f5114 100644
--- a/core/src/main/resources/template/xhtml/controlfooter.ftl
+++ b/core/src/main/resources/template/xhtml/controlfooter.ftl
@@ -21,6 +21,7 @@
 ${attributes.after!}<#t/>
     </td><#lt/>
 </tr>
+<@compress single_line=true>
 <#if (attributes.errorposition!"top") == 'bottom'>
 <#assign hasFieldErrors = attributes.name?? && fieldErrors?? && 
fieldErrors.get(attributes.name)??/>
 <#if hasFieldErrors>
@@ -33,4 +34,4 @@ ${attributes.after!}<#t/>
 </#list>
 </#if>
 </#if>
-
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/controlheader-core.ftl 
b/core/src/main/resources/template/xhtml/controlheader-core.ftl
index 5c7f1227e..f4791caf3 100644
--- a/core/src/main/resources/template/xhtml/controlheader-core.ftl
+++ b/core/src/main/resources/template/xhtml/controlheader-core.ftl
@@ -22,6 +22,7 @@
        Only show message if errors are available.
        This will be done if ActionSupport is used.
 -->
+<@compress single_line=true>
 <#assign hasFieldErrors = attributes.name?? && fieldErrors?? && 
fieldErrors.get(attributes.name)??/>
 <#if (attributes.errorposition!"top") == 'top'>
 <#if hasFieldErrors>
@@ -77,3 +78,4 @@ ${attributes.labelseparator!":"}<#t/>
 </tr>
 <tr>
 </#if>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/controlheader.ftl 
b/core/src/main/resources/template/xhtml/controlheader.ftl
index ec9372d92..7c3f666d5 100644
--- a/core/src/main/resources/template/xhtml/controlheader.ftl
+++ b/core/src/main/resources/template/xhtml/controlheader.ftl
@@ -18,6 +18,7 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader-core.ftl" />
     <td
         <#if attributes.align?? >
@@ -26,3 +27,4 @@
             class="tdInput"
         </#if>
 ><#t/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/datetextfield.ftl 
b/core/src/main/resources/template/xhtml/datetextfield.ftl
index a6ee9f1f2..b59a9720a 100644
--- a/core/src/main/resources/template/xhtml/datetextfield.ftl
+++ b/core/src/main/resources/template/xhtml/datetextfield.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/datetextfield.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/doubleselect.ftl 
b/core/src/main/resources/template/xhtml/doubleselect.ftl
index 4875a33cb..d1dd3b2a7 100644
--- a/core/src/main/resources/template/xhtml/doubleselect.ftl
+++ b/core/src/main/resources/template/xhtml/doubleselect.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/doubleselect.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/file.ftl 
b/core/src/main/resources/template/xhtml/file.ftl
index c45bf3cc8..94504f3f0 100644
--- a/core/src/main/resources/template/xhtml/file.ftl
+++ b/core/src/main/resources/template/xhtml/file.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/file.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/form-close.ftl 
b/core/src/main/resources/template/xhtml/form-close.ftl
index e69b16580..b279f4716 100644
--- a/core/src/main/resources/template/xhtml/form-close.ftl
+++ b/core/src/main/resources/template/xhtml/form-close.ftl
@@ -18,6 +18,7 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/control-close.ftl" />
 <#include "/${attributes.templateDir}/simple/form-close.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/form-close-validate.ftl" 
/>
@@ -31,3 +32,4 @@
     });
 </@s.script>
 </#if>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/form.ftl 
b/core/src/main/resources/template/xhtml/form.ftl
index 28f6fe301..878b7bf18 100644
--- a/core/src/main/resources/template/xhtml/form.ftl
+++ b/core/src/main/resources/template/xhtml/form.ftl
@@ -18,6 +18,7 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/form-validate.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/form-common.ftl" />
 <#if (attributes.validate!false)>
@@ -29,3 +30,4 @@
 </#if>
 >
 <#include "/${attributes.templateDir}/${attributes.expandTheme}/control.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/head.ftl 
b/core/src/main/resources/template/xhtml/head.ftl
index 12397dc02..a0a703b7c 100644
--- a/core/src/main/resources/template/xhtml/head.ftl
+++ b/core/src/main/resources/template/xhtml/head.ftl
@@ -18,5 +18,7 @@
  * under the License.
  */
 -->
+<#compress>
 <@s.link rel="stylesheet" 
href="${base}${attributes.staticContentPath}/xhtml/styles.css" type="text/css" 
/>
 <#include "/${attributes.templateDir}/simple/head.ftl" />
+</#compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/hidden.ftl 
b/core/src/main/resources/template/xhtml/hidden.ftl
index 42587ced2..83af5da98 100644
--- a/core/src/main/resources/template/xhtml/hidden.ftl
+++ b/core/src/main/resources/template/xhtml/hidden.ftl
@@ -18,8 +18,10 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <tr style="display:none;">
   <td colspan="2">
     <#include "/${attributes.templateDir}/simple/hidden.ftl" />
   </td>
 </tr>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/inputtransferselect.ftl 
b/core/src/main/resources/template/xhtml/inputtransferselect.ftl
index e2aff49d9..c84638258 100644
--- a/core/src/main/resources/template/xhtml/inputtransferselect.ftl
+++ b/core/src/main/resources/template/xhtml/inputtransferselect.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/inputtransferselect.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/label.ftl 
b/core/src/main/resources/template/xhtml/label.ftl
index a27d45de0..3bb1afcff 100644
--- a/core/src/main/resources/template/xhtml/label.ftl
+++ b/core/src/main/resources/template/xhtml/label.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/label.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/optiontransferselect.ftl 
b/core/src/main/resources/template/xhtml/optiontransferselect.ftl
index 3107ee341..45fc8087c 100644
--- a/core/src/main/resources/template/xhtml/optiontransferselect.ftl
+++ b/core/src/main/resources/template/xhtml/optiontransferselect.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/optiontransferselect.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/password.ftl 
b/core/src/main/resources/template/xhtml/password.ftl
index e276dd73f..d1c9e6700 100644
--- a/core/src/main/resources/template/xhtml/password.ftl
+++ b/core/src/main/resources/template/xhtml/password.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/password.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/radiomap.ftl 
b/core/src/main/resources/template/xhtml/radiomap.ftl
index d099b1b41..53ee54ad7 100644
--- a/core/src/main/resources/template/xhtml/radiomap.ftl
+++ b/core/src/main/resources/template/xhtml/radiomap.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/radiomap.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/reset.ftl 
b/core/src/main/resources/template/xhtml/reset.ftl
index 59cd4a2ea..6093be967 100644
--- a/core/src/main/resources/template/xhtml/reset.ftl
+++ b/core/src/main/resources/template/xhtml/reset.ftl
@@ -18,8 +18,10 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <tr>
     <td colspan="2"><div class="formButton"><#t/>
 <#include "/${attributes.templateDir}/simple/reset.ftl" />
 </div><#t/>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/select.ftl 
b/core/src/main/resources/template/xhtml/select.ftl
index dcba57c32..2d245083b 100644
--- a/core/src/main/resources/template/xhtml/select.ftl
+++ b/core/src/main/resources/template/xhtml/select.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/select.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/submit-close.ftl 
b/core/src/main/resources/template/xhtml/submit-close.ftl
index 360bbafa5..ce88d2983 100644
--- a/core/src/main/resources/template/xhtml/submit-close.ftl
+++ b/core/src/main/resources/template/xhtml/submit-close.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include "/${attributes.templateDir}/simple/submit-close.ftl" />
 </div><#t/>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/submit.ftl 
b/core/src/main/resources/template/xhtml/submit.ftl
index 50125281f..643e167f2 100644
--- a/core/src/main/resources/template/xhtml/submit.ftl
+++ b/core/src/main/resources/template/xhtml/submit.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <tr>
     <td colspan="2"><div class="formButton"><#t/>
 <#include "/${attributes.templateDir}/simple/submit.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/text.ftl 
b/core/src/main/resources/template/xhtml/text.ftl
index efe866ffd..d2d385935 100644
--- a/core/src/main/resources/template/xhtml/text.ftl
+++ b/core/src/main/resources/template/xhtml/text.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/text.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/textarea.ftl 
b/core/src/main/resources/template/xhtml/textarea.ftl
index d601c73db..c4f4604d4 100644
--- a/core/src/main/resources/template/xhtml/textarea.ftl
+++ b/core/src/main/resources/template/xhtml/textarea.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/textarea.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" />
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/tooltip.ftl 
b/core/src/main/resources/template/xhtml/tooltip.ftl
index cdbd8955d..390af3630 100644
--- a/core/src/main/resources/template/xhtml/tooltip.ftl
+++ b/core/src/main/resources/template/xhtml/tooltip.ftl
@@ -18,6 +18,7 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#if attributes.tooltip??><#t/>
       <img
       <#if attributes.tooltipIconPath??><#t/>
@@ -37,3 +38,4 @@
        alt="${attributes.tooltip}" />
      </#if>
 </#if><#t/>
+</@compress>
\ No newline at end of file
diff --git a/core/src/main/resources/template/xhtml/updownselect.ftl 
b/core/src/main/resources/template/xhtml/updownselect.ftl
index 28655a6d7..6eb0cc554 100644
--- a/core/src/main/resources/template/xhtml/updownselect.ftl
+++ b/core/src/main/resources/template/xhtml/updownselect.ftl
@@ -18,6 +18,8 @@
  * under the License.
  */
 -->
+<@compress single_line=true>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#include "/${attributes.templateDir}/simple/updownselect.ftl" />
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#nt/>
+</@compress>
\ No newline at end of file

Reply via email to