diff options
author | wei <> | 2006-01-18 04:20:26 +0000 |
---|---|---|
committer | wei <> | 2006-01-18 04:20:26 +0000 |
commit | 0226f8f5f430d34b3cead40c4eb7b458933d16c6 (patch) | |
tree | 68b21c4bec09ed73edc64019b4e20a2e3853d477 /framework/Web/Javascripts/extended | |
parent | e2219c91b98088289080bfa451d3083851eddf76 (diff) |
update javascript library and usage in web controls
Diffstat (limited to 'framework/Web/Javascripts/extended')
-rw-r--r-- | framework/Web/Javascripts/extended/base.js | 2 | ||||
-rw-r--r-- | framework/Web/Javascripts/extended/event.js | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/framework/Web/Javascripts/extended/base.js b/framework/Web/Javascripts/extended/base.js index d3d8fb63..8975e1cc 100644 --- a/framework/Web/Javascripts/extended/base.js +++ b/framework/Web/Javascripts/extended/base.js @@ -29,7 +29,7 @@ function $(n,d) { Function.prototype.bindEvent = function() {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
- return __method.call(object, [event || window.event].concat(args));
+ return __method.apply(object, [event || window.event].concat(args));
}
}
diff --git a/framework/Web/Javascripts/extended/event.js b/framework/Web/Javascripts/extended/event.js index dd72d60e..a7514cda 100644 --- a/framework/Web/Javascripts/extended/event.js +++ b/framework/Web/Javascripts/extended/event.js @@ -16,7 +16,7 @@ Object.extend(Event, { if (name == 'keypress' &&
((navigator.appVersion.indexOf('AppleWebKit') > 0)
- || (element && element.attachEvent)))
+ || element.attachEvent))
name = 'keydown';
this._observeAndCache(element, name, observer, useCapture);
@@ -26,20 +26,20 @@ Object.extend(Event, { return e.keyCode != null ? e.keyCode : e.charCode
},
- fireEvent : function(el,type)
+ fireEvent : function(element,type)
{
if(document.createEvent)
{
- var evt = document.createEvent('HTMLEvents');
- evt.initEvent(type, true, true);
- el.dispatchEvent(evt);
+ var event = document.createEvent('HTMLEvents');
+ event.initEvent(type, true, true);
+ element.dispatchEvent(event);
}
- else if(el.fireEvent)
+ else if(element.fireEvent)
{
- el.fireEvent('on'+type);
- el[type]();
+ element.fireEvent('on'+type);
+ element[type]();
}
else
- el[type]();
+ element[type]();
}
});
\ No newline at end of file |