]> source.dussan.org Git - vaadin-framework.git/commitdiff
Move theme name mangling to where it is actually desired (#9891) 83/83/1
authorLeif Åstrand <leif@vaadin.com>
Tue, 9 Oct 2012 08:51:29 +0000 (11:51 +0300)
committerLeif Åstrand <leif@vaadin.com>
Tue, 9 Oct 2012 08:51:29 +0000 (11:51 +0300)
Change-Id: Ia78d38c36e7f5f9c86e645f4afd2014cdc88cb32

client/src/com/vaadin/client/ApplicationConfiguration.java
client/src/com/vaadin/client/ui/ui/UIConnector.java

index 9d668121a731745bf3cabc69897e6a274634db3b..1432e1d5ccb7a7921ca6cf4864c6f65e50fdc82f 100644 (file)
@@ -254,9 +254,7 @@ public class ApplicationConfiguration implements EntryPoint {
     }
 
     public String getThemeName() {
-        String themeName = getJsoConfiguration(id).getConfigString("theme");
-        themeName = themeName.replaceAll("[^a-zA-Z0-9]", "");
-        return themeName;
+        return getJsoConfiguration(id).getConfigString("theme");
     }
 
     public String getThemeUri() {
index 2a728769246fe028648786076829093e8579c59f..a6c3b4cf2b87d6f7e109524f1da5ad4bee5f7eb8 100644 (file)
@@ -300,8 +300,11 @@ public class UIConnector extends AbstractComponentContainerConnector implements
         // the user
         root.getElement().setInnerHTML("");
 
-        root.addStyleName("v-theme-"
-                + applicationConnection.getConfiguration().getThemeName());
+        String themeName = applicationConnection.getConfiguration()
+                .getThemeName();
+        // Remove chars that are not suitable for style names
+        themeName = themeName.replaceAll("[^a-zA-Z0-9]", "");
+        root.addStyleName("v-theme-" + themeName);
 
         root.add(getWidget());