Author: adrianc
Date: Wed Jun 4 14:30:13 2008 New Revision: 663376 URL: http://svn.apache.org/viewvc?rev=663376&view=rev Log: Small fix for HtmlMenuRenderer.java - tooltip and style attributes were being ignored. Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java?rev=663376&r1=663375&r2=663376&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Wed Jun 4 14:30:13 2008 @@ -176,6 +176,10 @@ } writer.append("\""); } + String toolTip = menuItem.getTooltip(context); + if (UtilValidate.isNotEmpty(toolTip)) { + writer.append(" title=\"" + toolTip + "\""); + } writer.append(">"); Link link = menuItem.getLink(); @@ -373,33 +377,39 @@ writer.append(id); writer.append("\""); } - -/* - boolean isSelected = menuItem.isSelected(context); - - String style = null; - - if (isSelected) { - style = menuItem.getSelectedStyle(); - } else { - style = link.getStyle(context); - if (UtilValidate.isEmpty(style)) - style = menuItem.getTitleStyle(); - if (UtilValidate.isEmpty(style)) - style = menuItem.getWidgetStyle(); - } - - if (menuItem.getDisabled()) { - style = menuItem.getDisabledTitleStyle(); - } - - if (UtilValidate.isNotEmpty(style)) { - writer.append(" class=\""); - writer.append(style); - writer.append("\""); - } -*/ - String name = link.getName(context); + + /* + boolean isSelected = menuItem.isSelected(context); + + String style = null; + + if (isSelected) { + style = menuItem.getSelectedStyle(); + } else { + style = link.getStyle(context); + if (UtilValidate.isEmpty(style)) + style = menuItem.getTitleStyle(); + if (UtilValidate.isEmpty(style)) + style = menuItem.getWidgetStyle(); + } + + if (menuItem.getDisabled()) { + style = menuItem.getDisabledTitleStyle(); + } + + if (UtilValidate.isNotEmpty(style)) { + writer.append(" class=\""); + writer.append(style); + writer.append("\""); + } + */ + String style = link.getStyle(context); + if (UtilValidate.isNotEmpty(style)) { + writer.append(" class=\""); + writer.append(style); + writer.append("\""); + } + String name = link.getName(context); if (UtilValidate.isNotEmpty(name)) { writer.append(" name=\""); writer.append(name); |
Free forum by Nabble | Edit this page |