Author: jleroux
Date: Sat Jan 18 08:37:58 2014
New Revision: 1559328
URL:
http://svn.apache.org/r1559328Log:
A completing patch from Olivier for "NPE thrown out while rendering disabled menu item"
https://issues.apache.org/jira/browse/OFBIZ-5451Last typo correction was'nt complete.
jleroux: this incidentally and fortunately fixes also "The Orders sub-menus don't work in Catalog and Party Profile"
https://issues.apache.org/jira/browse/OFBIZ-5477Modified:
ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl
Modified: ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl?rev=1559328&r1=1559327&r2=1559328&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlMenuMacroLibrary.ftl Sat Jan 18 08:37:58 2014
@@ -54,11 +54,11 @@ under the License.
</#list>
</form><#rt/>
</#if>
-<#if linkUrl?has_content>
+<#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content>
<a<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if name?has_content> name="${name}"</#if><#if targetWindow?has_content> target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/>
</#if>
<#if imgStr?has_content>${imgStr}</#if><#if text?has_content>${text}</#if><#rt/>
-<#if linkType?has_content></a><#rt/></#if>
+<#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content></a><#rt/></#if>
</#macro>
<#macro renderMenuItemBegin style toolTip linkStr containsNestedMenus>