Revert "Queue"

This commit is contained in:
Marco
2015-11-20 23:51:02 +01:00
parent 32ca24ce38
commit 00f06ea202
10 changed files with 6 additions and 305 deletions

View File

@ -10,8 +10,7 @@ define('ajax', ['mailpoet', 'jquery'], function(MailPoet, jQuery) {
token: null,
data: {},
onSuccess: function(data, textStatus, xhr) {},
onError: function(xhr, textStatus, errorThrown) {},
onComplete: function(xhr) {}
onError: function(xhr, textStatus, errorThrown) {}
},
get: function(options) {
return this.request('get', options);
@ -19,9 +18,6 @@ define('ajax', ['mailpoet', 'jquery'], function(MailPoet, jQuery) {
post: function(options) {
return this.request('post', options);
},
head: function(options) {
return this.request('head', options);
},
delete: function(options) {
return this.request('delete', options);
},
@ -64,23 +60,14 @@ define('ajax', ['mailpoet', 'jquery'], function(MailPoet, jQuery) {
this.options.onSuccess,
'json'
);
}
else if (method === 'head') {
jqXHR = jQuery.ajax({
url: this.options.url,
type : 'head',
complete : this.options.onComplete
});
}
else {
} else {
jqXHR = jQuery.ajax({
url: this.options.url,
type : 'post',
data: params,
dataType: 'json',
success : this.options.onSuccess,
error : this.options.onError,
complete : this.options.onComplete
error : this.options.onError
});
}