mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Replace deprecated success, error callbacks in $.ajax call with new functions .done and .fail.
This commit is contained in:
committed by
Dave Page
parent
81312d17e2
commit
41a8333145
@@ -82,14 +82,14 @@ module.exports = Alertify.dialog('createModeDlg', function() {
|
||||
dataType: 'json',
|
||||
contentType: 'application/x-download; charset=utf-8',
|
||||
async: false,
|
||||
success: function(resp) {
|
||||
var data = resp.data.result;
|
||||
if (data['Code'] === 1) {
|
||||
is_exist = true;
|
||||
} else {
|
||||
is_exist = false;
|
||||
}
|
||||
},
|
||||
})
|
||||
.done(function(resp) {
|
||||
var data = resp.data.result;
|
||||
if (data['Code'] === 1) {
|
||||
is_exist = true;
|
||||
} else {
|
||||
is_exist = false;
|
||||
}
|
||||
});
|
||||
return is_exist;
|
||||
},
|
||||
@@ -109,19 +109,19 @@ module.exports = Alertify.dialog('createModeDlg', function() {
|
||||
dataType: 'json',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
async: false,
|
||||
success: function(resp) {
|
||||
var data = resp.data.result;
|
||||
if (data.Code === 1) {
|
||||
permission = true;
|
||||
} else {
|
||||
$('.file_manager_ok').addClass('disabled');
|
||||
Alertify.error(data.Error);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
})
|
||||
.done(function(resp) {
|
||||
var data = resp.data.result;
|
||||
if (data.Code === 1) {
|
||||
permission = true;
|
||||
} else {
|
||||
$('.file_manager_ok').addClass('disabled');
|
||||
Alertify.error(gettext('Error occurred while checking access permission.'));
|
||||
},
|
||||
Alertify.error(data.Error);
|
||||
}
|
||||
})
|
||||
.fail(function() {
|
||||
$('.file_manager_ok').addClass('disabled');
|
||||
Alertify.error(gettext('Error occurred while checking access permission.'));
|
||||
});
|
||||
return permission;
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user