Browse Source

Move theme name mangling to where it is actually desired (#9891)

Change-Id: Ia78d38c36e7f5f9c86e645f4afd2014cdc88cb32
tags/7.0.0.beta6
Leif Åstrand 11 years ago
parent
commit
8a775666ae

+ 1
- 3
client/src/com/vaadin/client/ApplicationConfiguration.java View 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() {

+ 5
- 2
client/src/com/vaadin/client/ui/ui/UIConnector.java View 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());


Loading…
Cancel
Save