1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00
ifhub.club/engine/lib/external/JsHttpRequest/JsHttpRequest-prototype.js
Mzhelskiy Maxim 3e4be7be12
2009-08-18 09:10:14 +00:00

27 lines
846 B
JavaScript

/**
* JsHttpRequest & Prototype integration module.
* Include this file just after the JsHttpRequest and Prototype inclusion.
*
* @license LGPL
* @author Dmitry Koterov, http://en.dklab.ru/lib/JsHttpRequest/
* @version 5.x $Id$
*/
Ajax.Request.prototype._jshr_setOptions = Ajax.Request.prototype.setOptions;
Ajax.Request.prototype.setOptions = function(options) {
// Support for whole form & form element sending.
var parameters = options.parameters;
options.parameters = {};
this.transport._jshr_send = this.transport.send;
this.transport.send = function(body) {
return this._jshr_send(body || parameters);
}
this._jshr_setOptions(options);
}
Ajax.getTransport = function() {
return new JsHttpRequest();
}
Ajax.Request.prototype.evalResponse = Prototype.emptyFunction;