ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnico...@apache.org
Subject svn commit: r1720933 - in /ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget: model/ModelMenuItem.java renderer/macro/MacroMenuRenderer.java
Date Sat, 19 Dec 2015 14:38:34 GMT
Author: jnicolas
Date: Sat Dec 19 14:38:34 2015
New Revision: 1720933

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

Modified:
    ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/model/ModelMenuItem.java
    ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java

Modified: ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/model/ModelMenuItem.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/model/ModelMenuItem.java?rev=1720933&r1=1720932&r2=1720933&view=diff
==============================================================================
--- ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/model/ModelMenuItem.java
(original)
+++ ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/model/ModelMenuItem.java
Sat Dec 19 14:38:34 2015
@@ -524,9 +524,6 @@ public class ModelMenuItem extends Model
             if (linkElement.getAttribute("text").isEmpty()) {
                 linkElement.setAttribute("text", parentMenuItem.getTitle().getOriginal());
             }
-            if (linkElement.getAttribute("style").isEmpty()) {
-                linkElement.setAttribute("style", parentMenuItem.getWidgetStyle());
-            }
             this.link = new Link(linkElement);
         }
 

Modified: ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java?rev=1720933&r1=1720932&r2=1720933&view=diff
==============================================================================
--- ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
(original)
+++ ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroMenuRenderer.java
Sat Dec 19 14:38:34 2015
@@ -288,10 +288,14 @@ public class MacroMenuRenderer implement
         Map<String, Object> parameters = new HashMap<String, Object>();
         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 (this.isDisableIfEmpty(menuItem, context)) {
             style = menuItem.getDisabledTitleStyle();



Mime
View raw message