You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by so...@apache.org on 2012/07/19 20:04:50 UTC
svn commit: r1363446 - in /myfaces/trinidad/trunk/trinidad-impl/src/main:
java/org/apache/myfaces/trinidadinternal/skin/ resources/META-INF/adf/styles/
xrts/org/apache/myfaces/trinidadinternal/resource/
Author: sobryan
Date: Thu Jul 19 18:04:49 2012
New Revision: 1363446
URL: http://svn.apache.org/viewvc?rev=1363446&view=rev
Log:
TRINIDAD-2285 - avoid exceptions in design time for agent rules
* Thanks for the patch Anand
Modified:
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.css
myfaces/trinidad/trunk/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java?rev=1363446&r1=1363445&r2=1363446&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java Thu Jul 19 18:04:49 2012
@@ -764,6 +764,10 @@ class SkinStyleSheetParserUtils
int aliasIndex = selectorName.indexOf(":alias");
if (aliasIndex > -1)
{
+ if (!selectorName.startsWith("."))
+ {
+ _LOG.warning("ALIAS_DEFINITION_NOT_STARTING_WITH_DOT", new Object[] { selectorName });
+ }
// :alias means do not output style; it is a namedStyle, so we set
// the name and not the selector.
// first, strip off the '.' at the beginning and the :alias bit.
@@ -901,6 +905,9 @@ class SkinStyleSheetParserUtils
int startIndex = 0;
if (includeStyle.charAt(0) == '.')
startIndex = 1;
+ else
+ _LOG.warning("ALIAS_REFERENCE_NOT_STARTING_WITH_DOT", new Object[] { includeStyle });
+
includeStyleNodes.add(new IncludeStyleNode(
includeStyle.substring(startIndex, endIndex),
null));
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.css
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.css?rev=1363446&r1=1363445&r2=1363446&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.css (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/META-INF/adf/styles/base-desktop.css Thu Jul 19 18:04:49 2012
@@ -2601,7 +2601,7 @@
}
af|train::stop:visited {
- -tr-rule-ref: selector("DarkExtraAccentForeground:alias");
+ -tr-rule-ref: selector(".DarkExtraAccentForeground:alias");
}
af|train::stop:disabled {
@@ -2666,7 +2666,7 @@
af|train::stop:visited af|train::link {
-tr-rule-ref: selector(".AFDarkForeground:alias");
- -tr-rule-ref: selector("DarkExtraAccentForeground:alias");
+ -tr-rule-ref: selector(".DarkExtraAccentForeground:alias");
}
af|train::join {
@@ -2737,28 +2737,16 @@
background-color: #cccccc;
}
- /** VeryDarkExtraAccentForeground is the darkest foreground color in the
- extra accent (gray) color ramp **/
- .VeryDarkExtraAccentForeground:alias {
- color: -tr-property-ref("VeryDarkExtraAccentBackground:alias","background-color");
- }
-
/** DarkExtraAccentForeground is the primary foreground color in the
extra accent (gray) color ramp **/
.DarkExtraAccentForeground:alias {
- color: -tr-property-ref("DarkExtraAccentBackground:alias","background-color");
+ color: -tr-property-ref(".DarkExtraAccentBackground:alias","background-color");
}
/** MediumExtraAccentForeground is the middle foreground color in the
extra accent (gray) color ramp **/
.MediumExtraAccentForeground:alias {
- color: -tr-property-ref("MediumExtraAccentBackground:alias","background-color");
- }
-
- /** LightExtraAccentForeground is the lightest foreground color in the
- extra accent (gray) color ramp **/
- .LightExtraAccentForeground:alias {
- color: -tr-property-ref("LightExtraAccentBackground:alias","background-color");
+ color: -tr-property-ref(".MediumExtraAccentBackground:alias","background-color");
}
.TextForegroundDarkBackground:alias {
@@ -2784,11 +2772,11 @@
}
.OraBGGrayVeryDark {
- -tr-rule-ref: selector("VeryDarkExtraAccentBackground:alias");
+ -tr-rule-ref: selector(".VeryDarkExtraAccentBackground:alias");
}
.OraBGGrayDark {
- -tr-rule-ref: selector("DarkExtraAccentBackground:alias");
+ -tr-rule-ref: selector(".DarkExtraAccentBackground:alias");
}
.OraBGGrayMedium {
@@ -2796,7 +2784,7 @@
}
.OraBGGrayLight {
- -tr-rule-ref: selector("LightExtraAccentBackground:alias");
+ -tr-rule-ref: selector(".LightExtraAccentBackground:alias");
}
.OraBGAccentVeryDark {
@@ -2909,12 +2897,12 @@
.AFFieldTextLTR {
-tr-rule-ref: selector(".AFFieldText");
- -tr-rule-ref: selector("LTROverride:alias");
+ -tr-rule-ref: selector(".LTROverride:alias");
}
.AFFieldTextLTRDisabled {
-tr-rule-ref: selector(".AFFieldTextDisabled");
- -tr-rule-ref: selector("LTROverride:alias");
+ -tr-rule-ref: selector(".LTROverride:alias");
}
.AFPhoneFieldText {
@@ -3310,7 +3298,7 @@
}
.OraShuttleLinkText {
- -tr-rule-ref: selector("SmallLinkFont:alias");
+ -tr-rule-ref: selector(".SmallLinkFont:alias");
-tr-rule-ref: selector(".AFLinkForeground:alias");
}
@@ -3349,11 +3337,11 @@
}
.OraStyledList {
- -tr-rule-ref: selector("list:alias");
+ -tr-rule-ref: selector(".list:alias");
}
.OraStyledList .OraStyledList {
- -tr-rule-ref: selector("nestedList:alias");
+ -tr-rule-ref: selector(".nestedList:alias");
}
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts?rev=1363446&r1=1363445&r2=1363446&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts Thu Jul 19 18:04:49 2012
@@ -1198,4 +1198,8 @@ The skin {0} specified on the requestMap
<resource key="INVALID_AGENT_VERSION_OP">Invalid @agent version comparison operator: {0}</resource>
+<resource key="ALIAS_REFERENCE_NOT_STARTING_WITH_DOT">Alias references within -tr-rule-ref or tr-property-ref should start with a dot at {0}</resource>
+
+<resource key="ALIAS_DEFINITION_NOT_STARTING_WITH_DOT">Alias definition should start with a dot for {0}</resource>
+
</resources>