You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/07/09 16:02:03 UTC

svn commit: r1609159 - in /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main: java/org/apache/myfaces/tobago/renderkit/html/util/ resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/

Author: lofwyr
Date: Wed Jul  9 14:02:02 2014
New Revision: 1609159

URL: http://svn.apache.org/r1609159
Log:
TOBAGO-1410: Menu Dropdown did not collapse after partially action

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java?rev=1609159&r1=1609158&r2=1609159&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java Wed Jul  9 14:02:02 2014
@@ -120,11 +120,10 @@ public final class HtmlRendererUtils {
       final UIPage page = (UIPage) ComponentUtils.findPage(facesContext, component);
       final String id = component.getClientId(facesContext);
       if (!StringUtils.isBlank(page.getFocusId()) && !page.getFocusId().equals(id)) {
-        LOG.warn("page focusId = \"" + page.getFocusId() + "\" ignoring new value \""
-            + id + "\"");
+        LOG.warn("page focusId='" + page.getFocusId() + "' ignoring new value '" + id + "'");
       } else {
         final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-        writer.writeJavascript("Tobago.focusId = '" + id + "';");
+        writer.writeJavascript("Tobago.focusId='" + id + "';");
       }
     }
   }
@@ -482,7 +481,8 @@ public final class HtmlRendererUtils {
       }
       return clientId;
     }
-    LOG.error("No Component found for id " + componentId + " search base component " + component.getClientId(context));
+    LOG.error("No component found for id='" + componentId + "', " +
+        "search base component is '" + component.getClientId(context) + "'");
     return null;
   }
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js?rev=1609159&r1=1609158&r2=1609159&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js Wed Jul  9 14:02:02 2014
@@ -388,7 +388,7 @@ Tobago.Menu.init = function(elements) {
   });
 
   // prevent default
-  var menu = Tobago.Utils.selectWidthJQuery(elements, ".tobago-menu");
+  var menu = Tobago.Utils.selectWidthJQuery(elements, ".tobago-menu").not(".tobago-menu-markup-top");
   menu.each(function() {
     var menuItem = jQuery(this);
     if (menuItem.children("ol").size() > 0) {
@@ -397,6 +397,10 @@ Tobago.Menu.init = function(elements) {
         event.preventDefault();
         return false;
       });
+    } else {
+      menuItem.click(function(event) {
+        Tobago.Menu.closeAll();
+      });
     }
   });
 };