You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/06/15 08:21:19 UTC

svn commit: r1135929 - /ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl

Author: sascharodekamp
Date: Wed Jun 15 06:21:19 2011
New Revision: 1135929

URL: http://svn.apache.org/viewvc?rev=1135929&view=rev
Log:
wrong link href of leaf node in a tree element (https://issues.apache.org/jira/browse/OFBIZ-4315).
A slightly modified patch from Leon which corrects the href tag of empty leaf nodes.

OrigMsg:
like department and employee tree in main page of human resource management application, if you click the expand/collpase link of a leaf node, the wrong request error occurs. Since there's a empty link href value set for leaf node, browser will treat it as the request "https://.../humanres/control".

Modified:
    ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl?rev=1135929&r1=1135928&r2=1135929&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlTreeMacroLibrary.ftl Wed Jun 15 06:21:19 2011
@@ -52,7 +52,7 @@ under the License.
 <#if style?has_content> class="${style}"</#if><#rt/>
 <#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 targetWindow?has_content> target="${targetWindow}</#if><#if linkUrl?has_content> href="${linkUrl}"<#else> href="javascript:void(0);"</#if>><#rt/>
 <#if imgStr?has_content>${imgStr}<#elseif linkText?has_content/>${linkText}<#else/>&nbsp;</#if></a><#rt/>
 </#macro>