Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4556

In theme simple, move form-close.ftl tooltip code into own file

    XMLWordPrintableJSON

Details

    Description

      I'd like to be able to turn off the struts tooltip js/css without having to override the whole form-close.ftl file. This would be particularly useful when using the bootstrap plugin since I'm already importing tooltip js/css as part of my bootstrap js/css.

      I'd just move the block

      <#-- 
       Code that will add javascript needed for tooltips
      --><#t/>
      <#if (parameters.hasTooltip?default(false))><#t/>
      	<#lt/><!-- javascript that is needed for tooltips -->
      	<#lt/><script type="text/javascript" src='<@s.url value="/struts/domTT.js" includeParams="none" encode="false" />'></script>
      	<#lt/><link rel="stylesheet" type="text/css" href="<@s.url value="/struts/domTT.css" includeParams="none" encode="false" />"/>
      	
      </#if><#t/>
      

      to a file like form-close-tooltips.ftl

      And replace it in form-close.ftl with

      <#include "/${parameters.templateDir}/${parameters.expandTheme}/form-close-tooltips.ftl" />
      

      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            perfnorm Jasper Rosenberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: