aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2008-02-26 12:18:34 +0000
committerMarc Englund <marc.englund@itmill.com>2008-02-26 12:18:34 +0000
commit58836873a3358a56669643f97d7966d3f0b3e03c (patch)
treee6f4a5e2c485674175f78ab684c7b48ce62ea3e3
parentcfafc1af38fd84f05d9e9924a6d2837c1dfa24e0 (diff)
downloadvaadin-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.java14
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);
}
}