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 2013/04/09 11:02:01 UTC
svn commit: r1465935 - in /myfaces/tobago/branches/tobago-1.5.x/tobago-theme:
tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/render...
Author: lofwyr
Date: Tue Apr 9 09:02:01 2013
New Revision: 1465935
URL: http://svn.apache.org/r1465935
Log:
TOBAGO-1245: broken Tooltips on tc:tab and tc:box
Modified:
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/branches/tobago-1.5.x/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/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?rev=1465935&r1=1465934&r2=1465935&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Tue Apr 9 09:02:01 2013
@@ -198,6 +198,10 @@ public class TabGroupRenderer extends La
writer.startElement(HtmlElements.DIV, tab);
writer.writeClassAttribute(Classes.create(tab));
writer.writeAttribute(HtmlAttributes.TABGROUPINDEX, index);
+ String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, tab);
+ if (title != null) {
+ writer.writeAttribute(HtmlAttributes.TITLE, title, true);
+ }
writer.startElement(HtmlElements.A, tab);
if (!tab.isDisabled()) {
Modified: myfaces/tobago/branches/tobago-1.5.x/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/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java?rev=1465935&r1=1465934&r2=1465935&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java Tue Apr 9 09:02:01 2013
@@ -28,6 +28,7 @@ import org.apache.myfaces.tobago.layout.
import org.apache.myfaces.tobago.renderkit.BoxRendererBase;
import org.apache.myfaces.tobago.renderkit.css.Classes;
import org.apache.myfaces.tobago.renderkit.css.Style;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
@@ -84,6 +85,10 @@ without shadow
HtmlRendererUtils.renderDojoDndItem(box, writer, true);
writer.writeClassAttribute(Classes.create(box));
writer.writeIdAttribute(clientId);
+ String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, box);
+ if (title != null) {
+ writer.writeAttribute(HtmlAttributes.TITLE, title, true);
+ }
HtmlRendererUtils.writeDataAttributes(facesContext, writer, box);
writer.writeStyleAttribute(new Style(facesContext, box));
encodeBox(facesContext, writer, box);
Modified: myfaces/tobago/branches/tobago-1.5.x/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/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1465935&r1=1465934&r2=1465935&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Tue Apr 9 09:02:01 2013
@@ -2536,6 +2536,16 @@ Tobago.TabGroup.init = function(elements
selected.nextAll(":not(.tobago-tab-markup-disabled):first").click();
});
+ // tool tips
+ tabGroups.each(function() {
+ var tabGroup = jQuery(this);
+ tabGroup.find(".tobago-tab").each(function() {
+ var tab = jQuery(this);
+ var tabContent = tabGroup.find(".tobago-tab-content[tabgroupindex=" + tab.attr("tabgroupindex") + "]");
+ tabContent.attr("title", tab.attr("title"));
+ });
+ });
+
// init scroll position
var header = tabGroups.find(".tobago-tabGroup-header");
header.each(function() {