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

} }


public String getThemeName() { 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() { public String getThemeUri() {

+ 5
- 2
client/src/com/vaadin/client/ui/ui/UIConnector.java View File

// the user // the user
root.getElement().setInnerHTML(""); 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()); root.add(getWidget());



Loading…
Cancel
Save