fix ajax url() context. fixes #895
This commit is contained in:
parent
70be25cc6d
commit
38758d754b
@ -355,14 +355,14 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
type = options.type || 'GET', // set type of request (GET or POST)
|
||||
params = {};
|
||||
|
||||
data = data ? data.call(self.opts.element, query.term, query.page, query.context) : null;
|
||||
url = (typeof url === 'function') ? url.call(self.opts.element, query.term, query.page, query.context) : url;
|
||||
data = data ? data.call(self, query.term, query.page, query.context) : null;
|
||||
url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
|
||||
|
||||
if( null !== handler) { handler.abort(); }
|
||||
|
||||
if (options.params) {
|
||||
if ($.isFunction(options.params)) {
|
||||
$.extend(params, options.params.call(self.opts.element));
|
||||
$.extend(params, options.params.call(self));
|
||||
} else {
|
||||
$.extend(params, options.params);
|
||||
}
|
||||
@ -383,7 +383,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
query.callback(results);
|
||||
}
|
||||
});
|
||||
handler = transport.call(self.opts.element, params);
|
||||
handler = transport.call(self, params);
|
||||
}, quietMillis);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user