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/07/22 16:43:50 UTC
svn commit: r966694 - in /myfaces/tobago/trunk/tobago-theme:
tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/
tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/rende...
Author: lofwyr
Date: Thu Jul 22 14:43:49 2010
New Revision: 966694
URL: http://svn.apache.org/viewvc?rev=966694&view=rev
Log:
TOBAGO-893: Optimize StyleClasses
- change some renderers to use class "Classes" instead of String
- using default naming schema for classes and markups
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml
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-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css?rev=966694&r1=966693&r2=966694&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css Thu Jul 22 14:43:49 2010
@@ -33,6 +33,32 @@
border-bottom: 1px solid #FECB66;
}
+/* boxToolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-boxToolBar {
+ border-color: #FECB66;
+}
+
+.tobago-boxToolBar-item-markup-selected {
+ border-color: #FECB66;
+}
+
+.tobago-boxToolBar-item-markup-hover {
+ border-color: #FECB66;
+}
+
+.tobago-boxToolBar-button-markup-selected {
+ background-color: #FFEECF;
+}
+
+.tobago-boxToolBar-button-markup-hover {
+ background-color: #FADC9F;
+}
+
/* button ------------------------------------------------------------------ */
.tobago-button {
@@ -150,24 +176,50 @@ div.tobago-tabGroup-fulfill {
border-color: #FECB66;
}
+/* tabGroupToolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-tabGroupToolBar {
+ border-color: #FECB66;
+}
+
+.tobago-tabGroupToolBar-item-markup-selected {
+ border-color: #FECB66;
+}
+
+.tobago-tabGroupToolBar-item-markup-hover {
+ border-color: #FECB66;
+}
+
+.tobago-tabGroupToolBar-button-markup-selected {
+ background-color: #FFEECF;
+}
+
+.tobago-tabGroupToolBar-button-markup-hover {
+ background-color: #FADC9F;
+}
+
/* toolBar ----------------------------------------------------------------- */
.tobago-toolBar {
border-color: #FECB66;
}
-.tobago-toolBar-item-selected {
+.tobago-toolBar-item-markup-selected {
border-color: #FECB66;
}
-.tobago-toolBar-item-hover {
+.tobago-toolBar-item-markup-hover {
border-color: #FECB66;
}
-.tobago-toolBar-button-selected {
+.tobago-toolBar-button-markup-selected {
background-color: #FFEECF;
}
-.tobago-toolBar-button-hover {
+.tobago-toolBar-button-markup-hover {
background-color: #FADC9F;
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css?rev=966694&r1=966693&r2=966694&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css Thu Jul 22 14:43:49 2010
@@ -33,6 +33,32 @@
border-bottom: 1px solid #FF9900;
}
+/* toolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-boxToolBar {
+ border-color: #FF9900;
+}
+
+.tobago-boxToolBar-item-markup-selected {
+ border-color: #FF9900;
+}
+
+.tobago-boxToolBar-item-markup-hover {
+ border-color: #3366CC;
+}
+
+.tobago-boxToolBar-button-markup-selected {
+ background-color: #FFCC66;
+}
+
+.tobago-boxToolBar-button-markup-hover {
+ background-color: #FAB54D;
+}
+
/* button ------------------------------------------------------------ */
.tobago-button {
@@ -294,6 +320,32 @@ div.tobago-tabGroup-fulfill {
box-sizing: border-box;
}
+/* toolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-tabGroupToolBar {
+ border-color: #FF9900;
+}
+
+.tobago-tabGroupToolBar-item-markup-selected {
+ border-color: #FF9900;
+}
+
+.tobago-tabGroupToolBar-item-markup-hover {
+ border-color: #3366CC;
+}
+
+.tobago-tabGroupToolBar-button-markup-selected {
+ background-color: #FFCC66;
+}
+
+.tobago-tabGroupToolBar-button-markup-hover {
+ background-color: #FAB54D;
+}
+
/* time -------------------------------------------------------------------- */
.tobago-time-borderDiv {
@@ -335,19 +387,19 @@ div.tobago-tabGroup-fulfill {
border-color: #FF9900;
}
-.tobago-toolBar-item-selected {
+.tobago-toolBar-item-markup-selected {
border-color: #FF9900;
}
-.tobago-toolBar-item-hover {
+.tobago-toolBar-item-markup-hover {
border-color: #3366CC;
}
-.tobago-toolBar-button-selected {
+.tobago-toolBar-button-markup-selected {
background-color: #FFCC66;
}
-.tobago-toolBar-button-hover {
+.tobago-toolBar-button-markup-hover {
background-color: #FAB54D;
}
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=966694&r1=966693&r2=966694&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 Thu Jul 22 14:43:49 2010
@@ -27,6 +27,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.UIToolBar;
import org.apache.myfaces.tobago.component.UIToolBarSeparator;
import org.apache.myfaces.tobago.config.Configurable;
+import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.context.ResourceManager;
import org.apache.myfaces.tobago.context.ResourceManagerFactory;
import org.apache.myfaces.tobago.context.ResourceManagerUtils;
@@ -35,6 +36,7 @@ import org.apache.myfaces.tobago.interna
import org.apache.myfaces.tobago.layout.Measure;
import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
+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.HtmlConstants;
@@ -350,20 +352,19 @@ public abstract class ToolBarRendererBas
// start rendering
writer.startElement(HtmlConstants.SPAN, command);
- String itemClass = "tobago-toolBar-item";
+ Markup itemMarkup = Markup.NULL;
if (selected) {
- itemClass += " tobago-toolBar-item-selected";
+ itemMarkup = itemMarkup.add(Markup.SELECTED);
}
if (disabled) {
- itemClass += " tobago-toolBar-item-disabled";
+ itemMarkup = itemMarkup.add(Markup.DISABLED);
}
- writer.writeClassAttribute(itemClass);
+ writer.writeClassAttribute(Classes.create(toolBar, "item", itemMarkup));
HtmlRendererUtils.renderTip(command, writer);
writer.writeStyleAttribute(itemStyle);
writer.startElement(HtmlConstants.SPAN, command);
- writer.writeClassAttribute(
- selected ? "tobago-toolBar-button tobago-toolBar-button-selected" : "tobago-toolBar-button");
+ writer.writeClassAttribute(Classes.create(toolBar, "button", selected ? Markup.SELECTED : Markup.NULL));
writer.writeStyleAttribute(buttonStyle);
writer.writeAttribute(HtmlAttributes.ONCLICK, commandClick != null ? commandClick : menuClick, true);
// render icon
@@ -383,7 +384,7 @@ public abstract class ToolBarRendererBas
// render label
if (showLabel) {
writer.startElement(HtmlConstants.SPAN, command);
- writer.writeClassAttribute("tobago-toolBar-label");
+ writer.writeClassAttribute(Classes.create(toolBar, "label"));
writer.writeStyleAttribute(labelStyle);
if (label.getText() != null) {
HtmlRendererUtils.writeLabelWithAccessKey(writer, label);
@@ -395,7 +396,7 @@ public abstract class ToolBarRendererBas
writer.endElement(HtmlConstants.SPAN);
writer.startElement(HtmlConstants.SPAN, command);
- writer.writeClassAttribute("tobago-toolBar-menu");
+ writer.writeClassAttribute(Classes.create(toolBar, "menu"));
writer.writeStyleAttribute(menuStyle);
writer.writeAttribute(HtmlAttributes.TYPE, "button", false);
writer.writeAttribute(HtmlAttributes.ONCLICK, menuClick, true);
@@ -426,14 +427,14 @@ public abstract class ToolBarRendererBas
}
writer.startElement(HtmlConstants.SPAN, separator);
- writer.writeClassAttribute("tobago-toolBar-item tobago-toolBar-item-disabled");
+ writer.writeClassAttribute(Classes.create(toolBar, "item", Markup.DISABLED));
Style itemStyle = new Style();
itemStyle.setHeight(getItemHeight(facesContext, toolBar));
itemStyle.setWidth(Measure.valueOf(10));
writer.writeStyleAttribute(itemStyle);
writer.startElement(HtmlConstants.SPAN, separator);
- writer.writeClassAttribute("tobago-toolBar-separator");
+ writer.writeClassAttribute(Classes.create(toolBar, "separator"));
writer.endElement(HtmlConstants.SPAN);
writer.endElement(HtmlConstants.SPAN);
@@ -559,6 +560,7 @@ public abstract class ToolBarRendererBas
private void renderDropDownMenu(FacesContext facesContext, TobagoResponseWriter writer, AbstractUIMenu dropDownMenu)
throws IOException {
writer.startElement(HtmlConstants.OL, dropDownMenu);
+ // XXX fix naming conventions for CSS classes
writer.writeClassAttribute("tobago-menuBar tobago-menu-dropDownMenu");
RenderUtils.encode(facesContext, dropDownMenu);
writer.endElement(HtmlConstants.OL);
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js?rev=966694&r1=966693&r2=966694&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js Thu Jul 22 14:43:49 2010
@@ -229,12 +229,10 @@ function xxx_tobagoMenuInit() {
}
event.stopPropagation();
-
});
// a click on toolBar menu opener -> forward to .tobago-menu-markup-top
- jQuery(".tobago-toolBar-menu").click(function(event) {
-
+ jQuery(".tobago-toolBar-menu .tobago-boxToolBar-menu .tobago-tabGroupToolBar-menu").click(function(event) {
$(this).next().find('a').click();
event.stopPropagation();
});
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=966694&r1=966693&r2=966694&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Thu Jul 22 14:43:49 2010
@@ -55,6 +55,68 @@ fieldset.tobago-box {
-moz-box-sizing: border-box;
}
+/* toolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-boxToolBar {
+ border: 2px groove #F6FAFF;
+ position: relative;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+.tobago-boxToolBar-item {
+ position: relative;
+ display: inline-block;
+ border-width: 0;
+ border-style: solid;
+ margin: 0;
+ left: 0;
+ top: 0;
+}
+
+.tobago-boxToolBar-item-markup-disabled {
+ color: #778899;
+}
+
+.tobago-boxToolBar-button, .tobago-boxToolBar-menu {
+ position: absolute;
+ border-width: 0;
+ padding: 0;
+ margin: 0;
+ background-color: transparent;
+}
+
+.tobago-boxToolBar-item img {
+ position: absolute;
+}
+
+.tobago-boxToolBar-label {
+ position: absolute;
+ font: bold 12px arial,helvetica,sans-serif;
+ white-space: nowrap;
+}
+
+.tobago-boxToolBar-button-markup-selected {
+ background-color: #CCDDEE;
+}
+
+.tobago-boxToolBar-button-markup-hover {
+ background-color: #CCDDEE;
+}
+
+.tobago-boxToolBar-separator {
+ border: 1px inset #bbccdd;
+ left: 4px;
+ width: 0;
+ top: 3px;
+ bottom: 3px;
+ position: absolute;
+}
+
/* button ------------------------------------------------------------------ */
.tobago-button {
@@ -1004,6 +1066,68 @@ div.tobago-tabGroup-toolBar {
white-space: nowrap;
}
+/* tabGroupToolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-toolBar {
+ border: 2px groove #F6FAFF;
+ position: relative;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+.tobago-toolBar-item {
+ position: relative;
+ display: inline-block;
+ border-width: 0;
+ border-style: solid;
+ margin: 0;
+ left: 0;
+ top: 0;
+}
+
+.tobago-toolBar-item-markup-disabled {
+ color: #778899;
+}
+
+.tobago-toolBar-button, .tobago-toolBar-menu {
+ position: absolute;
+ border-width: 0;
+ padding: 0;
+ margin: 0;
+ background-color: transparent;
+}
+
+.tobago-toolBar-item img {
+ position: absolute;
+}
+
+.tobago-toolBar-label {
+ position: absolute;
+ font: bold 12px arial,helvetica,sans-serif;
+ white-space: nowrap;
+}
+
+.tobago-toolBar-button-markup-selected {
+ background-color: #CCDDEE;
+}
+
+.tobago-toolBar-button-markup-hover {
+ background-color: #CCDDEE;
+}
+
+.tobago-toolBar-separator {
+ border: 1px inset #bbccdd;
+ left: 4px;
+ width: 0;
+ top: 3px;
+ bottom: 3px;
+ position: absolute;
+}
+
/* textArea ---------------------------------------------------------------- */
.tobago-textArea {
@@ -1090,6 +1214,10 @@ div.tobago-tabGroup-toolBar {
/* toolBar ----------------------------------------------------------------- */
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
.tobago-toolBar {
border: 2px groove #F6FAFF;
position: relative;
@@ -1107,7 +1235,7 @@ div.tobago-tabGroup-toolBar {
top: 0;
}
-.tobago-toolBar-item-disabled {
+.tobago-toolBar-item-markup-disabled {
color: #778899;
}
@@ -1129,11 +1257,11 @@ div.tobago-tabGroup-toolBar {
white-space: nowrap;
}
-.tobago-toolBar-button-selected {
+.tobago-toolBar-button-markup-selected {
background-color: #CCDDEE;
}
-.tobago-toolBar-button-hover {
+.tobago-toolBar-button-markup-hover {
background-color: #CCDDEE;
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?rev=966694&r1=966693&r2=966694&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css Thu Jul 22 14:43:49 2010
@@ -60,6 +60,53 @@
right: -1px;
}
+/* boxToolBar ----------------------------------------------------------------- */
+
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
+.tobago-boxToolBar {
+ border: 1px solid #000000;
+ background-color: #FFFFFF;
+}
+.tobago-boxToolBar-item {
+ position: relative;
+ display: inline-block;
+ border-width: 0;
+ border-style: solid;
+ margin: 0 1px;
+ left: -1px;
+ top: 0;
+}
+.tobago-boxToolBar-item-markup-selected {
+ border-width: 0 1px;
+ border-color: #aaaaaa;
+ margin: 0;
+}
+
+.tobago-boxToolBar-item-markup-hover {
+ border-width: 0 1px;
+ border-color: #000000;
+ margin: 0;
+}
+
+.tobago-boxToolBar-item-markup-disabled {
+ color: #808080;
+}
+
+.tobago-boxToolBar-button-markup-selected {
+ background-color: #EEEEEE;
+}
+
+.tobago-boxToolBar-button-markup-hover {
+ background-color: #DDDDDD;
+}
+
+.tobago-boxToolBar-separator {
+ border: 1px solid #DDDDDD;
+}
+
/* button ------------------------------------------------------------------ */
.tobago-button {
@@ -564,6 +611,49 @@ div.tobago-tabGroup-toolBar {
border-color: #000000;
}
+/* tabGroupToolBar ----------------------------------------------------------------- */
+
+.tobago-tabGroupToolBar {
+ border: 1px solid #000000;
+ background-color: #FFFFFF;
+}
+.tobago-tabGroupToolBar-item {
+ position: relative;
+ display: inline-block;
+ border-width: 0;
+ border-style: solid;
+ margin: 0 1px;
+ left: -1px;
+ top: 0;
+}
+.tobago-tabGroupToolBar-item-markup-selected {
+ border-width: 0 1px;
+ border-color: #aaaaaa;
+ margin: 0;
+}
+
+.tobago-tabGroupToolBar-item-markup-hover {
+ border-width: 0 1px;
+ border-color: #000000;
+ margin: 0;
+}
+
+.tobago-tabGroupToolBar-item-markup-disabled {
+ color: #808080;
+}
+
+.tobago-tabGroupToolBar-button-markup-selected {
+ background-color: #EEEEEE;
+}
+
+.tobago-tabGroupToolBar-button-markup-hover {
+ background-color: #DDDDDD;
+}
+
+.tobago-tabGroupToolBar-separator {
+ border: 1px solid #DDDDDD;
+}
+
/* textArea ---------------------------------------------------------------- */
.tobago-textArea {
@@ -621,6 +711,10 @@ div.tobago-tabGroup-toolBar {
/* toolBar ----------------------------------------------------------------- */
+/* FIXME this is the same code for "toolBar", "boxToolBar" and "tabGroupToolBar"
+ FIXME may be fixed after TOBAGO-900
+*/
+
.tobago-toolBar {
border: 1px solid #000000;
background-color: #FFFFFF;
@@ -634,27 +728,27 @@ div.tobago-tabGroup-toolBar {
left: -1px;
top: 0;
}
-.tobago-toolBar-item-selected {
+.tobago-toolBar-item-markup-selected {
border-width: 0 1px;
border-color: #aaaaaa;
margin: 0;
}
-.tobago-toolBar-item-hover {
+.tobago-toolBar-item-markup-hover {
border-width: 0 1px;
border-color: #000000;
margin: 0;
}
-.tobago-toolBar-item-disabled {
+.tobago-toolBar-item-markup-disabled {
color: #808080;
}
-.tobago-toolBar-button-selected {
+.tobago-toolBar-button-markup-selected {
background-color: #EEEEEE;
}
-.tobago-toolBar-button-hover {
+.tobago-toolBar-button-markup-hover {
background-color: #DDDDDD;
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml?rev=966694&r1=966693&r2=966694&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml Thu Jul 22 14:43:49 2010
@@ -24,6 +24,13 @@
<resource-path>org/apache/myfaces/tobago/renderkit</resource-path>
<renderers>
<renderer>
+ <name>BoxToolBar</name>
+ <supported-markup>
+ <markup>disabled</markup>
+ <markup>selected</markup>
+ </supported-markup>
+ </renderer>
+ <renderer>
<name>Button</name>
<supported-markup>
<markup>disabled</markup>
@@ -214,6 +221,13 @@
</supported-markup>
</renderer>
<renderer>
+ <name>TabGroupToolBar</name>
+ <supported-markup>
+ <markup>disabled</markup>
+ <markup>selected</markup>
+ </supported-markup>
+ </renderer>
+ <renderer>
<name>TextArea</name>
<supported-markup>
<markup>disabled</markup>
@@ -232,6 +246,13 @@
</supported-markup>
</renderer>
<renderer>
+ <name>ToolBar</name>
+ <supported-markup>
+ <markup>disabled</markup>
+ <markup>selected</markup>
+ </supported-markup>
+ </renderer>
+ <renderer>
<name>TreeNode</name>
<supported-markup>
<markup>strong</markup>
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=966694&r1=966693&r2=966694&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 Thu Jul 22 14:43:49 2010
@@ -2393,38 +2393,44 @@ Tobago.Updater = {
// todo: what is with initialisation of elements which are loaded with AJAX?
$(document).ready(function() {
- jQuery(".tobago-toolBar-item")
- .not(".tobago-toolBar-item-disabled")
- .mouseenter(function() {
- jQuery(this).addClass("tobago-toolBar-item-hover");
- })
- .mouseleave(function() {
- jQuery(this).removeClass("tobago-toolBar-item-hover");
- })
- .children(".tobago-toolBar-button, .tobago-toolBar-menu")
- .mouseenter(function() {
- jQuery(this)
- .addClass("tobago-toolBar-button-hover").children("img")
- .each(function() {
- // set the src to the hover src url.
- var hover = jQuery(this).attr("srchover");
- if (hover) {
- jQuery(this).attr("src", hover);
- }
- });
- })
- .mouseleave(function() {
- jQuery(this)
- .removeClass("tobago-toolBar-button-hover")
- .children("img")
- .each(function() {
- // restore the original/normal src url.
- var normal = jQuery(this).attr("srcdefault");
- if (normal) {
- jQuery(this).attr("src", normal);
- }
+
+ // doing the same for 3 renderer names
+ var rendererNames = new Array("toolBar", "boxToolBar", "tabGroupToolBar");
+ for (var i = 0; i < rendererNames.length; i++) {
+ var renderer = rendererNames[i];
+ jQuery(".tobago-" + renderer + "-item")
+ .not(".tobago-" + renderer + "-item-markup-disabled")
+ .mouseenter(function() {
+ jQuery(this).addClass("tobago-" + renderer + "-item-markup-hover");
+ })
+ .mouseleave(function() {
+ jQuery(this).removeClass("tobago-" + renderer + "-item-markup-hover");
+ })
+ .children(".tobago-" + renderer + "-button, .tobago-" + renderer + "-menu")
+ .mouseenter(function() {
+ jQuery(this)
+ .addClass("tobago-" + renderer + "-button-markup-hover").children("img")
+ .each(function() {
+ // set the src to the hover src url.
+ var hover = jQuery(this).attr("srchover");
+ if (hover) {
+ jQuery(this).attr("src", hover);
+ }
+ });
+ })
+ .mouseleave(function() {
+ jQuery(this)
+ .removeClass("tobago-" + renderer + "-button-markup-hover")
+ .children("img")
+ .each(function() {
+ // restore the original/normal src url.
+ var normal = jQuery(this).attr("srcdefault");
+ if (normal) {
+ jQuery(this).attr("src", normal);
+ }
+ });
});
- });
+ }
});
function tobago_toolBarCheckToggle(id) {