diff options
author | Marc Englund <marc.englund@itmill.com> | 2008-02-26 12:18:34 +0000 |
---|---|---|
committer | Marc Englund <marc.englund@itmill.com> | 2008-02-26 12:18:34 +0000 |
commit | 58836873a3358a56669643f97d7966d3f0b3e03c (patch) | |
tree | e6f4a5e2c485674175f78ab684c7b48ce62ea3e3 | |
parent | cfafc1af38fd84f05d9e9924a6d2837c1dfa24e0 (diff) | |
download | vaadin-framework-58836873a3358a56669643f97d7966d3f0b3e03c.tar.gz vaadin-framework-58836873a3358a56669643f97d7966d3f0b3e03c.zip |
Enabled closing of calendar popup by clicking calendar button.
svn changeset:3929/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java index c90ea2a35c..30d9595edf 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IPopupCalendar.java @@ -5,6 +5,7 @@ package com.itmill.toolkit.terminal.gwt.client.ui;
import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.PopupListener;
@@ -54,6 +55,7 @@ public class IPopupCalendar extends ITextualDate implements Paintable, public void onClick(Widget sender) {
if (sender == calendarToggle && !open) {
+ open = true;
calendar.updateCalendar();
// clear previous values
popup.setWidth("");
@@ -81,19 +83,21 @@ public class IPopupCalendar extends ITextualDate implements Paintable, // fix size
popup.setWidth(w + "px");
popup.setHeight(h + "px");
- open = true;
-
}
});
- } else {
- open = false;
}
}
public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
if (sender == popup) {
buildDate();
- open = false;
+ // Sigh.
+ Timer t = new Timer() {
+ public void run() {
+ open = false;
+ }
+ };
+ t.schedule(100);
}
}
|