incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r441688 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
Date Fri, 08 Sep 2006 23:29:16 GMT
Author: jwaldman
Date: Fri Sep  8 16:29:15 2006
New Revision: 441688

URL: http://svn.apache.org/viewvc?view=rev&rev=441688
Log:
allow valid css-2 pseudo-classes, like :hover, to be appended to an icon skinning key. Before
this change, if :hover was appended to an icon skinning key, the parser would not consider
it an icon anymore, but a style. This sets the stage for renderers to have different icons
on mouseover; they would have two keys: af|foo::some-icon and af|foo::some-icon:hover. Then
on mouseover, they would use the af|foo::some-icon:hover icon.

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java?view=diff&rev=441688&r1=441687&r2=441688
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
Fri Sep  8 16:29:15 2006
@@ -223,8 +223,12 @@
         // not at the end which is how icons are determined.
         // our icon names look like .AFWarningIcon:alias
         // AFErrorIconStyle is a style.
+        // This supports pseudo-classes on icon definitions (e.g.,
+        // foo-icon:hover- or FooIcon:alias:hover)
+        // -icon: is a condition because it could be -icon:hover.
         if (selectorName.endsWith("-icon")  ||
-            selectorName.endsWith("Icon:alias"))
+            (selectorName.indexOf("-icon:") > -1) ||
+            selectorName.indexOf("Icon:alias") > -1)
         {
           // knock off the '.' if it is the first character.
           if (selectorName.charAt(0) == '.')



Mime
View raw message