mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Improved alertify notification logic. Remove AlertifyWrapper class and extend notification methods in alertify itself.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
// Backup dialog
|
||||
define([
|
||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'underscore.string', 'alertify',
|
||||
'pgadmin.browser', 'backbone', 'backgrid', 'backform', 'pgadmin.browser.node',
|
||||
'sources/alerts/alertify_wrapper'
|
||||
], function(gettext, url_for, $, _, S, alertify, pgBrowser, Backbone, Backgrid, Backform, pgNode, AlertifyWrapper) {
|
||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'underscore.string', 'pgadmin.alertifyjs',
|
||||
'pgadmin.browser', 'backbone', 'backgrid', 'backform', 'pgadmin.browser.node'
|
||||
], function(gettext, url_for, $, _, S, alertify, pgBrowser, Backbone, Backgrid, Backform, pgNode) {
|
||||
|
||||
// if module is already initialized, refer to that.
|
||||
if (pgBrowser.Backup) {
|
||||
@@ -556,8 +555,7 @@ TODO LIST FOR BACKUP:
|
||||
data:{ 'data': JSON.stringify(args) },
|
||||
success: function(res) {
|
||||
if (res.success) {
|
||||
var alertifyWrapper = new AlertifyWrapper();
|
||||
alertifyWrapper.success(gettext('Backup job created.'), 5);
|
||||
alertify.success(gettext('Backup job created.'), 5);
|
||||
pgBrowser.Events.trigger('pgadmin-bgprocess:created', self);
|
||||
} else {
|
||||
console.log(res);
|
||||
@@ -785,8 +783,7 @@ TODO LIST FOR BACKUP:
|
||||
data:{ 'data': JSON.stringify(args) },
|
||||
success: function(res) {
|
||||
if (res.success) {
|
||||
var alertifyWrapper = new AlertifyWrapper();
|
||||
alertifyWrapper.success(gettext('Backup job created.'), 5);
|
||||
alertify.success(gettext('Backup job created.'), 5);
|
||||
pgBrowser.Events.trigger('pgadmin-bgprocess:created', self);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user