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 2015/01/08 13:28:24 UTC
svn commit: r1650260 - in /myfaces/tobago/branches/tobago-3.0.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/
tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/styl...
Author: lofwyr
Date: Thu Jan 8 12:28:23 2015
New Revision: 1650260
URL: http://svn.apache.org/r1650260
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap
- basic implementation of Tab
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java?rev=1650260&r1=1650259&r2=1650260&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java Thu Jan 8 12:28:23 2015
@@ -21,8 +21,9 @@ package org.apache.myfaces.tobago.render
public enum HtmlRoleValues {
+ NAVIGATION("navigation"),
PRESENTATION("presentation"),
- NAVIGATION("navigation");
+ TABLIST("tablist");
private String value;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css?rev=1650260&r1=1650259&r2=1650260&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css Thu Jan 8 12:28:23 2015
@@ -77,3 +77,7 @@ fixes missing space, I thinks normal Web
margin-top: 10px;
margin-bottom: 5px;
}
+ /* FIXME: This is to hide the toolbar, until it is implemented */
+.tobago-tabGroup-toolBar {
+ display: none;
+}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css?rev=1650260&r1=1650259&r2=1650260&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css Thu Jan 8 12:28:23 2015
@@ -1189,6 +1189,7 @@ a:active.tobago-sheet-pagingLink {
vertical-align: top;
float: left;
cursor: pointer;
+ list-style: none;
}
.tobago-tab img {
@@ -1292,7 +1293,6 @@ a:active.tobago-sheet-pagingLink {
border-color: #ddeeff #778899 #778899 #ddeeff;
border-width: 0 1px 1px 1px;
border-style: solid;
- display: none;
/*overflow: hidden;XXX TOBAGO3*/
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java?rev=1650260&r1=1650259&r2=1650260&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java Thu Jan 8 12:28:23 2015
@@ -41,6 +41,7 @@ import org.apache.myfaces.tobago.renderk
import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.HtmlInputTypes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
import org.apache.myfaces.tobago.renderkit.html.JsonUtils;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
@@ -179,8 +180,9 @@ public class TabGroupRenderer extends La
writer.startElement(HtmlElements.DIV, tabGroup);
writer.writeClassAttribute(Classes.create(tabGroup, "header"));
- writer.startElement(HtmlElements.DIV, tabGroup);
- writer.writeClassAttribute(Classes.create(tabGroup, "headerInner"));
+ writer.startElement(HtmlElements.UL, tabGroup);
+ writer.writeClassAttribute(Classes.create(tabGroup, "headerInner").getStringValue() + " nav nav-tabs");
+ writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.TABLIST.toString(), false);
int index = 0;
for (final UIComponent child : tabGroup.getChildren()) {
@@ -198,8 +200,9 @@ public class TabGroupRenderer extends La
if (maxSeverity != null) {
ComponentUtils.addCurrentMarkup(tab, ComponentUtils.markupOfSeverity(maxSeverity));
}
- writer.startElement(HtmlElements.DIV, tab);
+ writer.startElement(HtmlElements.LI, tab);
writer.writeClassAttribute(Classes.create(tab));
+ writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.PRESENTATION.toString(), false);
writer.writeAttribute(HtmlAttributes.TABGROUPINDEX, index);
final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, tab);
if (title != null) {
@@ -243,12 +246,12 @@ public class TabGroupRenderer extends La
renderTabToolbar(facesContext, writer, tab, toolbar);
}
- writer.endElement(HtmlElements.DIV);
+ writer.endElement(HtmlElements.LI);
}
}
index++;
}
- writer.endElement(HtmlElements.DIV);
+ writer.endElement(HtmlElements.UL);
writer.endElement(HtmlElements.DIV);
if (tabGroup.isShowNavigationBar()) {
final UIToolBar toolBar = createToolBar(facesContext, tabGroup);
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1650260&r1=1650259&r2=1650260&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Thu Jan 8 12:28:23 2015
@@ -91,6 +91,7 @@ table.tobago-gridLayout > tbody > tr:fir
.tobago-sheet-pagingInput {
text-align: center;
+ display: none;
}
.tobago-sheet-pagingOuter {
@@ -116,8 +117,12 @@ table.tobago-gridLayout > tbody > tr:fir
vertical-align: top;
}
-/* sheet -------------------------------------------------------------- */
+/* tab -------------------------------------------------------------- */
-.tobago-sheet-pagingInput {
+.tobago-tab-content {
display: none;
}
+
+.tobago-tab-content-markup-selected {
+ display: block;
+}