[richfaces-svn-commits] JBoss Rich Faces SVN: r11852 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Dec 17 11:45:54 EST 2008


Author: nbelaevski
Date: 2008-12-17 11:45:54 -0500 (Wed, 17 Dec 2008)
New Revision: 11852

Modified:
   trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-5214

Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js	2008-12-17 16:21:46 UTC (rev 11851)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js	2008-12-17 16:45:54 UTC (rev 11852)
@@ -478,9 +478,16 @@
 		var p = o.parentNode.parentNode;
 		p = $(p);
 		if (p.getWidth() != 0) {
-			o.parentNode.style.width = p.getWidth() + "px";
-			o.parentNode.style.height = p.getHeight() + "px";
+			var style = o.parentNode.style;	
+			style.width = p.getWidth() + "px";
+			style.height = p.getHeight() + "px";
+			
 			Event.stopObserving(p,'mouseover', this.inputHandler);
+
+			if (Richfaces.browser.isIE && this.flashComponent) {
+				this.flashComponent.style.width = style.width;
+				this.flashComponent.style.height = style.height;
+			}
 		}else {
 			this.inputHandler = this.initFileInput.bindAsEventListener(this);
 			Event.observe(p,'mouseover', this.inputHandler);
@@ -1149,11 +1156,6 @@
 											acceptedTypes: this.acceptedTypes,
 			 								noDuplicate: this.options.noDuplicate,
 			 								maxFiles: this.maxFileBatchSize });
-		if (Richfaces.browser.isIE) 
-		{
-			this.flashComponent.style.width = this.currentInput.parentNode.style.width;
-			this.flashComponent.style.height = this.currentInput.parentNode.style.height;
-		}
 		this.enable();
 	},
 	




More information about the richfaces-svn-commits mailing list