You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2012/08/22 14:58:18 UTC

git commit: WICKET-4726 Do not try to show the date picker if it is already shown

Updated Branches:
  refs/heads/master df2b332ee -> 679def31d


WICKET-4726 Do not try to show the date picker if it is already shown


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/679def31
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/679def31
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/679def31

Branch: refs/heads/master
Commit: 679def31dd6891a90400a266edba5380282db63f
Parents: df2b332
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Aug 22 15:55:37 2012 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Aug 22 15:55:37 2012 +0300

----------------------------------------------------------------------
 .../wicket/extensions/yui/calendar/wicket-date.js  |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/679def31/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
index 3209313..2525334 100644
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
+++ b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
@@ -261,9 +261,11 @@
 		YAHOO.wicket[cfg.dpJs].isVisible = function() { return YAHOO.wicket[cfg.dpJs].oDomContainer.style.display === 'block'; };
 
 		function showCalendar() {
-			Wicket.DateTime.showCalendar(YAHOO.wicket[cfg.dpJs], YAHOO.util.Dom.get(cfg.componentId).value, cfg);
-			if (cfg.alignWithIcon) {
-				Wicket.DateTime.positionRelativeTo(YAHOO.wicket[cfg.dpJs].oDomContainer, cfg.icon);
+			if (YAHOO.wicket[cfg.dpJs].oDomContainer.style.display !== 'block') {
+				Wicket.DateTime.showCalendar(YAHOO.wicket[cfg.dpJs], YAHOO.util.Dom.get(cfg.componentId).value, cfg);
+				if (cfg.alignWithIcon) {
+					Wicket.DateTime.positionRelativeTo(YAHOO.wicket[cfg.dpJs].oDomContainer, cfg.icon);
+				}
 			}
 		}