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 2016/11/17 10:47:37 UTC
svn commit: r1770151 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/
tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/
Author: lofwyr
Date: Thu Nov 17 10:47:37 2016
New Revision: 1770151
URL: http://svn.apache.org/viewvc?rev=1770151&view=rev
Log:
TOBAGO-1619 A disabled link shouldn't have text-decoration
* text-decoration for disabled links removed
* background of disabled links in dropdownmenu deactivated
[developed by hnoeth]
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java?rev=1770151&r1=1770150&r2=1770151&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java Thu Nov 17 10:47:37 2016
@@ -24,6 +24,9 @@ import org.apache.myfaces.tobago.interna
import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
import org.apache.myfaces.tobago.internal.component.AbstractUIFormBase;
import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
+import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.internal.util.JsonUtils;
+import org.apache.myfaces.tobago.internal.util.RenderUtils;
import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
import org.apache.myfaces.tobago.renderkit.css.Classes;
@@ -34,9 +37,6 @@ import org.apache.myfaces.tobago.renderk
import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
-import org.apache.myfaces.tobago.internal.util.JsonUtils;
-import org.apache.myfaces.tobago.internal.util.HtmlRendererUtils;
-import org.apache.myfaces.tobago.internal.util.RenderUtils;
import org.apache.myfaces.tobago.util.ComponentUtils;
import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
import org.slf4j.Logger;
@@ -193,10 +193,18 @@ public abstract class CommandRendererBas
for (final UIComponent child : component.getChildren()) {
if (child.isRendered()) {
writer.startElement(HtmlElements.LI);
- final CssItem submenu = child instanceof AbstractUICommand && ((AbstractUICommand) child).isParentOfCommands()
- ? TobagoClass.DROPDOWN_SUBMENU : null;
- // fixme: this name comes not from bootstrap, using prefix? tobago-command-dropdown-submenu
- writer.writeClassAttribute(BootstrapClass.DROPDOWN_ITEM, submenu);
+ final CssItem submenu;
+ final CssItem disabled;
+ if (child instanceof AbstractUICommand) {
+ final AbstractUICommand c = (AbstractUICommand) child;
+ // fixme: this name comes not from bootstrap, using prefix? tobago-command-dropdown-submenu
+ submenu = c.isParentOfCommands() ? TobagoClass.DROPDOWN_SUBMENU : null;
+ disabled = c.isDisabled() ? BootstrapClass.DISABLED : null;
+ } else {
+ submenu = null;
+ disabled = null;
+ }
+ writer.writeClassAttribute(BootstrapClass.DROPDOWN_ITEM, submenu, disabled);
child.encodeAll(facesContext);
writer.endElement(HtmlElements.LI);
}
Modified: myfaces/tobago/trunk/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/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1770151&r1=1770150&r2=1770151&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Thu Nov 17 10:47:37 2016
@@ -246,11 +246,6 @@ table.tobago-gridLayout > tbody > tr:fir
white-space: normal
}
-.tobago-link-markup-disabled {
- cursor: not-allowed;
- opacity: .65;
-}
-
button.tobago-link, button.tobago-command, button.tobago-treeCommand {
color: #0275d8;
border-width: 0;
@@ -268,6 +263,16 @@ button.tobago-treeCommand:focus, button.
outline: none;
}
+button.tobago-link-markup-disabled, button.tobago-command-markup-disabled {
+ cursor: not-allowed;
+ opacity: .65;
+}
+
+button.tobago-link-markup-disabled:hover, button.tobago-command-markup-disabled:hover {
+ color: #0275d8;
+ text-decoration: none;
+}
+
/* messages ----------------------------------------------------------- */
.tobago-messages label {