Author: andrei_exadel
Date: 2008-06-20 10:13:01 -0400 (Fri, 20 Jun 2008)
New Revision: 9141
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
RF-3756
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-06-20
13:49:57 UTC (rev 9140)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-06-20
14:13:01 UTC (rev 9141)
@@ -721,7 +721,7 @@
this.disableAddButton();
this.disableCleanButton();
this.disableUploadButton();
- this.switchUploadButton();
+
},
cleanAllDisabled: function () {
@@ -752,22 +752,6 @@
}
return s;
},
-
- switchUploadButton: function () {
- if (this.runUpload) {
- var d = $(this.id + ":upload2");
- d.innerHTML = FileUploadEntry.LABELS['stop'];
- d.onclick = function () {
- return this.stop();
- }.bind(this);
- }else {
- var d = $(this.id + ":upload2");
- d.innerHTML = FileUploadEntry.LABELS['upload'];;
- d.onclick = function () {
- return this.upload();
- }.bind(this);
- }
- },
disableCleanButton: function() {
var disabled = this.cleanAllDisabled();
@@ -814,7 +798,13 @@
if (this.disabled) {
d1.onclick = function() {return false;};
}else {
- d1.onclick = function() { return this.upload();}.bind(this);
+ if (!this.runUpload) {
+ d1.onclick = function() { return this.upload();}.bind(this);
+ d2.innerHTML = FileUploadEntry.LABELS['upload'];
+ }else {
+ d1.onclick = function() { return this.stop();}.bind(this);
+ d2.innerHTML = FileUploadEntry.LABELS['stop'];
+ }
}
this._updateClassNames(d1, d2, (this.runUpload) ? this.classes.STOP :
this.classes.UPDATE, (this.runUpload) ? this.classes.STOP_CONTENT :
this.classes.UPDATE_CONTENT);
},
Show replies by date