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 2010/08/11 17:21:50 UTC
svn commit: r984438 - in
/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag:
TabGroupRenderer.java ToolBarRendererBase.java
Author: lofwyr
Date: Wed Aug 11 15:21:50 2010
New Revision: 984438
URL: http://svn.apache.org/viewvc?rev=984438&view=rev
Log:
TOBAGO-881: ToolBar
- Javascript error: fix stopPropagation for IE
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?rev=984438&r1=984437&r2=984438&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Wed Aug 11 15:21:50 2010
@@ -466,7 +466,12 @@ public class TabGroupRenderer extends La
LabelWithAccessKey label = new LabelWithAccessKey(tab);
entry.setLabel(label.getText());
String tabId = clientId + "__" + virtualTab + "__" + index;
- entry.setOnclick(JQueryUtils.selectId(tabId) + ".click();event.stopPropagation();");
+ entry.setOnclick(JQueryUtils.selectId(tabId) + ".click();"
+ + "if (event.stopPropagation === undefined) { "
+ + " event.cancelBubble = true; " // IE
+ + "} else { "
+ + " event.stopPropagation(); " // other
+ + "}"); // todo: register a onclick handler with jQuery
menu.getChildren().add(entry);
}
index++;
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java?rev=984438&r1=984437&r2=984438&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java Wed Aug 11 15:21:50 2010
@@ -523,7 +523,12 @@ public abstract class ToolBarRendererBas
private String createMenuOnClick(UICommandBase command) {
if (FacetUtils.getDropDownMenu(command) != null) {
- return "jQuery(this).find('a').click();event.stopPropagation();";
+ return "jQuery(this).find('a').click(); "
+ + "if (event.stopPropagation === undefined) { "
+ + " event.cancelBubble = true; " // IE
+ + "} else { "
+ + " event.stopPropagation(); " // other
+ + "}"; // todo: register a onclick handler with jQuery
} else {
return null;
}