Replace deprecated success, error callbacks in $.ajax call with new functions .done and .fail.

This commit is contained in:
Aditya Toshniwal authored and Dave Page committed 2018-07-09 13:54:00 +01:00
1 parent 81312d17e2
commit 41a8333145
39 files changed
+2817 -2821

No files matched your search

+12 -12
View File
@@ -33,18 +33,18 @@ define('pgadmin.settings', [
url: url_for('settings.reset_layout'),
type: 'DELETE',
async: false,
success: function() {
// Prevent saving layout on server for next page reload.
$(window).unbind('unload');
window.onbeforeunload = null;
// Now reload page
location.reload(true);
},
error: function() {
console.warn(
'Something went wrong on server while resetting layout.'
);
},
})
.done(function() {
// Prevent saving layout on server for next page reload.
$(window).unbind('unload');
window.onbeforeunload = null;
// Now reload page
location.reload(true);
})
.fail(function() {
console.warn(
'Something went wrong on server while resetting layout.'
);
});
},