diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2015-05-13 14:56:20 +0300 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2015-05-13 15:10:49 +0300 |
commit | 0d1bbc946c5372994ef5587438023e42ddcfa54c (patch) | |
tree | ae881df4b392ac9baff91692f0f65d9d73b8ea9c /client/src | |
parent | 31aea7e2bcabb461a324341186a09a99e3139758 (diff) | |
download | vaadin-framework-0d1bbc946c5372994ef5587438023e42ddcfa54c.tar.gz vaadin-framework-0d1bbc946c5372994ef5587438023e42ddcfa54c.zip |
Fixes regression in Notifications and tests (#14872)
Change-Id: Ifa52508f5555c47b778cb7f80aa09f665b03b8d4
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConnection.java | 10 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VNotification.java | 17 |
2 files changed, 22 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index af86818fb3..3a8d69f25a 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -1285,12 +1285,18 @@ public class ApplicationConnection implements HasHandlers { StringBuilder html = new StringBuilder(); if (caption != null) { - html.append("<h1>"); + html.append("<h1 class='"); + html.append(VNotification.getDependentStyle(this, + VNotification.CAPTION)); + html.append("'>"); html.append(caption); html.append("</h1>"); } if (message != null) { - html.append("<p>"); + html.append("<p class='"); + html.append(VNotification.getDependentStyle(this, + VNotification.DESCRIPTION)); + html.append("'>"); html.append(message); html.append("</p>"); } diff --git a/client/src/com/vaadin/client/ui/VNotification.java b/client/src/com/vaadin/client/ui/VNotification.java index 2892d4e3ac..4f0c2eb625 100644 --- a/client/src/com/vaadin/client/ui/VNotification.java +++ b/client/src/com/vaadin/client/ui/VNotification.java @@ -63,8 +63,8 @@ public class VNotification extends VOverlay { private static final String STYLENAME_POSITION_CENTER = "v-position-center"; private static final String STYLENAME_POSITION_ASSISTIVE = "v-position-assistive"; - private static final String CAPTION = "caption"; - private static final String DESCRIPTION = "description"; + public static final String CAPTION = "caption"; + public static final String DESCRIPTION = "description"; /** * Position that is only accessible for assistive devices, invisible for @@ -532,7 +532,18 @@ public class VNotification extends VOverlay { html, position, style); } - private static String getDependentStyle(ApplicationConnection client, + /** + * Meant for internal usage only. + * + * @since 7.5.0 + * @param client + * application connection + * @param style + * the dependent style name + * @return the given dependent style name prefixed with current notification + * primary style + */ + public static String getDependentStyle(ApplicationConnection client, String style) { VNotification notification = createNotification(-1, client .getUIConnector().getWidget()); |