[richfaces-svn-commits] JBoss Rich Faces SVN: r4457 - branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Dec 4 11:46:40 EST 2007


Author: pyaschenko
Date: 2007-12-04 11:46:40 -0500 (Tue, 04 Dec 2007)
New Revision: 4457

Modified:
   branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1494

Modified: branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-12-04 16:34:47 UTC (rev 4456)
+++ branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-12-04 16:46:40 UTC (rev 4457)
@@ -578,19 +578,14 @@
 		{
 			Event.stopObserving(window.document, "click", this.eventOnCollapse, false);
 			
-			if (this.eventOnCollapseFlag)
-			{
-				Event.stopObserving(window.document, "click", this.eventOnCollapse, false);
-				this.eventOnCollapseFlag = false;
-			}
-			
 			if (Richfaces.browser.isIE6) Element.hide(this.IFRAME_ID);
 			Element.hide(element);
 			this.isVisible = false;
 		}
 	},
 	
-	doExpand: function() {
+	doExpand: function(e) {
+		if (e) this.skipEventOnCollapse = true;
 		if (!this.params.popup || this.isVisible) return;
 		
 		var element = $(this.id);
@@ -651,11 +646,17 @@
 		}
 	},
 	
-	doSwitch: function() {
-		this.isVisible ? this.doCollapse() : this.doExpand();
+	doSwitch: function(e) {
+		this.isVisible ? this.doCollapse() : this.doExpand(e);
 	},
 	
 	eventOnCollapse: function (e) {
+		if (this.skipEventOnCollapse)
+		{
+			this.skipEventOnCollapse = false;
+			return true;
+		}
+		
 		if (Event.element(e).id == this.POPUP_BUTTON_ID || (!this.params.enableManualInput && Event.element(e).id == this.INPUT_DATE_ID) ) return true;
 		
 		Position.prepare();




More information about the richfaces-svn-commits mailing list