Commit c46e6e98 authored by tom's avatar tom

Return jqxhr object from ajax request

Not the context of the request
parent e83d6b94
......@@ -78,12 +78,10 @@
}
delete args.data;
$.extend(args, {statusCode: statusCode});
return this.each(function () {
var ajaxOptions = {
type: type,
url: $(this).slapos('host') + method,
contentType: 'application/json',
//cache: false,
data: JSON.stringify(data),
datatype: 'json',
context: $(this),
......@@ -97,8 +95,7 @@
}
};
$.extend(ajaxOptions, args);
$.ajax(ajaxOptions);
});
return $.ajax(ajaxOptions);
},
instanceList: function (args) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment