Skip to content

Commit

Permalink
Merge branch 'moderngetjsonapi' of https://github.com/italia/docs.ita…
Browse files Browse the repository at this point in the history
…lia.it into italia-moderngetjsonapi
  • Loading branch information
ericholscher committed Oct 31, 2018
2 parents dedcaee + f78230a commit 21268fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion readthedocs/core/static-src/core/js/doc-embed/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function attach_elastic_search_query(data) {
return search_def.resolve(resp.responseJSON.results);
}
})
.error(function (resp, status_code, error) {
.fail(function (resp, status_code, error) {
return search_def.reject();
});
};
Expand Down
4 changes: 2 additions & 2 deletions readthedocs/core/static-src/core/js/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function poll_task(data) {
function poll_task_loop() {
jquery
.getJSON(data.url)
.success(function (task) {
.done(function (task) {
if (task.finished) {
if (task.success) {
defer.resolve();
Expand All @@ -22,7 +22,7 @@ function poll_task(data) {
setTimeout(poll_task_loop, 2000);
}
})
.error(function (error) {
.fail(function (error) {
console.error('Error polling task:', error);
tries -= 1;
if (tries > 0) {
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/static/core/js/readthedocs-doc-embed.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions readthedocs/projects/static-src/projects/js/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function ProjectImportView(instance, config) {
self.error(null);

$.getJSON(url)
.success(function (projects_list) {
.done(function (projects_list) {
var projects = [];
self.page_next(projects_list.next);
self.page_previous(projects_list.previous);
Expand All @@ -241,7 +241,7 @@ function ProjectImportView(instance, config) {
}
self.projects(projects);
})
.error(function (error) {
.fail(function (error) {
var error_msg = error.responseJSON.detail || error.statusText;
self.error({message: error_msg});
})
Expand All @@ -252,21 +252,21 @@ function ProjectImportView(instance, config) {

self.get_organizations = function () {
$.getJSON(self.urls['remoteorganization-list'])
.success(function (organizations) {
.done(function (organizations) {
self.organizations_raw(organizations.results);
})
.error(function (error) {
.fail(function (error) {
var error_msg = error.responseJSON.detail || error.statusText;
self.error({message: error_msg});
});
};

self.get_accounts = function () {
$.getJSON(self.urls['remoteaccount-list'])
.success(function (accounts) {
.done(function (accounts) {
self.accounts_raw(accounts.results);
})
.error(function (error) {
.fail(function (error) {
var error_msg = error.responseJSON.detail || error.statusText;
self.error({message: error_msg});
});
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/static/projects/js/import.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 21268fc

Please sign in to comment.