diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2014-12-18 16:31:34 +0200 |
---|---|---|
committer | Henrik Paul <henrik@vaadin.com> | 2014-12-18 14:47:27 +0000 |
commit | 7eb1b4f17306e6629b34d39f6be0aca6b517d656 (patch) | |
tree | 8cfbd91a46fd28b3e13db280f075f7e1e9c78f4a | |
parent | e4a0abf6e16812cb608febd777507cffe1e3a5a0 (diff) | |
download | vaadin-framework-7eb1b4f17306e6629b34d39f6be0aca6b517d656.tar.gz vaadin-framework-7eb1b4f17306e6629b34d39f6be0aca6b517d656.zip |
Change "editor row" to "editor" in style names (#13334)
Change-Id: I690c8c17c673ec2d77870cf305dee1ac1b9bc3be
6 files changed, 19 insertions, 20 deletions
diff --git a/WebContent/VAADIN/themes/base/grid/grid.scss b/WebContent/VAADIN/themes/base/grid/grid.scss index 79909a0b93..e1941826ca 100644 --- a/WebContent/VAADIN/themes/base/grid/grid.scss +++ b/WebContent/VAADIN/themes/base/grid/grid.scss @@ -21,7 +21,7 @@ $v-grid-footer-background-color: $v-grid-header-background-color !default; $v-grid-cell-padding-horizontal: 5px !default; -$v-grid-editor-row-background-color: $v-grid-row-background-color !default; +$v-grid-editor-background-color: $v-grid-row-background-color !default; @import "../escalator/escalator"; @@ -198,14 +198,14 @@ $v-grid-editor-row-background-color: $v-grid-row-background-color !default; display: block; } - // Editor row + // Editor - .#{$primaryStyleName}-editor-row { + .#{$primaryStyleName}-editor { // TODO should be fixed in offset calculations margin-top: -1px; position: absolute; overflow-y: visible; - background: $v-grid-editor-row-background-color; + background: $v-grid-editor-background-color; @include box-shadow(0 0 10px 1px rgba(0,0,0,.3)); > div { @@ -226,7 +226,6 @@ $v-grid-editor-row-background-color: $v-grid-row-background-color !default; max-height: 100%; border: none; border-radius: 0; - } .v-textfield-focus, @@ -235,13 +234,13 @@ $v-grid-editor-row-background-color: $v-grid-row-background-color !default; z-index: 1; } } + } - > .v-editor-row-save, - > .v-editor-row-cancel { - position: absolute; - // TODO remove the inline size from the widgets - width: auto !important; - height: auto !important; - } + .#{$primaryStyleName}-editor-save, + .#{$primaryStyleName}-editor-cancel { + position: absolute; + // TODO remove the inline size from the widgets + width: auto !important; + height: auto !important; } } diff --git a/WebContent/VAADIN/themes/valo/components/_grid.scss b/WebContent/VAADIN/themes/valo/components/_grid.scss index 7e1882472a..2e76434709 100644 --- a/WebContent/VAADIN/themes/valo/components/_grid.scss +++ b/WebContent/VAADIN/themes/valo/components/_grid.scss @@ -66,8 +66,8 @@ $v-grid-cell-padding-horizontal: $v-table-cell-padding-horizontal !default; } } - .v-editor-row-save, - .v-editor-row-cancel { + .#{$primary-stylename}-editor-save, + .#{$primary-stylename}-editor-cancel { @include valo-button-static-style; @include valo-button-style($unit-size: $v-unit-size--small, $font-size: $v-font-size--small); } diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index bc8b0fbf3c..895d709395 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -1218,7 +1218,7 @@ public class Grid<T> extends ResizeComposite implements Button save = new Button(); save.setText("Save"); - save.setStyleName("v-editor-row-save"); + save.setStyleName(styleName + "-save"); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { @@ -1231,7 +1231,7 @@ public class Grid<T> extends ResizeComposite implements Button cancel = new Button(); cancel.setText("Cancel"); - cancel.setStyleName("v-editor-row-cancel"); + cancel.setStyleName(styleName + "-cancel"); cancel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { @@ -1258,7 +1258,7 @@ public class Grid<T> extends ResizeComposite implements if (styleName != null) { editorOverlay.removeClassName(styleName); } - styleName = primaryName + "-editor-row"; + styleName = primaryName + "-editor"; editorOverlay.addClassName(styleName); } diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java index 279f75492e..26d6fefa45 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java @@ -92,7 +92,7 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest { protected WebElement getEditor() { List<WebElement> elems = getGridElement().findElements( - By.className("v-grid-editor-row")); + By.className("v-grid-editor")); assertLessThanOrEqual("number of editors", elems.size(), 1); diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java index 5db7f3a0b9..a67b901198 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java @@ -131,7 +131,7 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest { textField.sendKeys("Changed"); WebElement saveButton = getEditor().findElement( - By.className("v-editor-row-save")); + By.className("v-grid-editor-save")); saveButton.click(); diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java index 2afa9ec04e..faa7744ff8 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java @@ -126,7 +126,7 @@ public class GridEditorTest extends GridBasicFeaturesTest { textField.sendKeys(" changed"); WebElement saveButton = getEditor().findElement( - By.className("v-editor-row-save")); + By.className("v-grid-editor-save")); saveButton.click(); |