Return-Path: X-Original-To: apmail-ofbiz-commits-archive@www.apache.org Delivered-To: apmail-ofbiz-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C1B667490 for ; Sat, 12 Nov 2011 00:55:08 +0000 (UTC) Received: (qmail 44155 invoked by uid 500); 12 Nov 2011 00:55:08 -0000 Delivered-To: apmail-ofbiz-commits-archive@ofbiz.apache.org Received: (qmail 44125 invoked by uid 500); 12 Nov 2011 00:55:08 -0000 Mailing-List: contact commits-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list commits@ofbiz.apache.org Received: (qmail 44118 invoked by uid 99); 12 Nov 2011 00:55:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Nov 2011 00:55:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Nov 2011 00:55:05 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 092362388847 for ; Sat, 12 Nov 2011 00:54:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1201137 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Date: Sat, 12 Nov 2011 00:54:43 -0000 To: commits@ofbiz.apache.org From: jleroux@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111112005444.092362388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jleroux Date: Sat Nov 12 00:54:43 2011 New Revision: 1201137 URL: http://svn.apache.org/viewvc?rev=1201137&view=rev Log: A patch from Anne Jessel https://issues.apache.org/jira/browse/OFBIZ-4510 "List css before js in ecommerce header" Trivial patch to list css before js in ecommerce pages. This helps some browsers display pages faster. jleroux: found also this article http://stackoverflow.com/questions/3967216/order-of-css-and-script-calls-in-a-aspx-page Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=1201137&r1=1201136&r2=1201137&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Sat Nov 12 00:54:43 2011 @@ -28,22 +28,6 @@ under the License. <#if shortcutIcon?has_content> - <#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.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/> - <#list layoutSettings.javaScripts as javaScript> - <#if javaScriptsSet.contains(javaScript)> - <#assign nothing = javaScriptsSet.remove(javaScript)/> - - - - - <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content> - <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript> - - - <#if layoutSettings.styleSheets?has_content> <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.--> <#list layoutSettings.styleSheets as styleSheet> @@ -66,13 +50,6 @@ under the License. - ${layoutSettings.extraHead?if_exists} - <#if layoutSettings.VT_EXTRA_HEAD?has_content> - <#list layoutSettings.VT_EXTRA_HEAD as extraHead> - ${extraHead} - - - <#-- Append CSS for catalog --> <#if catalogStyleSheet?exists> @@ -81,6 +58,29 @@ under the License. <#if sessionAttributes.overrideCss?exists> + <#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.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/> + <#list layoutSettings.javaScripts as javaScript> + <#if javaScriptsSet.contains(javaScript)> + <#assign nothing = javaScriptsSet.remove(javaScript)/> + + + + + <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content> + <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript> + + + + ${layoutSettings.extraHead?if_exists} + <#if layoutSettings.VT_EXTRA_HEAD?has_content> + <#list layoutSettings.VT_EXTRA_HEAD as extraHead> + ${extraHead} + + + <#-- Meta tags if defined by the page action --> <#if metaDescription?exists>