Author: jleroux
Date: Thu Apr 24 11:37:59 2014
New Revision: 1589670

URL: http://svn.apache.org/r1589670
Log:
"Applied fix from trunk for revision: 1589669  " 
------------------------------------------------------------------------
r1589669 | jleroux | 2014-04-24 13:35:44 +0200 (jeu. 24 avr. 2014) | 5 lignes

A patch from Deepak Dixit for "Scale logo to fit content area in PDF which are 
based on simple decorator" https://issues.apache.org/jira/browse/OFBIZ-5006

Now logo image will be display over order pdf. Default value set in fop 
decorator not working properly, global set to true, Also added check in company 
header groovy, if logoImageUrl found in groovy then only set to context else 
default will be used.

Also set the logo width in company header fo.ftl as if logo image is large then 
it will throw warning related to content overflow on console.
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release13.07/   (props changed)
    
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
    
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl
    ofbiz/branches/release13.07/framework/common/webcommon/error.fo.ftl
    
ofbiz/branches/release13.07/framework/common/webcommon/includes/simple.fo.ftl
    ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1589625,1589669

Modified: 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1589670&r1=1589669&r2=1589670&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
 (original)
+++ 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
 Thu Apr 24 11:37:59 2014
@@ -130,7 +130,10 @@ if (partyGroup) {
         }
     }
 }
-context.logoImageUrl = logoImageUrl;
+//If logoImageUrl not null then only set it to context else it will override 
the default value "/images/ofbiz_powered.gif"
+if (logoImageUrl) {
+    context.logoImageUrl = logoImageUrl;
+}
 
 // the company name
 companyName = "Default Company";

Modified: 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl?rev=1589670&r1=1589669&r2=1589670&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl
 (original)
+++ 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/order/companyHeader.fo.ftl
 Thu Apr 24 11:37:59 2014
@@ -19,7 +19,7 @@ under the License.
 <#escape x as x?xml>
 
 <fo:block text-align="left">
-    <#if logoImageUrl?has_content><fo:external-graphic 
src="<@ofbizContentUrl>${logoImageUrl}</@ofbizContentUrl>" overflow="hidden" 
height="40px" content-height="scale-to-fit"/></#if>
+    <#if logoImageUrl?has_content><fo:external-graphic 
src="<@ofbizContentUrl>${logoImageUrl}</@ofbizContentUrl>" overflow="hidden" 
height="40px" content-height="scale-to-fit" content-width="2.00in"/></#if>
 </fo:block>
 
 <fo:block font-size="8pt">

Modified: ofbiz/branches/release13.07/framework/common/webcommon/error.fo.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/webcommon/error.fo.ftl?rev=1589670&r1=1589669&r2=1589670&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/common/webcommon/error.fo.ftl 
(original)
+++ ofbiz/branches/release13.07/framework/common/webcommon/error.fo.ftl Thu Apr 
24 11:37:59 2014
@@ -56,7 +56,7 @@ under the License.
                         <fo:table-cell>
                         <#if logoImageUrl?exists>
                             <fo:block>
-                                <fo:external-graphic src="${logoImageUrl}" 
overflow="hidden" height="40px"/>
+                                <fo:external-graphic src="${logoImageUrl}" 
overflow="hidden" height="40px" content-height="scale-to-fit"/>
                             </fo:block>
                         </#if>
                         </fo:table-cell>

Modified: 
ofbiz/branches/release13.07/framework/common/webcommon/includes/simple.fo.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/webcommon/includes/simple.fo.ftl?rev=1589670&r1=1589669&r2=1589670&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/framework/common/webcommon/includes/simple.fo.ftl 
(original)
+++ 
ofbiz/branches/release13.07/framework/common/webcommon/includes/simple.fo.ftl 
Thu Apr 24 11:37:59 2014
@@ -56,7 +56,7 @@ under the License.
                         <fo:table-cell>
                             <fo:block>
                             <#if logoImageUrl?exists>
-                                <fo:external-graphic src="${logoImageUrl}" 
overflow="hidden" height="40px"/>
+                                <fo:external-graphic src="${logoImageUrl}" 
overflow="hidden" height="40px" content-height="scale-to-fit"/>
                             </#if>
                             </fo:block>
                         </fo:table-cell>

Modified: ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml?rev=1589670&r1=1589669&r2=1589670&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml 
(original)
+++ ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml Thu 
Apr 24 11:37:59 2014
@@ -511,7 +511,7 @@ under the License.
         <section>
             <actions>
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" 
global="true"/>
-                <set field="logoImageUrl" value="/images/ofbiz_logo.gif"/>
+                <set field="logoImageUrl" value="/images/ofbiz_logo.gif" 
global="true"/>
                 <!--<set field="defaultFontFamily" value="Arial"/>-->
             </actions>
             <widgets>


Reply via email to