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 2011/02/15 10:15:35 UTC
svn commit: r1070817 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/context/
tobago-core/src/test/java/org/apache/myfaces/tobago/context/
tobago-example/tobago-example-test/src/main/webapp/image/
tobago-example/tobago-e...
Author: lofwyr
Date: Tue Feb 15 09:15:33 2011
New Revision: 1070817
URL: http://svn.apache.org/viewvc?rev=1070817&view=rev
Log:
TOBAGO-973: Disabled Button/Link does not use the "Disabled" Icon
Added:
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/image/fooDisabled.gif (with props)
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/image/disabled.xhtml
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java
myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java?rev=1070817&r1=1070816&r2=1070817&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceUtils.java Tue Feb 15 09:15:33 2011
@@ -57,7 +57,6 @@ public class ResourceUtils {
String extension = filename.substring(dotIndex);
return new StringBuilder()
.append(name)
- .append(SEPARATOR)
.append(postfix)
.append(extension)
.toString();
Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java?rev=1070817&r1=1070816&r2=1070817&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/context/ResourceUtilsUnitTest.java Tue Feb 15 09:15:33 2011
@@ -33,4 +33,10 @@ public class ResourceUtilsUnitTest {
Assert.assertEquals("folder/treeNode-icon.gif",
ResourceUtils.createString("folder", "treeNode", "icon", "gif"));
}
+
+ @Test
+ public void testAddPostfixToFilename() {
+ Assert.assertEquals("folder/treeNode-iconDisabled.gif",
+ ResourceUtils.addPostfixToFilename("folder/treeNode-icon.gif", "Disabled"));
+ }
}
Added: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/image/fooDisabled.gif
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/image/fooDisabled.gif?rev=1070817&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/image/fooDisabled.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/image/disabled.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/image/disabled.xhtml?rev=1070817&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/image/disabled.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/image/disabled.xhtml Tue Feb 15 09:15:33 2011
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<f:view
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <tc:page id="page" width="600px" height="600px">
+
+ <f:facet name="layout">
+ <tc:gridLayout columns="*;*" rows="*;auto;auto;auto;*"/>
+ </f:facet>
+
+ <tc:label id="label" value="normal"/>
+ <tc:label id="label-d" value="disabled"/>
+
+ <tc:image id="image" value="image/foo.gif">
+ <tc:gridLayoutConstraint width="16px" height="16px"/>
+ </tc:image>
+ <tc:image id="image-d" value="image/foo.gif" disabled="true">
+ <tc:gridLayoutConstraint width="16px" height="16px"/>
+ </tc:image>
+
+ <tc:button id="button" image="image/foo.gif" label="button"/>
+ <tc:button id="button-d" image="image/foo.gif" label="button" disabled="true"/>
+
+ <tc:link id="link" image="image/foo.gif" label="link"/>
+ <tc:link id="link-d" image="image/foo.gif" label="link" disabled="true"/>
+
+ <tc:cell/>
+ <tc:cell/>
+
+ </tc:page>
+</f:view>