summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-10-09 11:51:29 +0300
committerLeif Åstrand <leif@vaadin.com>2012-10-09 11:51:29 +0300
commit8a775666ae0459172de4720900285d9067d8a69c (patch)
treec56594f2777383ce0a6216e98fd4e22e9744521c /client
parent83ab152906251ded4e3c46e9f3e0e5bd790124f4 (diff)
downloadvaadin-framework-8a775666ae0459172de4720900285d9067d8a69c.tar.gz
vaadin-framework-8a775666ae0459172de4720900285d9067d8a69c.zip
Move theme name mangling to where it is actually desired (#9891)
Change-Id: Ia78d38c36e7f5f9c86e645f4afd2014cdc88cb32
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConfiguration.java4
-rw-r--r--client/src/com/vaadin/client/ui/ui/UIConnector.java7
2 files changed, 6 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java
index 9d668121a7..1432e1d5cc 100644
--- a/client/src/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/com/vaadin/client/ApplicationConfiguration.java
@@ -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() {
diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java
index 2a72876924..a6c3b4cf2b 100644
--- a/client/src/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java
@@ -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());