summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2009-10-05 09:27:19 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2009-10-05 09:27:19 +0000
commite6a00c35b9bf2575292da98b6ec5e38ad27f3b21 (patch)
treefd4dbcadd8384cde795fc6871565e3a6d91e9a3e
parent9e0a7ff98936a0b2abed0fa17c33157d9d1312b2 (diff)
downloadvaadin-framework-e6a00c35b9bf2575292da98b6ec5e38ad27f3b21.tar.gz
vaadin-framework-e6a00c35b9bf2575292da98b6ec5e38ad27f3b21.zip
Fixes #3471: Notification "styles" (i.e. types) should work similarly to other component stylenames
svn changeset:9073/svn branch:6.2
-rw-r--r--WebContent/VAADIN/themes/base/notification/notification.css22
-rw-r--r--WebContent/VAADIN/themes/base/styles.css22
-rw-r--r--WebContent/VAADIN/themes/reindeer/notification/notification.css12
-rw-r--r--WebContent/VAADIN/themes/reindeer/styles.css34
-rw-r--r--WebContent/VAADIN/themes/runo/notification/notification.css20
-rw-r--r--WebContent/VAADIN/themes/runo/styles.css42
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VNotification.java2
7 files changed, 78 insertions, 76 deletions
diff --git a/WebContent/VAADIN/themes/base/notification/notification.css b/WebContent/VAADIN/themes/base/notification/notification.css
index 514d274488..6ab069b08c 100644
--- a/WebContent/VAADIN/themes/base/notification/notification.css
+++ b/WebContent/VAADIN/themes/base/notification/notification.css
@@ -7,35 +7,35 @@
}
.v-Notification h1,
.v-Notification p,
-.v-Notification.error h1,
-.v-Notification.error p,
-.v-Notification.warning h1,
-.v-Notification.warning p {
+.v-Notification-error h1,
+.v-Notification-error p,
+.v-Notification-warning h1,
+.v-Notification-warning p {
display: inline;
white-space: nowrap;
margin: 0 0.5em 0 0;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: orange;
}
-.v-Notification.error {
+.v-Notification-error {
background: red;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
display: block;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
display: block;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: red;
opacity: .7;
filter: alpha(opacity=70);
}
-.v-Notification.system h1 {
+.v-Notification-system h1 {
display: block;
margin: 0;
}
-.v-Notification.system p {
+.v-Notification-system p {
white-space: nowrap;
} \ No newline at end of file
diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css
index 1b28fef5e0..29be722503 100644
--- a/WebContent/VAADIN/themes/base/styles.css
+++ b/WebContent/VAADIN/themes/base/styles.css
@@ -664,36 +664,36 @@ div.v-app-loading {
}
.v-Notification h1,
.v-Notification p,
-.v-Notification.error h1,
-.v-Notification.error p,
-.v-Notification.warning h1,
-.v-Notification.warning p {
+.v-Notification-error h1,
+.v-Notification-error p,
+.v-Notification-warning h1,
+.v-Notification-warning p {
display: inline;
white-space: nowrap;
margin: 0 0.5em 0 0;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: orange;
}
-.v-Notification.error {
+.v-Notification-error {
background: red;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
display: block;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
display: block;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: red;
opacity: .7;
filter: alpha(opacity=70);
}
-.v-Notification.system h1 {
+.v-Notification-system h1 {
display: block;
margin: 0;
}
-.v-Notification.system p {
+.v-Notification-system p {
white-space: nowrap;
}
diff --git a/WebContent/VAADIN/themes/reindeer/notification/notification.css b/WebContent/VAADIN/themes/reindeer/notification/notification.css
index f266f0576d..62a45d9d86 100644
--- a/WebContent/VAADIN/themes/reindeer/notification/notification.css
+++ b/WebContent/VAADIN/themes/reindeer/notification/notification.css
@@ -10,29 +10,29 @@
.v-Notification p {
line-height: 1.3;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: #fdf3b5;
color: #ca9a61;
border: 3px solid #fee3af;
}
-.v-Notification.error {
+.v-Notification-error {
background: #b40000 url(img/error-close.png) no-repeat right top;
border: 3px solid #ca3030;
}
-.v-Notification.tray {
+.v-Notification-tray {
margin: 0 5px 5px 0;
background: #3b3c3e;
border: 2px solid #585b5c;
padding: 0.8em 0.9em;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
font-size: 14px;
line-height: 18px;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
font-size: 12px;
font-weight: normal;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: #b40000;
} \ No newline at end of file
diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css
index f1d5c4d60c..da13566aec 100644
--- a/WebContent/VAADIN/themes/reindeer/styles.css
+++ b/WebContent/VAADIN/themes/reindeer/styles.css
@@ -664,36 +664,36 @@ div.v-app-loading {
}
.v-Notification h1,
.v-Notification p,
-.v-Notification.error h1,
-.v-Notification.error p,
-.v-Notification.warning h1,
-.v-Notification.warning p {
+.v-Notification-error h1,
+.v-Notification-error p,
+.v-Notification-warning h1,
+.v-Notification-warning p {
display: inline;
white-space: nowrap;
margin: 0 0.5em 0 0;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: orange;
}
-.v-Notification.error {
+.v-Notification-error {
background: red;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
display: block;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
display: block;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: red;
opacity: .7;
filter: alpha(opacity=70);
}
-.v-Notification.system h1 {
+.v-Notification-system h1 {
display: block;
margin: 0;
}
-.v-Notification.system p {
+.v-Notification-system p {
white-space: nowrap;
}
@@ -3021,30 +3021,30 @@ td.v-datefield-calendarpanel-nextyear {
.v-Notification p {
line-height: 1.3;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: #fdf3b5;
color: #ca9a61;
border: 3px solid #fee3af;
}
-.v-Notification.error {
+.v-Notification-error {
background: #b40000 url(notification/img/error-close.png) no-repeat right top;
border: 3px solid #ca3030;
}
-.v-Notification.tray {
+.v-Notification-tray {
margin: 0 5px 5px 0;
background: #3b3c3e;
border: 2px solid #585b5c;
padding: 0.8em 0.9em;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
font-size: 14px;
line-height: 18px;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
font-size: 12px;
font-weight: normal;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: #b40000;
}
diff --git a/WebContent/VAADIN/themes/runo/notification/notification.css b/WebContent/VAADIN/themes/runo/notification/notification.css
index da71112abb..e526877f2d 100644
--- a/WebContent/VAADIN/themes/runo/notification/notification.css
+++ b/WebContent/VAADIN/themes/runo/notification/notification.css
@@ -11,16 +11,16 @@
}
.v-Notification h1,
.v-Notification p,
-.v-Notification.error h1,
-.v-Notification.error p,
-.v-Notification.warning h1,
-.v-Notification.warning p {
+.v-Notification-error h1,
+.v-Notification-error p,
+.v-Notification-warning h1,
+.v-Notification-warning p {
display: inline;
font-weight: normal;
white-space: nowrap;
margin: 0 10px 0 0;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: #fff1e4;
color: #dd3400;
border: 2px solid #ffaa90;
@@ -29,7 +29,7 @@
border-radius: 5px;
opacity: 1;
}
-.v-Notification.error {
+.v-Notification-error {
background: #f23d00 url(img/close-error.png) no-repeat right 5px;
padding-right: 30px;
border: 3px solid #c30000;
@@ -37,12 +37,12 @@
-webkit-border-radius: 6px;
border-radius: 6px;
}
-.v-Notification.tray {
+.v-Notification-tray {
background: #575e60;
padding: 0.5em;
margin: 0 5px 5px 0;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
display: block;
font-weight: bold;
font-size: 0.9em;
@@ -54,13 +54,13 @@
-webkit-border-radius: 3px;
border-radius: 3px;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
display: block;
font-size: 0.9em;
line-height: 1.1;
margin: 8px 10px 5px 10px;
color: #e4e7ea;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: #ff0a0a;
} \ No newline at end of file
diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css
index 5aef0bc579..b4d79b92e5 100644
--- a/WebContent/VAADIN/themes/runo/styles.css
+++ b/WebContent/VAADIN/themes/runo/styles.css
@@ -664,36 +664,36 @@ div.v-app-loading {
}
.v-Notification h1,
.v-Notification p,
-.v-Notification.error h1,
-.v-Notification.error p,
-.v-Notification.warning h1,
-.v-Notification.warning p {
+.v-Notification-error h1,
+.v-Notification-error p,
+.v-Notification-warning h1,
+.v-Notification-warning p {
display: inline;
white-space: nowrap;
margin: 0 0.5em 0 0;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: orange;
}
-.v-Notification.error {
+.v-Notification-error {
background: red;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
display: block;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
display: block;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: red;
opacity: .7;
filter: alpha(opacity=70);
}
-.v-Notification.system h1 {
+.v-Notification-system h1 {
display: block;
margin: 0;
}
-.v-Notification.system p {
+.v-Notification-system p {
white-space: nowrap;
}
@@ -2152,16 +2152,16 @@ div.v-tree-node-leaf {
}
.v-Notification h1,
.v-Notification p,
-.v-Notification.error h1,
-.v-Notification.error p,
-.v-Notification.warning h1,
-.v-Notification.warning p {
+.v-Notification-error h1,
+.v-Notification-error p,
+.v-Notification-warning h1,
+.v-Notification-warning p {
display: inline;
font-weight: normal;
white-space: nowrap;
margin: 0 10px 0 0;
}
-.v-Notification.warning {
+.v-Notification-warning {
background: #fff1e4;
color: #dd3400;
border: 2px solid #ffaa90;
@@ -2170,7 +2170,7 @@ div.v-tree-node-leaf {
border-radius: 5px;
opacity: 1;
}
-.v-Notification.error {
+.v-Notification-error {
background: #f23d00 url(notification/img/close-error.png) no-repeat right 5px;
padding-right: 30px;
border: 3px solid #c30000;
@@ -2178,12 +2178,12 @@ div.v-tree-node-leaf {
-webkit-border-radius: 6px;
border-radius: 6px;
}
-.v-Notification.tray {
+.v-Notification-tray {
background: #575e60;
padding: 0.5em;
margin: 0 5px 5px 0;
}
-.v-Notification.tray h1 {
+.v-Notification-tray h1 {
display: block;
font-weight: bold;
font-size: 0.9em;
@@ -2195,14 +2195,14 @@ div.v-tree-node-leaf {
-webkit-border-radius: 3px;
border-radius: 3px;
}
-.v-Notification.tray p {
+.v-Notification-tray p {
display: block;
font-size: 0.9em;
line-height: 1.1;
margin: 8px 10px 5px 10px;
color: #e4e7ea;
}
-.v-Notification.system {
+.v-Notification-system {
background-color: #ff0a0a;
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNotification.java b/src/com/vaadin/terminal/gwt/client/ui/VNotification.java
index a7accae95d..e5c8be92e5 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VNotification.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VNotification.java
@@ -112,6 +112,7 @@ public class VNotification extends VOverlay {
if (style != null) {
temporaryStyle = style;
addStyleName(style);
+ addStyleDependentName(style);
}
super.show();
setPosition(position);
@@ -124,6 +125,7 @@ public class VNotification extends VOverlay {
cancelFade();
if (temporaryStyle != null) {
removeStyleName(temporaryStyle);
+ removeStyleDependentName(temporaryStyle);
temporaryStyle = null;
}
super.hide();