diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-05-19 09:33:23 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-05-19 09:33:23 +0000 |
commit | 7aa4bfe57bec25266a983528b740d8477e8347bd (patch) | |
tree | 09ba6f3bece28d9f744963605637224764e7aa5f | |
parent | 84dc2a30b3939d05ede85d5b66e3ff03650b51d0 (diff) | |
download | vaadin-framework-7aa4bfe57bec25266a983528b740d8477e8347bd.tar.gz vaadin-framework-7aa4bfe57bec25266a983528b740d8477e8347bd.zip |
style enhancements (i-error related)
svn changeset:4541/svn branch:trunk
5 files changed, 28 insertions, 18 deletions
diff --git a/WebContent/ITMILL/themes/default/common/common.css b/WebContent/ITMILL/themes/default/common/common.css index 2ffb82d6ce..99e386b8ae 100644 --- a/WebContent/ITMILL/themes/default/common/common.css +++ b/WebContent/ITMILL/themes/default/common/common.css @@ -26,6 +26,10 @@ border-top:1px solid transparent; } +.i-view:active, .i-view:focus { + outline: none; +} + .i-app input, .i-window input, .i-app select, @@ -63,7 +67,8 @@ input.i-modified, .i-modified .i-select-select,
.i-modified .i-select-twincol-selections,
.i-modified .i-select-twincol-options,
-.i-modified .i-slider-base {
+.i-modified .i-slider-base { + background:transparent;
background-color: #FFFFE0;
}
@@ -77,6 +82,7 @@ input.i-error, .i-error .i-select-twincol-selections,
.i-error .i-select-twincol-options,
.i-error .i-slider-base {
+ background:transparent; background-color: #FFE0E0;
} diff --git a/WebContent/ITMILL/themes/default/datefield/datefield.css b/WebContent/ITMILL/themes/default/datefield/datefield.css index c5a7b87ccc..7ddf948f5a 100644 --- a/WebContent/ITMILL/themes/default/datefield/datefield.css +++ b/WebContent/ITMILL/themes/default/datefield/datefield.css @@ -170,4 +170,8 @@ font-size: 10px;
padding: 0;
margin: 0;
-}
\ No newline at end of file +} + +.i-datefield-error .i-textfield { + background: #ff9999; +} diff --git a/WebContent/ITMILL/themes/default/styles.css b/WebContent/ITMILL/themes/default/styles.css index 32e1f2dd98..398b7e82d7 100644 --- a/WebContent/ITMILL/themes/default/styles.css +++ b/WebContent/ITMILL/themes/default/styles.css @@ -104,6 +104,10 @@ border-top:1px solid transparent; } +.i-view:active, .i-view:focus { + outline: none; +} + .i-app input, .i-window input, .i-app select, @@ -142,6 +146,7 @@ input.i-modified, .i-modified .i-select-twincol-selections, .i-modified .i-select-twincol-options, .i-modified .i-slider-base { + background:transparent; background-color: #FFFFE0; } @@ -155,6 +160,7 @@ input.i-error, .i-error .i-select-twincol-selections, .i-error .i-select-twincol-options, .i-error .i-slider-base { + background:transparent; background-color: #FFE0E0; } @@ -410,6 +416,10 @@ input.i-error, padding: 0; margin: 0; } + +.i-datefield-error .i-textfield { + background: #ff9999; +} .i-expandlayout-lo-table { margin:0; padding:0; @@ -1504,11 +1514,6 @@ input.i-error, border-color: #5daee8; } -.i-textfield-error, -.i-textarea-error { - background: #ff9999; -} - .i-textfield.i-readonly, .i-textarea.i-readonly { background: transparent; diff --git a/WebContent/ITMILL/themes/default/textfield/textfield.css b/WebContent/ITMILL/themes/default/textfield/textfield.css index 10aa9811f4..9f3191dc75 100644 --- a/WebContent/ITMILL/themes/default/textfield/textfield.css +++ b/WebContent/ITMILL/themes/default/textfield/textfield.css @@ -27,11 +27,6 @@ border-color: #5daee8; } -.i-textfield-error, -.i-textarea-error { - background: #ff9999; -} - .i-textfield.i-readonly, .i-textarea.i-readonly { background: transparent; diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextualDate.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextualDate.java index 29013f422f..d4091e9cfb 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextualDate.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextualDate.java @@ -19,6 +19,8 @@ import com.itmill.toolkit.terminal.gwt.client.Util; public class ITextualDate extends IDateField implements Paintable, Field,
ChangeListener, ContainerResizedListener, Focusable {
+ private static final String ERROR_CLASSNAME = CLASSNAME + "-error";
+
private final ITextField text;
private String formatStr;
@@ -37,8 +39,6 @@ public class ITextualDate extends IDateField implements Paintable, Field, }
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
- // remove possibly added invalid value indication
- removeStyleName("i-error");
int origRes = currentResolution;
super.updateFromUIDL(uidl, client);
@@ -97,7 +97,7 @@ public class ITextualDate extends IDateField implements Paintable, Field, *
*/
protected void buildDate() {
- removeStyleName("i-error");
+ removeStyleName(ERROR_CLASSNAME);
// Create the initial text for the textfield
String dateText;
if (date != null) {
@@ -124,10 +124,10 @@ public class ITextualDate extends IDateField implements Paintable, Field, date = DateTimeFormat.getFormat(getFormatString()).parse(
text.getText());
// remove possibly added invalid value indication
- removeStyleName("i-error");
+ removeStyleName(ERROR_CLASSNAME);
} catch (final Exception e) {
ApplicationConnection.getConsole().log(e.getMessage());
- addStyleName("i-error");
+ addStyleName(ERROR_CLASSNAME);
client.updateVariable(id, "lastInvalidDateString", text
.getText(), false);
date = null;
@@ -135,7 +135,7 @@ public class ITextualDate extends IDateField implements Paintable, Field, } else {
date = null;
// remove possibly added invalid value indication
- removeStyleName("i-error");
+ removeStyleName(ERROR_CLASSNAME);
}
// Update variables
|