mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-03 12:49:23 -06:00
Replace deprecated success, error callbacks in $.ajax call with new functions .done and .fail.
This commit is contained in:
1 parent
81312d17e2
commit
41a8333145
39 files changed
+2817
-2821
No files matched your search
@@ -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.'
|
||||
);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user