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:38:41 UTC
svn commit: r1465949 - in /myfaces/tobago/trunk/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/renderkit/html/speysid...
Author: lofwyr
Date: Tue Apr 9 09:38:41 2013
New Revision: 1465949
URL: http://svn.apache.org/r1465949
Log:
TOBAGO-1245: broken Tooltips on tc:tab and tc:box
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-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
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-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=1465949&r1=1465948&r2=1465949&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 Tue Apr 9 09:38:41 2013
@@ -199,6 +199,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/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=1465949&r1=1465948&r2=1465949&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 Tue Apr 9 09:38:41 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/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=1465949&r1=1465948&r2=1465949&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 Tue Apr 9 09:38:41 2013
@@ -2551,6 +2551,17 @@ Tobago.TabGroup.init = function(elements
Tobago.TabGroup.ensureScrollPosition(jQuery(this));
});
+ // 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"));
+ });
+ });
+
+
// initialize menu
// XXX ":last" is dangerous, please define e.g. a unique class for "menu"
// tabGroups.find(".tobago-tabGroupToolBar-button:last").find(".tobago-menu").click(function() {