1
0
mirror of synced 2025-03-10 22:56:12 +03:00

add new options.type parameter for ajax helper. fixes #139

This commit is contained in:
Igor Vaynberg 2012-06-18 22:10:33 -07:00
parent af964bdbad
commit 09f24fdda1

View File

@ -250,17 +250,18 @@
requestSequence += 1; // increment the sequence
var requestNumber = requestSequence, // this request's sequence number
data = options.data, // ajax data function
transport = options.transport || $.ajax;
transport = options.transport || $.ajax,
type = options.type || 'GET'; // set type of request (GET or POST)
data = data.call(this, query.term, query.page, query.context);
if( null !== handler){
handler.abort();
}
if( null !== handler) { handler.abort(); }
handler = transport.call(null, {
url: options.url,
dataType: options.dataType,
data: data,
type: type,
success: function (data) {
if (requestNumber < requestSequence) {
return;