Author: dsvyatobatsko
Date: 2008-03-26 05:26:06 -0400 (Wed, 26 Mar 2008)
New Revision: 7240
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
[RF-2756] simplification
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-26
03:12:49 UTC (rev 7239)
+++
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-26
09:26:06 UTC (rev 7240)
@@ -492,12 +492,11 @@
for (var e in this.events) {
if (e && this.events[e]) {
if(e == 'onupload') {
- this.element.observe("rich:" + e, (function (handler) {
- return function(event) {
- if(handler(event) !== false) {
- event.memo.entry.upload();
- }
- }.bind(this);}.bind(this))(this.events[e]));
+ this.element.observe("rich:onupload", function(event) {
+ if(this.events['onupload'](event) !== false) {
+ event.memo.entry.upload();
+ }
+ }.bindAsEventListener(this));
} else {
this.element.observe("rich:" + e, this.events[e]);
}
Show replies by date