Author: konstantin.mishin
Date: 2009-06-04 08:48:56 -0400 (Thu, 04 Jun 2009)
New Revision: 14477
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabClassBuilder.java
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js
branches/community/3.3.X/ui/tabPanel/src/main/templates/tab.jspx
branches/community/3.3.X/ui/tabPanel/src/main/templates/tabHeader.jspx
branches/community/3.3.X/ui/tabPanel/src/main/templates/tabPanel.jspx
branches/community/3.3.X/ui/tabPanel/src/test/java/org/richfaces/component/TabPanelComponentTest.java
Log:
RF-7318
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabClassBuilder.java
===================================================================
---
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabClassBuilder.java 2009-06-04
12:48:06 UTC (rev 14476)
+++
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabClassBuilder.java 2009-06-04
12:48:56 UTC (rev 14477)
@@ -38,8 +38,7 @@
public static final TabClassBuilder activeTabClassBuilder = new TabClassBuilder() {
protected String getSpecificClassForAllTabs() {
- //dr-tb-act
- return "dr-tbpnl-tb-act rich-tab-active";
+ return "rich-tab-active";
}
protected String getSpecificTabClassFromPane(UITab tab,
@@ -53,8 +52,7 @@
public static final TabClassBuilder disabledTabClassBuilder = new TabClassBuilder()
{
protected String getSpecificClassForAllTabs() {
- //dr-tb-dsbld
- return "dr-tbpnl-tb-dsbl rich-tab-disabled";
+ return "rich-tab-disabled";
}
protected String getSpecificTabClassFromPane(UITab tab,
@@ -68,8 +66,7 @@
public static final TabClassBuilder inactiveTabClassBuilder = new TabClassBuilder()
{
protected String getSpecificClassForAllTabs() {
- //dr-tb-inact
- return "dr-tbpnl-tb-inact rich-tab-inactive";
+ return "rich-tab-inactive";
}
protected String getSpecificTabClassFromPane(UITab tab,
@@ -123,8 +120,7 @@
* @return
*/
protected String getCommonClassForAllTabs() {
- //dr-tb-cntrl
- return "dr-tbpnl-tb rich-tab-header";
+ return "rich-tab-header";
}
/**
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2009-06-04
12:48:06 UTC (rev 14476)
+++
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2009-06-04
12:48:56 UTC (rev 14477)
@@ -55,9 +55,9 @@
*/
public class TabPanelRendererBase extends
org.ajax4jsf.renderkit.HeaderResourcesRendererBase {
- public final static String ACTIVE_CELL_CLASSES = "dr-tbpnl-tbcell-act
rich-tabhdr-cell-active";
- public final static String INACTIVE_CELL_CLASSES = "dr-tbpnl-tbcell-inact
rich-tabhdr-cell-inactive";
- public final static String DISABLED_CELL_CLASSES = "dr-tbpnl-tbcell-dsbld
rich-tabhdr-cell-disabled";
+ public final static String ACTIVE_CELL_CLASSES =
"rich-tabhdr-cell-active";
+ public final static String INACTIVE_CELL_CLASSES =
"rich-tabhdr-cell-inactive";
+ public final static String DISABLED_CELL_CLASSES =
"rich-tabhdr-cell-disabled";
private final String TABS_WITH_SAME_NAMES_ERROR = "tabs with the same name not
allowed";
protected Class getComponentClass() {
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss
===================================================================
---
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss 2009-06-04
12:48:06 UTC (rev 14476)
+++
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/css/tabPanel.xcss 2009-06-04
12:48:56 UTC (rev 14477)
@@ -4,65 +4,13 @@
xmlns:u="http://jsf.exadel.com/template/util"
xmlns="http://www.w3.org/1999/xhtml">
-<!--
<f:verbatim>
-.dr-tb-ctrl{
- position: relative;
-}
-.dr-tb-act{
- top: 1px;
-}
-.dr-tb-inact, .dr-tb-dsbld{
- top: 0px;
-}
-.dr-tb-inact *, .dr-tb-inact-ovr * {
- cursor: pointer !important;
-}
-
-.dr-tb-act td.dr-tb-bd {
- padding: 3px 5px 5px 5px;
- text-align: center;
- cursor: default;
- width: auto;
- white-space: nowrap;
- font-weight: bold;
-}
-
-.dr-tb-inact td.dr-tb-bd {
- padding: 3px 5px 0px 5px;
- text-align: center;
- cursor: pointer;
- width: auto;
- white-space: nowrap;
-}
-
-.dr-tb-inact-ovr td.dr-tb-bd {
- padding: 3px 5px 0px 5px;
- text-align: center;
- cursor: pointer;
- width: auto;
- white-space: nowrap;
-}
-
-.dr-tb-dsbld td.dr-tb-bd {
- padding: 3px 5px 0px 5px;
- text-align: center;
- cursor: default;
- width: auto;
- white-space: nowrap;
-}
-
-</f:verbatim>
--->
-
-<f:verbatim>
-
.rich-tabpanel{
width:100%;
}
-.dr-tbpnl-cntnt {
+.rich-tabpanel-content {
border-bottom-width: 1px;
border-bottom-style: solid;
border-left-width: 1px;
@@ -72,22 +20,22 @@
vertical-align: top;
}
-.dr-tbpnl-tbtopbrdr{
+.rich-tabhdr-side-cell {
border-top-width: 1px;
border-top-style: solid;
}
-.dr-tbpnl-tb{
+.rich-tab-header{
padding : 2px 10px 2px 10px;
text-align: center;
}
-.dr-tbpnl-tbbrdr{
+.rich-tabhdr-side-border{
background-repeat: no-repeat;
background-position: top;
}
-.dr-tbpnl-tb-act{
+.rich-tab-active{
border-width: 1px;
border-style: solid;
padding : 3px 10px 4px 10px;
@@ -97,38 +45,42 @@
cursor : default;
}
-.dr-tbpnl-tb-dsbld {
- border-width: 1px;
- border-style: solid;
+.rich-tab-disabled {
background-repeat: repeat-x;
- background-position: top;
+ background-position: center top;
+ border-width: 1px 1px 0px;
+ border-style: solid;
cursor : default;
}
-.dr-tbpnl-tbcell-dsbld, .dr-tbpnl-tbcell-inact {
+.rich-tabhdr-cell-disabled, .rich-tabhdr-cell-inactive {
padding-top: 2px;
}
</f:verbatim>
- <u:selector name=".dr-tbpnl-tb">
+ <u:selector name=".rich-tab-header">
<u:style name="color" skin="generalTextColor"/>
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="font-family" skin="generalFamilyFont"/>
</u:selector>
- <u:selector name=".dr-tbpnl-tb-act">
+ <u:selector name=".rich-tab-active">
<u:style name="color" skin="generalTextColor"/>
<u:style name="border-color" skin="subBorderColor"/>
</u:selector>
- <u:selector name=".dr-tbpnl-tb-dsbl">
+ <u:selector name=".rich-tab-disabled">
<u:style name="border-color" skin="subBorderColor"/>
<u:style name="color" skin="tabDisabledTextColor"/>
+ <u:style name="background-color" skin="tabBackgroundColor"
/>
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.TabGradientB" />
+ </u:style>
</u:selector>
<f:verbatim>
-.dr-tbpnl-tb-sel {
+.rich-tbpnl-tb-sel {
border-width: 1px;
border-style: solid;
border-bottom : 0px;
@@ -136,13 +88,8 @@
background-position: top;
cursor : default;
}
-
-.dr-tbpnl-tb-dsbl {
- background-repeat: repeat-x;
- background-position: center top;
-}
-.dr-tbpnl-cntnt-pstn {
+.rich-tabpanel-content-position {
height:100%;
position: relative;
}
@@ -150,13 +97,16 @@
<u:selector name=".dr-tbpnl-tb-sel">
<u:style name="border-color" skin="selectControlColor"/>
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.TabGradientB" />
+ </u:style>
</u:selector>
- <u:selector name=".dr-tbpnl-tbtopbrdr">
+ <u:selector name=".rich-tabhdr-side-cell">
<u:style name="border-top-color" skin="panelBorderColor"/>
</u:selector>
- <u:selector name=".dr-tbpnl-cntnt">
+ <u:selector name=".rich-tabpanel-content">
<u:style name="background-color"
skin="generalBackgroundColor"/>
<u:style name="color" skin="generalTextColor"/>
<u:style name="border-bottom-color"
skin="panelBorderColor"/>
@@ -166,18 +116,11 @@
<u:style name="font-family" skin="generalFamilyFont"/>
</u:selector>
- <u:selector name=".dr-tbpnl-tb-dsbl">
+ <u:selector name=".rich-tab-inactive">
<u:style name="background-color" skin="tabBackgroundColor"
/>
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.TabGradientB" />
</u:style>
- </u:selector>
-
- <u:selector name=".dr-tbpnl-tb-inact">
- <u:style name="background-color" skin="tabBackgroundColor"
/>
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.images.TabGradientB" />
- </u:style>
<u:style name="border-color" skin="subBorderColor"/>
<u:style name="border-width" value="1px"/>
@@ -190,31 +133,23 @@
</u:selector>
- <u:selector name=".dr-bottom-line">
+ <u:selector name=".rich-tab-bottom-line">
<u:style name="border-bottom-color"
skin="panelBorderColor"/>
<u:style name="border-bottom-style" value="solid"/>
<u:style name="border-bottom-width" value="1px"/>
</u:selector>
- <u:selector name=".dr-tbpnl-tb-act">
+ <u:selector name=".rich-tab-active">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.TabGradientA" />
</u:style>
<u:style name="background-color" skin="generalBackgroundColor"
/>
</u:selector>
- <u:selector name=".dr-tbpnl-tbbrdr">
+ <u:selector name=".rich-tabhdr-side-border">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.TabStripeImage"/>
</u:style>
- </u:selector>
-
- <u:selector name=".dr-tbpnl-tb-sel">
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.images.TabGradientB" />
- </u:style>
- <u:style name="border-color" skin="selectControlColor" />
- </u:selector>
-
+ </u:selector>
</f:template>
\ No newline at end of file
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js
===================================================================
---
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js 2009-06-04
12:48:06 UTC (rev 14476)
+++
branches/community/3.3.X/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js 2009-06-04
12:48:56 UTC (rev 14477)
@@ -134,17 +134,17 @@
RichFaces.overTab = function(tab) {
if (RichFaces._shouldHoverTab(tab)) {
- Element.addClassName(tab, 'dr-tbpnl-tb-sel');
+ Element.addClassName(tab, 'rich-tbpnl-tb-sel');
}
}
RichFaces.outTab = function(tab) {
if (RichFaces._shouldHoverTab(tab)) {
- Element.removeClassName(tab, 'dr-tbpnl-tb-sel');
+ Element.removeClassName(tab, 'rich-tbpnl-tb-sel');
}
}
RichFaces._shouldHoverTab = function(tab) {
- return (tab.className.indexOf('dr-tbpnl-tb-act') < 0);
+ return (tab.className.indexOf('rich-tab-active') < 0);
}
RichFaces.onTabChange = function(event, pane,tab) {
Modified: branches/community/3.3.X/ui/tabPanel/src/main/templates/tab.jspx
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/templates/tab.jspx 2009-06-04 12:48:06
UTC (rev 14476)
+++ branches/community/3.3.X/ui/tabPanel/src/main/templates/tab.jspx 2009-06-04 12:48:56
UTC (rev 14477)
@@ -16,9 +16,9 @@
<td id="#{clientId}" style="#{this:getTabDisplay(context,
component)};height:100%"
- <table border="0" cellpadding="10" cellspacing="0"
width="100%" class="dr-tbpnl-cntnt-pstn
rich-tabpanel-content-position" style="">
+ <table border="0" cellpadding="10" cellspacing="0"
width="100%" class="rich-tabpanel-content-position"
style="">
<tr>
- <td class="dr-tbpnl-cntnt rich-tabpanel-content
#{component.pane.attributes['contentClass']}
#{component.attributes['styleClass']}"
+ <td class="rich-tabpanel-content
#{component.pane.attributes['contentClass']}
#{component.attributes['styleClass']}"
style="#{component.pane.attributes['contentStyle']};
#{component.attributes['style']}"
x:passThruWithExclusions="class,style,styleClass,id"
Modified: branches/community/3.3.X/ui/tabPanel/src/main/templates/tabHeader.jspx
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/templates/tabHeader.jspx 2009-06-04
12:48:06 UTC (rev 14476)
+++ branches/community/3.3.X/ui/tabPanel/src/main/templates/tabHeader.jspx 2009-06-04
12:48:56 UTC (rev 14477)
@@ -20,8 +20,8 @@
<f:call name="encodeTabLabel" />
<tr>
- <td class="dr-tbpnl-tbbrdr rich-tabhdr-side-border"><img
src="#{spacer}" width="1" height="1" alt=""
style="border:0" /></td>
- <td class="dr-tbpnl-tbtopbrdr rich-tabhdr-side-cell"
style="#{this:encodeTabLabelWidth(context, component)}">
+ <td class="rich-tabhdr-side-border"><img src="#{spacer}"
width="1" height="1" alt="" style="border:0"
/></td>
+ <td class="rich-tabhdr-side-cell"
style="#{this:encodeTabLabelWidth(context, component)}">
<table style="height: 100%; width: 100%;" border="0"
cellpadding="0" cellspacing="0" >
<tr>
<td id="#{clientId}_lbl"
@@ -40,7 +40,7 @@
</tr>
</table>
</td>
- <td class="dr-tbpnl-tbbrdr rich-tabhdr-side-border"><img
src="#{spacer}" width="1" height="1" alt=""
style="border:0" /></td>
+ <td class="rich-tabhdr-side-border"><img src="#{spacer}"
width="1" height="1" alt="" style="border:0"
/></td>
</tr>
</table>
Modified: branches/community/3.3.X/ui/tabPanel/src/main/templates/tabPanel.jspx
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/templates/tabPanel.jspx 2009-06-04
12:48:06 UTC (rev 14476)
+++ branches/community/3.3.X/ui/tabPanel/src/main/templates/tabPanel.jspx 2009-06-04
12:48:56 UTC (rev 14477)
@@ -35,7 +35,7 @@
<tbody>
<tr>
- <td align="#{component.attributes['headerAlignment']}"
class="dr-bottom-line rich-tab-bottom-line
#{component.attributes['headerClass']}">
+ <td align="#{component.attributes['headerAlignment']}"
class="rich-tab-bottom-line #{component.attributes['headerClass']}">
<f:call name="utils.encodeBeginFormIfNessesary" />
<!--table border="0" cellpadding="0"
cellspacing="0" style="position:relative;top:1px"-->
<table border="0" cellpadding="0"
cellspacing="0">
Modified:
branches/community/3.3.X/ui/tabPanel/src/test/java/org/richfaces/component/TabPanelComponentTest.java
===================================================================
---
branches/community/3.3.X/ui/tabPanel/src/test/java/org/richfaces/component/TabPanelComponentTest.java 2009-06-04
12:48:06 UTC (rev 14476)
+++
branches/community/3.3.X/ui/tabPanel/src/test/java/org/richfaces/component/TabPanelComponentTest.java 2009-06-04
12:48:56 UTC (rev 14477)
@@ -128,7 +128,6 @@
assertEquals("td", cell1.getNodeName());
String classAttr1 = cell1.getAttributeValue("class");
- assertTrue(classAttr1.contains("dr-tbpnl-tbcell-act"));
assertTrue(classAttr1.contains("rich-tabhdr-cell-active"));
HtmlElement label1 = page.getHtmlElementById(tab1.getClientId(facesContext) +
"_lbl");
@@ -139,9 +138,7 @@
assertEquals("RichFaces.outTab(this);",
label1.getAttributeValue("onmouseout"));
String classAttrL1 = label1.getAttributeValue("class");
- assertTrue(classAttrL1.contains("dr-tbpnl-tb"));
assertTrue(classAttrL1.contains("rich-tab-header"));
- assertTrue(classAttrL1.contains("dr-tbpnl-tb-act"));
assertTrue(classAttrL1.contains("rich-tab-active"));
HtmlElement cell2 = page.getHtmlElementById(tab2.getClientId(facesContext) +
"_cell");
@@ -149,7 +146,6 @@
assertEquals("td", cell2.getNodeName());
String classAttr2 = cell2.getAttributeValue("class");
- assertTrue(classAttr2.contains("dr-tbpnl-tbcell-inact"));
assertTrue(classAttr2.contains("rich-tabhdr-cell-inactive"));
HtmlElement label2 = page.getHtmlElementById(tab2.getClientId(facesContext) +
"_lbl");
@@ -160,9 +156,7 @@
assertEquals("RichFaces.outTab(this);",
label1.getAttributeValue("onmouseout"));
String classAttrL2 = label2.getAttributeValue("class");
- assertTrue(classAttrL2.contains("dr-tbpnl-tb"));
assertTrue(classAttrL2.contains("rich-tab-header"));
- assertTrue(classAttrL2.contains("dr-tbpnl-tb-inact"));
assertTrue(classAttrL2.contains("rich-tab-inactive"));
HtmlElement tab = page.getHtmlElementById(tab1.getClientId(facesContext));