ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditya Sharma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OFBIZ-9770) CSS files defined through layoutSettings in GlobalActions are loaded twice
Date Fri, 29 Sep 2017 05:00:00 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-9770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Aditya Sharma updated OFBIZ-9770:
    Attachment: OFBIZ-9770.patch

GlobalActions screen of themes/common/widget/CommonScreens.xml is loaded twice.
1. Included in GlobalDecorator screen of themes/common/widget/CommonScreens.xml

<include-screen name="GlobalActions" />

2. Included in GlobalActions screen of framework/common/widget/CommonScreens.xml

<include-screen name="GlobalActions" location="${groovy:commonScreenLocations.GlobalActions?commonScreenLocations.GlobalActions:commonDecoratorLocation}"/>

where commonScreenLocations variable is initialized in MinimalActions screen

<set field="commonDecoratorLocation" from-field="layoutSettings.VT_COMMON_DECO_LOC" default-value="component://common-theme/widget/CommonScreens.xml"

 and layoutSettings.VT_COMMON_DECO_LOC is always empty for all the themes.


I removed the first instance i.e. from GlobalDecorator.

Steps to verify:
All the files (js, css etc) included in this screen are still available.

Though if there is some other way to verify, suggestions are most welcomed :)

If this works fine I will review header.ftl where such duplicity is handled for JS files with
some logic using set  & it can be removed.

<#if layoutSettings.javaScripts?has_content>
      <#--layoutSettings.javaScripts is a list of java scripts. -->
      <#-- use a Set to make sure each javascript is declared only once, but iterate the
list to maintain the correct order -->
      <#assign javaScriptsSet = Static["org.apache.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/>
      <#list layoutSettings.javaScripts as javaScript>
        <#if javaScriptsSet.contains(javaScript)>
          <#assign nothing = javaScriptsSet.remove(javaScript)/>
          <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>"


> CSS files defined through layoutSettings in GlobalActions are loaded twice
> --------------------------------------------------------------------------
>                 Key: OFBIZ-9770
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9770
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS
>    Affects Versions: Trunk
>            Reporter: Aditya Sharma
>            Assignee: Aditya Sharma
>         Attachments: OFBIZ-9770.patch, screenshot-1.png
> CSS files added in GlobalActions screen of CommonScreens.xml are loaded twice.
> Css file jquery.jgrowl.min.css is loaded twice.

This message was sent by Atlassian JIRA

View raw message