summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-09-16 15:14:09 +0300
committerPatrik Lindström <patrik@vaadin.com>2015-09-16 14:05:13 +0000
commita2c008be78e12f6e2ee031d5363e696c48181e63 (patch)
tree1f64e6cb292c3298762daa82e38e5c9bdb97e7f4
parent32863384d6ff09e2a38fe35d56e6726ab91b7336 (diff)
downloadvaadin-framework-a2c008be78e12f6e2ee031d5363e696c48181e63.tar.gz
vaadin-framework-a2c008be78e12f6e2ee031d5363e696c48181e63.zip
Fix Grid unbuffered validation error area theme (#18812)
Change-Id: Ifa37b341b1d49bb7964978a1f2ed0a65efbdcb2a
-rw-r--r--WebContent/VAADIN/themes/base/grid/grid.scss7
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java13
2 files changed, 20 insertions, 0 deletions
diff --git a/WebContent/VAADIN/themes/base/grid/grid.scss b/WebContent/VAADIN/themes/base/grid/grid.scss
index a5fb27f7d7..341f486d26 100644
--- a/WebContent/VAADIN/themes/base/grid/grid.scss
+++ b/WebContent/VAADIN/themes/base/grid/grid.scss
@@ -349,6 +349,13 @@ $v-grid-details-border-bottom-stripe: 1px solid darken($v-grid-row-background-co
-moz-box-sizing: border-box;
margin-top: nth($v-grid-border, 1) * -1;
@include box-shadow(0 0 9px rgba(0,0,0,.2));
+
+ // Unbuffered footer needs to be 100% width to display correctly
+ &.unbuffered {
+ .#{$primaryStyleName}-editor-footer {
+ width: 100%;
+ }
+ }
}
.#{$primaryStyleName}-editor-cells {
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index b77299dc17..54d7f86e41 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -1768,6 +1768,8 @@ public class Grid<T> extends ResizeComposite implements
editorOverlay.appendChild(cellWrapper);
editorOverlay.appendChild(messageAndButtonsWrapper);
+ updateBufferedStyleName();
+
int frozenColumns = grid.getVisibleFrozenColumnCount();
double frozenColumnsWidth = 0;
double cellHeight = 0;
@@ -1948,6 +1950,7 @@ public class Grid<T> extends ResizeComposite implements
int messageAndButtonsHeight = messageAndButtonsWrapper
.getOffsetHeight();
double bottomOfButtons = trPageBottom + messageAndButtonsHeight;
+
return bottomOfButtons < tfootPageTop;
}
@@ -1988,6 +1991,16 @@ public class Grid<T> extends ResizeComposite implements
}
}
+ private void updateBufferedStyleName() {
+ if (isBuffered()) {
+ editorOverlay.removeClassName("unbuffered");
+ editorOverlay.addClassName("buffered");
+ } else {
+ editorOverlay.removeClassName("buffered");
+ editorOverlay.addClassName("unbuffered");
+ }
+ }
+
protected void setStylePrimaryName(String primaryName) {
if (styleName != null) {
editorOverlay.removeClassName(styleName);