incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r526338 - /incubator/xap/trunk/codebase/src/xap/widgets/dojo/Window.js
Date Sat, 07 Apr 2007 01:08:30 GMT
Author: jmargaris
Date: Fri Apr  6 18:08:30 2007
New Revision: 526338

URL: http://svn.apache.org/viewvc?view=rev&rev=526338
Log:
IE7 maxmimize behaves better now

Modified:
    incubator/xap/trunk/codebase/src/xap/widgets/dojo/Window.js

Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/Window.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/Window.js?view=diff&rev=526338&r1=526337&r2=526338
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/widgets/dojo/Window.js (original)
+++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/Window.js Fri Apr  6 18:08:30 2007
@@ -128,7 +128,18 @@
 			return;
 		}
 		
-		if (this.windwState == "normal"){
+		var oldWindowState = this.windowState;
+				
+		var previous = {
+			width: this.previous.width,
+			height: this.previous.height,
+			left: this.previous.left,
+			top: this.previous.top,
+			bottom: this.previous.bottom,
+			right: this.previous.right
+		};	
+		
+		if (this.windowState === "normal"){
 			this.setPrevious() ;
 		}
 		
@@ -136,7 +147,16 @@
 		restoreParent.removeChild(this.restoreAction);
 		restoreParent.insertBefore(this.restoreAction,this.minimizeAction);
 		
-		xap.widgets.dojo.Window.superclass.maximizeWindow.call(this,evt);		
+		xap.widgets.dojo.Window.superclass.maximizeWindow.call(this,evt);
+		
+		
+		//workaround for IE7 where _setInitialWindowState
+		//is called after the fact to set the window as maximized.
+		//in that case the window can be maximized twice, and we don't want
+		//to save the bounds as the max bounds
+		if (oldWindowState==="maximized"){
+			this.previous = previous;
+		}		
 		
 	},
 	



Mime
View raw message