From 686c2ee15bc02bec6cff0d65990fd5c01a71e144 Mon Sep 17 00:00:00 2001 From: Sergey Budkin Date: Tue, 30 Sep 2014 15:05:38 +0300 Subject: A cursor is displayed when clicking on radio buttons on iOS 8.0 (#14681) Added css instructions for enclosing span to prevent this. Change-Id: Ib5e396b85ce37ab722e70fddf3553179248d59e8 --- WebContent/VAADIN/themes/base/common/common.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/base/common/common.scss b/WebContent/VAADIN/themes/base/common/common.scss index 77248c0c96..2f03561c0b 100644 --- a/WebContent/VAADIN/themes/base/common/common.scss +++ b/WebContent/VAADIN/themes/base/common/common.scss @@ -274,3 +274,8 @@ input::-ms-clear { width: 10px; overflow: hidden; } +/* fix for #14681 - mobile safari 8 sometimes displayed text cursor on that element */ +.v-radiobutton { + -webkit-user-select: none; +} + -- cgit v1.2.3 From eb4a9638c6179cee09303613238c3d8cf35fb332 Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Mon, 22 Sep 2014 13:28:29 +0300 Subject: Add outside-range styles for DateField. (#14711) Change-Id: I0f85fb72605c5500b0a835ddf715d60bc9c7a524 --- .../VAADIN/themes/valo/components/_datefield.scss | 33 ++++++++++++++++------ .../com/vaadin/tests/themes/valo/DateFields.java | 9 ++++++ .../vaadin/tests/themes/valo/ValoThemeUITest.java | 2 +- 3 files changed, 35 insertions(+), 9 deletions(-) (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/valo/components/_datefield.scss b/WebContent/VAADIN/themes/valo/components/_datefield.scss index 48977d4d20..71b50b5a77 100644 --- a/WebContent/VAADIN/themes/valo/components/_datefield.scss +++ b/WebContent/VAADIN/themes/valo/components/_datefield.scss @@ -337,7 +337,10 @@ @include valo-datefield-calendarpanel-day-focused-style; } - + .#{$primary-stylename}-day.#{$primary-stylename}-day-outside-range, + .#{$primary-stylename}-day.#{$primary-stylename}-day-outside-range:hover { + @include valo-datefield-calendarpanel-outside-range-style; + } .#{$primary-stylename}-weekdays { height: round($v-unit-size * 0.7); @@ -349,13 +352,12 @@ } } - .#{$primary-stylename}-header { white-space: nowrap; } - td[class$="year"], - td[class$="month"] { + td[class*="year"], + td[class*="month"] { button { @include appearance(none); border: none; @@ -381,10 +383,16 @@ } } - &:hover { - @include opacity(1); - &:before { - color: $v-focus-color; + &:hover:before { + color: $v-focus-color; + } + + &.outside-range { + cursor: default; + @include opacity(.3); + + &:hover:before { + color: mix($v-background-color, valo-font-color($v-background-color)); } } } @@ -500,6 +508,15 @@ background: transparent; } +/** + * Outputs the styles for an individual day element, which are outside available range. + * + * @group datefield + */ +@mixin valo-datefield-calendarpanel-outside-range-style { + color: mix(valo-font-color($v-background-color), $v-background-color); + cursor: not-allowed; +} /** * Outputs the styles for todays day element in a calendar panel. diff --git a/uitest/src/com/vaadin/tests/themes/valo/DateFields.java b/uitest/src/com/vaadin/tests/themes/valo/DateFields.java index 5dca5ab9af..5a752cd985 100644 --- a/uitest/src/com/vaadin/tests/themes/valo/DateFields.java +++ b/uitest/src/com/vaadin/tests/themes/valo/DateFields.java @@ -190,6 +190,7 @@ public class DateFields extends VerticalLayout implements View { date = new InlineDateField("Date picker"); setDate(date); + setDateRange(date); row.addComponent(date); date = new InlineDateField("Date picker with week numbers"); @@ -211,6 +212,14 @@ public class DateFields extends VerticalLayout implements View { row.addComponent(form); } + private void setDateRange(DateField date) { + date.setRangeStart(getDefaultDate()); + + Date endDate = getDefaultDate(); + endDate.setMonth(endDate.getMonth() + 1); + date.setRangeEnd(endDate); + } + private void setDate(DateField date) { date.setValue(getDefaultDate()); } diff --git a/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java b/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java index 20c74bff5e..d4ddf2dcf9 100644 --- a/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java +++ b/uitest/src/com/vaadin/tests/themes/valo/ValoThemeUITest.java @@ -64,7 +64,7 @@ public class ValoThemeUITest extends MultiBrowserTest { // Note that this can look broken in IE9 because of some browser // rendering issue... The problem seems to be in the customized // horizontal layout in the test app - compareScreen("datefields-with-disabled"); + compareScreen("datefields-with-range"); } @Test -- cgit v1.2.3 From ce011104e2a74b497838f78a3285b680a712d334 Mon Sep 17 00:00:00 2001 From: Sauli Tähkäpää Date: Wed, 1 Oct 2014 16:01:17 +0300 Subject: Add favicon.ico to Valo. (#14781) Change-Id: Ic0c5152d634dfc8f07890cfee18bbebd6e54bbc3 --- WebContent/VAADIN/themes/valo/favicon.ico | Bin 0 -> 31005 bytes .../src/com/vaadin/tests/themes/FaviconTest.java | 60 +++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 WebContent/VAADIN/themes/valo/favicon.ico create mode 100644 uitest/src/com/vaadin/tests/themes/FaviconTest.java (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/valo/favicon.ico b/WebContent/VAADIN/themes/valo/favicon.ico new file mode 100644 index 0000000000..ffb34a65c7 Binary files /dev/null and b/WebContent/VAADIN/themes/valo/favicon.ico differ diff --git a/uitest/src/com/vaadin/tests/themes/FaviconTest.java b/uitest/src/com/vaadin/tests/themes/FaviconTest.java new file mode 100644 index 0000000000..31134f656f --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/FaviconTest.java @@ -0,0 +1,60 @@ +package com.vaadin.tests.themes; + +import com.vaadin.tests.tb3.SingleBrowserTest; +import org.junit.Test; + +import java.net.HttpURLConnection; +import java.net.URL; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.fail; + +//Extending SingleBrowserTest just to include the test into our test suites. +public class FaviconTest extends SingleBrowserTest { + + @Test + public void chameleonHasFavicon() { + assertThatThemeHasFavicon("chameleon"); + } + + @Test + public void liferayHasFavicon() { + assertThatThemeHasFavicon("liferay"); + } + + @Test + public void runoHasFavicon() { + assertThatThemeHasFavicon("runo"); + } + + @Test + public void reindeerHasFavicon() { + assertThatThemeHasFavicon("reindeer"); + } + + @Test + public void valoHasFavicon() { + assertThatThemeHasFavicon("valo"); + } + + private void assertThatThemeHasFavicon(String theme) { + assertThat(getResponseCode(theme), is(200)); + } + + private int getResponseCode(String theme) { + try { + URL url = new URL(String.format("%s/VAADIN/themes/%s/favicon.ico", getBaseURL(), theme)); + HttpURLConnection connection = (HttpURLConnection)url.openConnection(); + connection.setRequestMethod("GET"); + connection.connect(); + + return connection.getResponseCode(); + + } catch (Exception e) { + fail(e.getMessage()); + } + + return 0; + } +} -- cgit v1.2.3 From 15bd3fd1dcd01f273da94e9af4461eea843f0706 Mon Sep 17 00:00:00 2001 From: Sergey Budkin Date: Fri, 3 Oct 2014 12:25:37 +0300 Subject: Incorrect rendering of Panel with undefined size in Firefox (#14631). Copied the fix from Valo. Change-Id: I677fc4cfb65a57211fd82d994d75743fd49a83a2 --- WebContent/VAADIN/themes/base/common/common.scss | 12 ++++ .../components/panel/UndefinedSizeScrollbars.java | 71 ++++++++++++++++++++++ .../panel/UndefinedSizeScrollbarsTest.java | 31 ++++++++++ 3 files changed, 114 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java create mode 100644 uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/base/common/common.scss b/WebContent/VAADIN/themes/base/common/common.scss index 2f03561c0b..ea8b5e5aa0 100644 --- a/WebContent/VAADIN/themes/base/common/common.scss +++ b/WebContent/VAADIN/themes/base/common/common.scss @@ -259,6 +259,18 @@ input::-ms-clear { -webkit-overflow-scrolling: none; } +/* "Unnecessary scrollbar" related fixes (#14631, copied from Valo) */ +.v-scrollable.v-panel-content > .v-widget { + /* This is needed for IE */ + vertical-align: middle; + + /* Needed for all browsers. Can't really show anything outside the + * scrolling area anyway, so we can safely hide any overflow */ + overflow: hidden; +} + + + &.v-overlay-container { width: 0; height: 0; diff --git a/uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java b/uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java new file mode 100644 index 0000000000..ef535baa0a --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java @@ -0,0 +1,71 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.panel; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.CheckBox; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.GridLayout; +import com.vaadin.ui.Panel; +import com.vaadin.ui.TextField; +import com.vaadin.ui.VerticalLayout; + +public class UndefinedSizeScrollbars extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + VerticalLayout layout = new VerticalLayout(); + layout.setSpacing(true); + layout.setSizeFull(); + setContent(layout); + + GridLayout grid = new GridLayout(); + grid.setSpacing(true); + + TextField text1 = new TextField(); + text1.setCaption("Text1"); + text1.setRequired(true); + + TextField text2 = new TextField(); + text2.setCaption("Text2"); + text2.setRequired(true); + + ComboBox combo = new ComboBox(); + combo.setCaption("Combo1"); + + CheckBox check = new CheckBox(); + check.setCaption("Check"); + + grid.setColumns(2); + grid.setRows(2); + + grid.addComponent(text1); + grid.addComponent(text2); + grid.addComponent(combo); + grid.addComponent(check); + + grid.setSizeUndefined(); + + Panel panel = new Panel(); + panel.setContent(grid); + + panel.setSizeUndefined(); + + layout.addComponent(panel); + } + +} diff --git a/uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java b/uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java new file mode 100644 index 0000000000..c055356624 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.panel; + +import java.io.IOException; + +import org.junit.Test; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class UndefinedSizeScrollbarsTest extends MultiBrowserTest { + + @Test + public void testNoScrollbars() throws IOException { + openTestURL(); + compareScreen("noscrollbars"); + } +} -- cgit v1.2.3 From 086228f26e933802f252401a99ac29e0a63e0819 Mon Sep 17 00:00:00 2001 From: Teemu Pöntelin Date: Sat, 4 Oct 2014 16:05:49 +0300 Subject: Fix empty table captions in Valo theme (#14812) Change-Id: I6d18e9a16ea5c4c4de0653233fefa1af8f76205a --- .../VAADIN/themes/valo/components/_table.scss | 8 +++ .../tests/themes/valo/TableWithEmptyCaption.java | 57 ++++++++++++++++++++++ .../themes/valo/TableWithEmptyCaptionTest.java | 42 ++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java create mode 100644 uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/valo/components/_table.scss b/WebContent/VAADIN/themes/valo/components/_table.scss index e040a62d0f..d8a673294d 100644 --- a/WebContent/VAADIN/themes/valo/components/_table.scss +++ b/WebContent/VAADIN/themes/valo/components/_table.scss @@ -191,7 +191,15 @@ $v-table-background-color: null !default; .#{$primary-stylename}-caption-container { overflow: hidden; line-height: 1; + min-height: $v-table-row-height; @include box-sizing(border-box); + + .v-ie8 & { + // IE8 has issues with border-box and min-height + // -> custom calculations to subtract vertical padding from row height. + $vertical-padding: round(($v-table-row-height - $v-table-header-font-size)/2); + min-height: $v-table-row-height - ($vertical-padding - $v-table-border-width) - $vertical-padding; + } } .#{$primary-stylename}-footer-container { diff --git a/uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java b/uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java new file mode 100644 index 0000000000..a3a81b3798 --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.themes.valo; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Component; +import com.vaadin.ui.Table; + +@Theme("valo") +public class TableWithEmptyCaption extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + Table table = new Table(); + table.addContainerProperty("first", String.class, ""); + table.addContainerProperty("last", String.class, ""); + table.addContainerProperty("actions", Component.class, null); + + table.addItem(new Object[] { "Teemu", "Test", new Button("Edit") }, 1); + table.addItem(new Object[] { "Dummy", "Test", new Button("Edit") }, 2); + + table.setPageLength(0); + table.setColumnHeaders("First Name", "Last Name", ""); + + table.setFooterVisible(true); + table.setColumnFooter("first", "Footer"); + table.setColumnFooter("last", ""); + table.setColumnFooter("actions", ""); + addComponent(table); + } + + @Override + protected String getTestDescription() { + return "Test that column headers (and footers) work properly with empty captions."; + } + + @Override + protected Integer getTicketNumber() { + return 14812; + } +} diff --git a/uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java b/uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java new file mode 100644 index 0000000000..04de8b498c --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.themes.valo; + +import org.junit.Test; +import org.openqa.selenium.TimeoutException; +import org.openqa.selenium.support.ui.ExpectedConditions; + +import com.vaadin.testbench.By; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class TableWithEmptyCaptionTest extends MultiBrowserTest { + + @Test + public void testEmptyCaption() throws Exception { + openTestURL(); + + // Wait for the loading bar to disappear before taking the screenshot. + try { + waitUntil(ExpectedConditions.invisibilityOfElementLocated(By + .className("v-loading-indicator")), 5); + } catch (TimeoutException e) { + // Just take the screenshot, PhantomJS always times out. + } + + compareScreen("table-empty-caption"); + } + +} -- cgit v1.2.3 From 85f7749ca36232bd9ce04a1ad1236e56660c39ec Mon Sep 17 00:00:00 2001 From: Sergey Budkin Date: Mon, 6 Oct 2014 16:35:28 +0300 Subject: Not able to scroll BrowserFrames on iOS Devices (#14813) Added CSS fixes. Change-Id: I1f1d27a18b925ab9b4e21292218c75206d3d4984 --- WebContent/VAADIN/themes/base/browserframe/browserframe.scss | 7 +++++++ WebContent/VAADIN/themes/valo/shared/_global.scss | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/base/browserframe/browserframe.scss b/WebContent/VAADIN/themes/base/browserframe/browserframe.scss index 149e38a744..fce9c11513 100644 --- a/WebContent/VAADIN/themes/base/browserframe/browserframe.scss +++ b/WebContent/VAADIN/themes/base/browserframe/browserframe.scss @@ -4,6 +4,13 @@ .v-browserframe { font-size: 0; } + + /* fix for #14813 - unable to scroll on iOS devices */ + .v-webkit.v-ios & .v-browserframe { + -webkit-overflow-scrolling: touch; + overflow:auto; + } + /* Some times a browser frame can contain a span with altenate text */ .v-browserframe > span { font-size: $font-size; diff --git a/WebContent/VAADIN/themes/valo/shared/_global.scss b/WebContent/VAADIN/themes/valo/shared/_global.scss index 049518af73..4ce294b06a 100644 --- a/WebContent/VAADIN/themes/valo/shared/_global.scss +++ b/WebContent/VAADIN/themes/valo/shared/_global.scss @@ -121,6 +121,12 @@ $valo-global-included: false !default; -webkit-overflow-scrolling: none; } + //fix for #14813 - unable to scroll on iOS devices + .v-webkit.v-ios .v-browserframe { + -webkit-overflow-scrolling: touch; + overflow:auto; + } + .v-assistive-device-only { position: absolute; top: -2000px; -- cgit v1.2.3