Author: pyaschenko
Date: 2009-05-06 09:59:46 -0400 (Wed, 06 May 2009)
New Revision: 14034
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-7029
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 2009-05-06
12:46:12 UTC (rev 14033)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-05-06
13:59:46 UTC (rev 14034)
@@ -523,16 +523,15 @@
return this.fileEntryWidth;
}
var w;
- if (this.element.getWidth() != 0) {
- w = this.element.getWidth() - 122;
- } else {
- w = this.element.style.width - 122;
- }
+ w = this.element.offsetWidth - 122;
+ if (w<0) w = 0;
this.fileEntryWidth = w;
var progressW = this._progressBar.style.width;
if (progressW == "") { progressW = 200; }
if (progressW > this.fileEntryWidth) {
- w = (w - 2) + "px";
+ w = (w - 2);
+ if (w<0) w=0;
+ w += "px";
this._progressBar.style.width = w;
var r = $(this._progressBar.id + ":remain");
if (r) {