ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnico...@apache.org
Subject svn commit: r1720907 - in /ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget: html/HtmlMenuRenderer.java menu/ModelMenuItem.java
Date Sat, 19 Dec 2015 12:43:10 GMT
Author: jnicolas
Date: Sat Dec 19 12:43:10 2015
New Revision: 1720907

URL: http://svn.apache.org/viewvc?rev=1720907&view=rev
Log:
JIRA-6706 - Correct the widget-style of the itemMenu inheritance for the contained hyperlink

Modified:
    ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
    ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java

Modified: ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java?rev=1720907&r1=1720906&r2=1720907&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
(original)
+++ ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
Sat Dec 19 12:43:10 2015
@@ -152,10 +152,14 @@ public class HtmlMenuRenderer extends Ht
         String style = menuItem.getWidgetStyle();
 
         if (menuItem.isSelected(context)) {
-            style = menuItem.getSelectedStyle();
-            if (UtilValidate.isEmpty(style)) {
-                style = "selected";
+            String selectedStyle = menuItem.getSelectedStyle();
+            if (UtilValidate.isEmpty(selectedStyle)) {
+                selectedStyle = "selected";
             }
+            if (UtilValidate.isNotEmpty(style)) {
+                style += " " ;
+            }
+            style += selectedStyle ;
         }
 
         if (menuItem.getDisabled() || this.isDisableIfEmpty(menuItem, context)) {

Modified: ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java?rev=1720907&r1=1720906&r2=1720907&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
(original)
+++ ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
Sat Dec 19 12:43:10 2015
@@ -648,11 +648,7 @@ public class ModelMenuItem {
         }
 
         public String getStyle(Map<String, Object> context) {
-            String style = this.styleExdr.expandString(context);
-            if (UtilValidate.isEmpty(style)) {
-                style = this.linkMenuItem.getWidgetStyle();
-            }
-            return style;
+            return this.styleExdr.expandString(context);
         }
 
         public String getName(Map<String, Object> context) {



Mime
View raw message