summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-07-13 22:37:21 +0300
committerArtur Signell <artur@vaadin.com>2015-07-13 23:20:26 +0300
commitd11b90c8ed3aa63f920e17675275c014f670f759 (patch)
tree38fd04c52e03c645881c1c3b01d8453690493afb
parenta3ee899a2db8b8b993f7f7a4e21039f0fe0aee08 (diff)
downloadvaadin-framework-d11b90c8ed3aa63f920e17675275c014f670f759.tar.gz
vaadin-framework-d11b90c8ed3aa63f920e17675275c014f670f759.zip
Reconnect dialog basic css for all themes (#11733)
Change-Id: I070cca17377dc49095481012717bab8931fb375b
-rw-r--r--WebContent/VAADIN/themes/base/base.scss2
-rw-r--r--WebContent/VAADIN/themes/base/common/img/reconnect-spinner.gifbin0 -> 3223 bytes
-rw-r--r--WebContent/VAADIN/themes/base/common/reconnect-dialog.scss32
-rw-r--r--WebContent/VAADIN/themes/valo/shared/_reconnect-dialog.scss20
-rw-r--r--client/src/com/vaadin/client/communication/DefaultReconnectDialog.java5
-rw-r--r--client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml2
6 files changed, 57 insertions, 4 deletions
diff --git a/WebContent/VAADIN/themes/base/base.scss b/WebContent/VAADIN/themes/base/base.scss
index d40ac1a7bf..56b2e311c6 100644
--- a/WebContent/VAADIN/themes/base/base.scss
+++ b/WebContent/VAADIN/themes/base/base.scss
@@ -17,6 +17,7 @@ $v-line-height: $line-height !default;
@import "caption/caption.scss";
@import "colorpicker/colorpicker.scss";
@import "common/common.scss";
+@import "common/reconnect-dialog.scss";
@import "csslayout/csslayout.scss";
@import "customcomponent/customcomponent.scss";
@import "customlayout/customlayout.scss";
@@ -89,6 +90,7 @@ $v-line-height: $line-height !default;
// here for now to preserve old semantics
@include base-common;
+ @include base-reconnect-dialog;
@include base-layout;
@include base-csslayout;
diff --git a/WebContent/VAADIN/themes/base/common/img/reconnect-spinner.gif b/WebContent/VAADIN/themes/base/common/img/reconnect-spinner.gif
new file mode 100644
index 0000000000..bc1a496d11
--- /dev/null
+++ b/WebContent/VAADIN/themes/base/common/img/reconnect-spinner.gif
Binary files differ
diff --git a/WebContent/VAADIN/themes/base/common/reconnect-dialog.scss b/WebContent/VAADIN/themes/base/common/reconnect-dialog.scss
new file mode 100644
index 0000000000..cde587cfe9
--- /dev/null
+++ b/WebContent/VAADIN/themes/base/common/reconnect-dialog.scss
@@ -0,0 +1,32 @@
+@mixin base-reconnect-dialog {
+ .v-reconnect-dialog {
+ color: white;
+ top: 12px;
+ right: 12px;
+ max-width: 100%;
+ border-radius: 0;
+ @include box-shadow(0 0 20px 0 rgba(0,0,0,0.25));
+ padding: 10px;
+
+ background-color: #444;
+ text-align: center;
+
+ .text {
+ display: inline-block;
+ padding-left: 10px;
+ }
+
+ .spinner {
+ background-image: url(img/reconnect-spinner.gif);
+ width: 31px;
+ height: 31px;
+ display: inline-block;
+ visibility: hidden;
+ vertical-align: middle;
+ }
+
+ &.active .spinner {
+ visibility: visible;
+ }
+ }
+} \ No newline at end of file
diff --git a/WebContent/VAADIN/themes/valo/shared/_reconnect-dialog.scss b/WebContent/VAADIN/themes/valo/shared/_reconnect-dialog.scss
index 81077efcc4..583cc4d11c 100644
--- a/WebContent/VAADIN/themes/valo/shared/_reconnect-dialog.scss
+++ b/WebContent/VAADIN/themes/valo/shared/_reconnect-dialog.scss
@@ -1,14 +1,28 @@
@mixin valo-reconnect-dialog {
.v-reconnect-dialog {
color: white;
- @include valo-notification-bar-style("v-reconnect-dialog");
- @include valo-notification-system-style("v-reconnect-dialog");
+ top: $v-layout-spacing-vertical;
+ right: $v-layout-spacing-horizontal;
+ max-width: 100%;
+ border-radius: 0;
+ @include box-shadow(0 0 20px 0 rgba(0,0,0,0.25));
+ padding: round($v-unit-size/3) round($v-unit-size/2.5);
+
+ background-color: #444;
+ background-color: rgba(#444, .9);
+ line-height: round($v-font-size * 1.4);
+
text-align: center;
+ .text {
+ display: inline-block;
+ padding-left: 10px;
+ }
+
.spinner {
@include valo-spinner;
display: inline-block;
- margin-top: 10px;
visibility: hidden;
+ vertical-align: middle;
}
&.active .spinner {
diff --git a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java
index 60ecce8ae0..301967495b 100644
--- a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java
+++ b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java
@@ -82,4 +82,9 @@ public class DefaultReconnectDialog extends VOverlay implements ReconnectDialog
setOwner(connection.getUIConnector().getWidget());
show();
}
+
+ @Override
+ public void setPopupPosition(int left, int top) {
+ // Don't set inline styles for position, handle it in the theme
+ }
}
diff --git a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml
index 885588f8a5..90e92eaeb6 100644
--- a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml
+++ b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml
@@ -3,9 +3,9 @@
<g:HTMLPanel>
+ <div class="spinner" />
<g:Label ui:field="label" styleName="text"
text="Server connection lost, trying to reconnect..." />
- <div class="spinner" />
</g:HTMLPanel>
</ui:UiBinder>