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 2011/08/03 23:08:00 UTC

svn commit: r1153666 - in /myfaces/tobago/trunk/tobago-theme: tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/ tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside...

Author: lofwyr
Date: Wed Aug  3 21:07:59 2011
New Revision: 1153666

URL: http://svn.apache.org/viewvc?rev=1153666&view=rev
Log:
TOBAGO-1018: Hover of Box-ToolBar and TabGroup-ToolBar doesn't work
 - fix parent class name
 - simplify jQuery code
 - apply naming conventions

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java?rev=1153666&r1=1153665&r2=1153666&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java Wed Aug  3 21:07:59 2011
@@ -166,7 +166,7 @@ without shadow
   protected void renderToolbar(
       FacesContext facesContext, TobagoResponseWriter writer, UIBox box, UIPanel toolbar) throws IOException {
     writer.startElement(HtmlElements.DIV, null);
-    writer.writeClassAttribute(Classes.create(box, "headerToolbar"));
+    writer.writeClassAttribute(Classes.create(box, "headerToolBar"));
     toolbar.setRendererType(RendererTypes.BOX_TOOL_BAR);
     RenderUtils.encode(facesContext, toolbar);
     writer.endElement(HtmlElements.DIV);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?rev=1153666&r1=1153665&r2=1153666&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css Wed Aug  3 21:07:59 2011
@@ -54,7 +54,7 @@
   white-space: nowrap;
 }
 
-.tobago-box-headerToolbar {
+.tobago-box-headerToolBar {
   position: absolute;
   top: 0;
   right: -1px;

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.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.js?rev=1153666&r1=1153665&r2=1153666&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Wed Aug  3 21:07:59 2011
@@ -2534,11 +2534,8 @@ Tobago.ToolBar.init = function(elements)
 
     Tobago.selectWidthJQuery(elements, ".tobago-toolBar").find('.tobago-toolBar-item')
         .not('.tobago-toolBar-item-markup-disabled')
-        .mouseenter(function() {
-      jQuery(this).addClass('tobago-toolBar-item-markup-hover');
-    })
-        .mouseleave(function() {
-      jQuery(this).removeClass('tobago-toolBar-item-markup-hover');
+        .hover(function() {
+      jQuery(this).toggleClass('tobago-toolBar-item-markup-hover');
     })
         .children('.tobago-toolBar-button, .tobago-toolBar-menu')
         .mouseenter(function() {
@@ -2565,13 +2562,10 @@ Tobago.ToolBar.init = function(elements)
       });
     });
 
-    Tobago.selectWidthJQuery(elements, ".tobago-boxToolBar").find('.tobago-boxToolBar-item')
+    Tobago.selectWidthJQuery(elements, ".tobago-box-headerToolBar").find('.tobago-boxToolBar-item')
         .not('.tobago-boxToolBar-item-markup-disabled')
-        .mouseenter(function() {
-      jQuery(this).addClass('tobago-boxToolBar-item-markup-hover');
-    })
-        .mouseleave(function() {
-      jQuery(this).removeClass('tobago-boxToolBar-item-markup-hover');
+        .hover(function() {
+      jQuery(this).toggleClass('tobago-boxToolBar-item-markup-hover');
     })
         .children('.tobago-boxToolBar-button, .tobago-boxToolBar-menu')
         .mouseenter(function() {
@@ -2598,13 +2592,10 @@ Tobago.ToolBar.init = function(elements)
       });
     });
 
-    Tobago.selectWidthJQuery(elements, ".tobago-tabGroupToolBar").find('.tobago-tabGroupToolBar-item')
+    Tobago.selectWidthJQuery(elements, ".tobago-tabGroup-toolBar").find('.tobago-tabGroupToolBar-item')
         .not('.tobago-tabGroupToolBar-item-markup-disabled')
-        .mouseenter(function() {
-      jQuery(this).addClass('tobago-tabGroupToolBar-item-markup-hover');
-    })
-        .mouseleave(function() {
-      jQuery(this).removeClass('tobago-tabGroupToolBar-item-markup-hover');
+        .hover(function() {
+      jQuery(this).toggleClass('tobago-tabGroupToolBar-item-markup-hover');
     })
         .children('.tobago-tabGroupToolBar-button, .tobago-tabGroupToolBar-menu')
         .mouseenter(function() {