You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/12/13 22:13:50 UTC

svn commit: r890120 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/tree/MacroTreeRenderer.java templates/htmlTreeMacroLibrary.ftl

Author: lektran
Date: Sun Dec 13 21:13:49 2009
New Revision: 890120

URL: http://svn.apache.org/viewvc?rev=890120&view=rev
Log:
Fixed problem reported by Jacopo where the tree widget expand/collapse buttons weren't being displayed in Safari.  Safari seems to not want to display link background images unless the link has some content, fixed by adding a non-breaking space if the link is empty.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java
    ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java?rev=890120&r1=890119&r2=890120&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java Sun Dec 13 21:13:49 2009
@@ -176,7 +176,6 @@
                     //expandCollapseLink.setText(" + ");
                     currentNodeTrailPiped = StringUtil.join(currentNodeTrail, "|");
                     expandCollapseLink.setStyle("collapsed");
-                    expandCollapseLink.setText(" ");
                     StringBuilder target = new StringBuilder(node.getModelTree().getExpandCollapseRequest(context));
                     String trailName = node.getModelTree().getTrailName(context);
                     if (target.indexOf("?") < 0) {
@@ -196,7 +195,6 @@
                     currentNodeTrailPiped = "";
                 }
                 expandCollapseLink.setStyle("expanded");
-                expandCollapseLink.setText(" ");
                 StringBuilder target = new StringBuilder(node.getModelTree().getExpandCollapseRequest(context));
                 String trailName = node.getModelTree().getTrailName(context);
                 if (target.indexOf("?") < 0) {
@@ -213,7 +211,6 @@
         } else if (!hasChildren) {
             context.put("processChildren", Boolean.FALSE);
             expandCollapseLink.setStyle("leafnode");
-            expandCollapseLink.setText(" ");
             renderLink(writer, context, expandCollapseLink);
         }
     }

Modified: ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl?rev=890120&r1=890119&r2=890120&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl Sun Dec 13 21:13:49 2009
@@ -53,7 +53,7 @@
 <#if name?has_content> name="${name}"</#if><#rt/>
 <#if title?has_content> title="${title}"</#if><#rt/>
 <#if targetWindow?has_content> target="${targetWindow}</#if> href="${linkUrl}"><#rt/>
-<#if imgStr?has_content>${imgStr}<#else><#if linkText?has_content>${linkText}</#if></#if></a><#rt/>
+<#if imgStr?has_content>${imgStr}<#elseif linkText?has_content/>${linkText}<#else/>&nbsp;</#if></a><#rt/>
 </#macro>
 
 <#macro renderImage src id style wid hgt border alt urlString>