Author: andrei_exadel
Date: 2008-03-27 13:51:02 -0400 (Thu, 27 Mar 2008)
New Revision: 7319
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
fix bugs
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-03-27
17:30:03 UTC (rev 7318)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-27
17:51:02 UTC (rev 7319)
@@ -124,7 +124,7 @@
this.fileInput = fileInput;
this.uploadObject = uploadObject;
- var content = FileUploadEntry.template.invoke('getContent', {fileName:
$F(this.fileInput), fileEntryWidth: uploadObject.fileEntryWidth, className :
this.uploadObject.classes.FILE_ENTRY.ENABLED }).join('');
+ var content = FileUploadEntry.template.invoke('getContent', {fileName:
$F(this.fileInput), fileEntryWidth: uploadObject.getFileEntryWidth(), className :
this.uploadObject.classes.FILE_ENTRY.ENABLED }).join('');
Element.insert(this.uploadObject.items, content);
@@ -412,7 +412,7 @@
this.initEvents();
this.setupAutoUpload();
this.checkFrame();
- this.initFileEntryWidth();
+ //this.initFileEntryWidth();
this.initLabels(labels);
this.processButtons();
this.initFileInput();
@@ -442,8 +442,11 @@
}
},
- initFileEntryWidth: function () {
- var w;
+ getFileEntryWidth: function () {
+ if (this.fileEntryWidth) {
+ return this.fileEntryWidth;
+ }
+ var w;
if (this.element.getWidth() != 0) {
w = this.element.getWidth() - 122;
} else {
@@ -460,6 +463,7 @@
$(this._progressBar.id + ":complete").style.width = w;
}
}
+ return this.fileEntryWidth;
},
createFrame: function () {
Show replies by date