diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-09-20 14:22:21 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2014-09-22 05:38:10 +0000 |
commit | 222876bc4057366c63060984c577bbbfb1cc3145 (patch) | |
tree | e1637bd110c8fed28e5d764143477e80cca1074c /server | |
parent | 526b23cd86ccc7603e280da45d48f3f4bfcc4ecd (diff) | |
download | vaadin-framework-222876bc4057366c63060984c577bbbfb1cc3145.tar.gz vaadin-framework-222876bc4057366c63060984c577bbbfb1cc3145.zip |
Add autogenerated style name for UI based on its class name (#14670)
Change-Id: Ic2ff4c29f997c33ea952a94c17aa9e70a0339337
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/BootstrapHandler.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index 0605d6a2b8..f0666f63fc 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -350,7 +350,6 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { /*- Add classnames; * .v-app * .v-app-loading - * .v-app-<simpleName for app class> *- Additionally added from javascript: * <themeName, remove non-alphanum> */ @@ -362,6 +361,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { mainDiv.attr("id", context.getAppId()); mainDiv.addClass("v-app"); mainDiv.addClass(context.getThemeName()); + mainDiv.addClass(context.getUIClass().getSimpleName() + .toLowerCase(Locale.ENGLISH)); if (style != null && style.length() != 0) { mainDiv.attr("style", style); } @@ -401,7 +402,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { builder.append("//<![CDATA[\n"); builder.append("if (!window.vaadin) alert(" + JsonUtil.quote("Failed to load the bootstrap javascript: " - + bootstrapLocation) + ");\n"); + + bootstrapLocation) + ");\n"); appendMainScriptTagContents(context, builder); @@ -501,7 +502,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { if (systemMessages.getAuthenticationErrorURL() == null) { authErrMsg.put("url", Json.createNull()); } else { - authErrMsg.put("url", systemMessages.getAuthenticationErrorURL()); + authErrMsg.put("url", + systemMessages.getAuthenticationErrorURL()); } appConfig.put("authErrMsg", authErrMsg); |