mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Remove Alertify from pgAdmin completely. Fixes #7619
This commit is contained in:
@@ -45,8 +45,7 @@
|
||||
padding: 0.5rem 0rem;
|
||||
}
|
||||
|
||||
/* In wizard select2 dropdown doesn't
|
||||
* popup because z-index of alertify
|
||||
/* In wizard select2 dropdown doesn't popup.
|
||||
* wizard is greater than the z-index
|
||||
* of select2 dropdown. To make select2
|
||||
* visible, set z-index of select2
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import $ from 'jquery';
|
||||
import _ from 'underscore';
|
||||
import _ from 'lodash';
|
||||
|
||||
import pgAdmin from 'sources/pgadmin';
|
||||
import pgWindow from 'sources/window';
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import { generateNodeUrl } from './node_ajax';
|
||||
import _ from 'lodash';
|
||||
import Notify, {initializeModalProvider, initializeNotifier} from '../../../static/js/helpers/Notifier';
|
||||
import { checkMasterPassword } from '../../../static/js/Dialogs/index';
|
||||
import { pgHandleItemError } from '../../../static/js/utils';
|
||||
|
||||
define('pgadmin.browser', [
|
||||
'sources/gettext', 'sources/url_for', 'require', 'jquery', 'underscore',
|
||||
'bootstrap', 'sources/pgadmin', 'pgadmin.alertifyjs', 'bundled_codemirror',
|
||||
'sources/gettext', 'sources/url_for', 'require', 'jquery',
|
||||
'bootstrap', 'sources/pgadmin', 'bundled_codemirror',
|
||||
'sources/check_node_visibility', './toolbar', 'pgadmin.help',
|
||||
'sources/csrf', 'sources/utils', 'sources/window', 'pgadmin.authenticate.kerberos',
|
||||
'sources/tree/tree_init',
|
||||
@@ -25,8 +27,8 @@ define('pgadmin.browser', [
|
||||
'sources/codemirror/addon/fold/pgadmin-sqlfoldcode',
|
||||
'pgadmin.browser.keyboard', 'sources/tree/pgadmin_tree_save_state'
|
||||
], function(
|
||||
gettext, url_for, require, $, _,
|
||||
Bootstrap, pgAdmin, Alertify, codemirror,
|
||||
gettext, url_for, require, $,
|
||||
Bootstrap, pgAdmin, codemirror,
|
||||
checkNodeVisibility, toolBar, help, csrfToken, pgadminUtils, pgWindow,
|
||||
Kerberos, InitTree,
|
||||
) {
|
||||
@@ -1707,12 +1709,10 @@ define('pgadmin.browser', [
|
||||
success();
|
||||
}
|
||||
})
|
||||
.fail(function(xhr, error, status) {
|
||||
if (
|
||||
!Alertify.pgHandleItemError(
|
||||
xhr, error, status, {item: __i, info: info}
|
||||
)
|
||||
) {
|
||||
.fail(function(xhr, error) {
|
||||
if (!pgHandleItemError(
|
||||
xhr, {item: __i, info: info}
|
||||
)) {
|
||||
var contentType = xhr.getResponseHeader('Content-Type'),
|
||||
jsonResp = (
|
||||
contentType &&
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
import {getPanelView} from './panel_view';
|
||||
import _ from 'lodash';
|
||||
|
||||
define([
|
||||
'sources/gettext', 'jquery', 'underscore', 'sources/pgadmin',
|
||||
'backbone', 'alertify', 'backform', 'backgrid', 'sources/browser/generate_url',
|
||||
'sources/gettext', 'sources/pgadmin',
|
||||
'sources/browser/generate_url',
|
||||
'pgadmin.backform', 'pgadmin.backgrid',
|
||||
'pgadmin.browser.node', 'backgrid.select.all',
|
||||
], function(gettext, $, _, pgAdmin, Backbone, Alertify, Backform, Backgrid, generateUrl) {
|
||||
], function(gettext, pgAdmin, generateUrl) {
|
||||
|
||||
var pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
import _ from 'lodash';
|
||||
|
||||
define([
|
||||
'underscore', 'sources/pgadmin', 'jquery', 'backbone', 'sources/utils',
|
||||
], function(_, pgAdmin, $, Backbone, pgadminUtils) {
|
||||
'sources/pgadmin', 'jquery', 'backbone', 'sources/utils',
|
||||
], function(pgAdmin, $, Backbone, pgadminUtils) {
|
||||
var pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
|
||||
pgBrowser.DataModel = Backbone.Model.extend({
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import Notify from '../../../static/js/helpers/Notifier';
|
||||
import _ from 'lodash';
|
||||
|
||||
define(
|
||||
['sources/gettext', 'underscore', 'sources/pgadmin'],
|
||||
function(gettext, _, pgAdmin) {
|
||||
['sources/gettext', 'sources/pgadmin'],
|
||||
function(gettext, pgAdmin) {
|
||||
pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
|
||||
_.extend(pgAdmin.Browser, {
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import _ from 'lodash';
|
||||
define([
|
||||
'underscore', 'sources/pgadmin', 'jquery', 'wcdocker',
|
||||
], function(_, pgAdmin, $) {
|
||||
'sources/pgadmin', 'jquery', 'wcdocker',
|
||||
], function(pgAdmin, $) {
|
||||
|
||||
var pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {},
|
||||
wcDocker = window.wcDocker,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import _ from 'underscore';
|
||||
import _ from 'lodash';
|
||||
import pgAdmin from '../../../static/js/pgadmin';
|
||||
import $ from 'jquery';
|
||||
import Mousetrap from 'mousetrap';
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
import _ from 'lodash';
|
||||
|
||||
define([
|
||||
'underscore', 'sources/pgadmin', 'jquery', 'sources/utils', 'sources/gettext',
|
||||
], function(_, pgAdmin, $, pgadminUtils, gettext) {
|
||||
'sources/pgadmin', 'jquery', 'sources/utils', 'sources/gettext',
|
||||
], function(pgAdmin, $, pgadminUtils, gettext) {
|
||||
'use strict';
|
||||
|
||||
pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
|
||||
import {getNodeView, removeNodeView} from './node_view';
|
||||
import Notify from '../../../static/js/helpers/Notifier';
|
||||
import _ from 'lodash';
|
||||
import { pgHandleItemError } from '../../../static/js/utils';
|
||||
|
||||
define('pgadmin.browser.node', [
|
||||
'sources/url_for',
|
||||
'sources/gettext', 'jquery', 'underscore', 'sources/pgadmin',
|
||||
'pgadmin.browser.menu', 'backbone', 'pgadmin.alertifyjs', 'pgadmin.browser.datamodel',
|
||||
'sources/gettext', 'jquery', 'sources/pgadmin',
|
||||
'backbone', 'pgadmin.browser.datamodel',
|
||||
'backform', 'sources/browser/generate_url', 'pgadmin.help', 'sources/utils',
|
||||
'pgadmin.browser.utils', 'pgadmin.backform',
|
||||
], function(
|
||||
url_for,
|
||||
gettext, $, _, pgAdmin,
|
||||
Menu, Backbone, Alertify, pgBrowser,
|
||||
gettext, $, pgAdmin,
|
||||
Backbone, pgBrowser,
|
||||
Backform, generateUrl, help,
|
||||
commonUtils
|
||||
) {
|
||||
@@ -458,11 +458,10 @@ define('pgadmin.browser.node', [
|
||||
'pgadmin:node:retrieval:error', 'properties',
|
||||
xhr, options.textStatus, options.errorThrown, item
|
||||
);
|
||||
if (!Alertify.pgHandleItemError(
|
||||
xhr, options.textStatus, options.errorThrown, {
|
||||
item: item,
|
||||
info: info,
|
||||
}
|
||||
if (!pgHandleItemError(xhr, {
|
||||
item: item,
|
||||
info: info,
|
||||
}
|
||||
)) {
|
||||
Notify.pgNotifier(
|
||||
options.textStatus, xhr,
|
||||
@@ -1672,7 +1671,7 @@ define('pgadmin.browser.node', [
|
||||
type: 'cancel',
|
||||
tooltip: gettext('Cancel changes to this object.'),
|
||||
extraClasses: ['btn-secondary', 'mx-1'],
|
||||
icon: 'fa fa-times pg-alertify-button',
|
||||
icon: 'fa fa-times',
|
||||
disabled: false,
|
||||
register: function(btn) {
|
||||
btn.on('click',() => {
|
||||
@@ -1686,7 +1685,7 @@ define('pgadmin.browser.node', [
|
||||
type: 'reset',
|
||||
tooltip: gettext('Reset the fields on this dialog.'),
|
||||
extraClasses: ['btn-secondary', 'mx-1'],
|
||||
icon: 'fa fa-recycle pg-alertify-button',
|
||||
icon: 'fa fa-recycle',
|
||||
disabled: true,
|
||||
register: function(btn) {
|
||||
btn.on('click',() => {
|
||||
@@ -1706,7 +1705,7 @@ define('pgadmin.browser.node', [
|
||||
type: 'save',
|
||||
tooltip: gettext('Save this object.'),
|
||||
extraClasses: ['btn-primary', 'mx-1'],
|
||||
icon: 'fa fa-save pg-alertify-button',
|
||||
icon: 'fa fa-save',
|
||||
disabled: true,
|
||||
register: function(btn) {
|
||||
// Save the changes
|
||||
@@ -1975,7 +1974,7 @@ define('pgadmin.browser.node', [
|
||||
) || 0;
|
||||
|
||||
if (node_info) {
|
||||
_.each(_.sortBy(_.values(_.pick(
|
||||
_.each(_.sortBy(_.values(_.pickBy(
|
||||
node_info,
|
||||
function(v) {
|
||||
return (v.priority <= min_priority);
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
import _ from 'lodash';
|
||||
|
||||
define([
|
||||
'sources/gettext', 'jquery', 'underscore', 'sources/pgadmin', 'backbone', 'backform',
|
||||
'alertify', 'backgrid', 'select2', 'pgadmin.browser.node',
|
||||
], function(gettext, $, _, pgAdmin, Backbone, Backform, Alertify, Backgrid) {
|
||||
'sources/gettext', 'jquery', 'sources/pgadmin', 'backform',
|
||||
'backgrid', 'select2', 'pgadmin.browser.node',
|
||||
], function(gettext, $, pgAdmin, Backform, Backgrid) {
|
||||
|
||||
/*
|
||||
* Define the selectAll adapter for select2.
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import { getPanelView } from './panel_view';
|
||||
import _ from 'lodash';
|
||||
|
||||
define(
|
||||
['underscore', 'sources/pgadmin', 'jquery', 'wcdocker'],
|
||||
function(_, pgAdmin, $) {
|
||||
['sources/pgadmin', 'jquery', 'wcdocker'],
|
||||
function(pgAdmin, $) {
|
||||
|
||||
var pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {},
|
||||
wcDocker = window.wcDocker;
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
import pgAdmin from 'sources/pgadmin';
|
||||
import url_for from 'sources/url_for';
|
||||
import $ from 'jquery';
|
||||
import * as SqlEditorUtils from 'sources/sqleditor_utils';
|
||||
import pgWindow from 'sources/window';
|
||||
import Notify from '../../../static/js/helpers/Notifier';
|
||||
import { calcFontSize } from '../../../static/js/utils';
|
||||
|
||||
|
||||
const pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
|
||||
@@ -123,7 +124,7 @@ _.extend(pgBrowser, {
|
||||
let sqlEditPreferences = obj.get_preferences_for_module('sqleditor');
|
||||
|
||||
$(obj?.editor?.getWrapperElement()).css(
|
||||
'font-size',SqlEditorUtils.calcFontSize(sqlEditPreferences.sql_font_size)
|
||||
'font-size', calcFontSize(sqlEditPreferences.sql_font_size)
|
||||
);
|
||||
obj?.editor?.setOption('tabSize', sqlEditPreferences.tab_size);
|
||||
obj?.editor?.setOption('lineWrapping', sqlEditPreferences.wrap_code);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import gettext from 'sources/gettext';
|
||||
import _ from 'underscore';
|
||||
import _ from 'lodash';
|
||||
import pgAdmin from 'sources/pgadmin';
|
||||
|
||||
let _toolbarButtons = {};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
top: $title-height;
|
||||
bottom: $footer-height-calc; //similar to alertify footer
|
||||
bottom: $footer-height-calc;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
padding: $footer-padding
|
||||
}
|
||||
|
||||
/* match the alertify footer */
|
||||
/* match the footer */
|
||||
.pgadmin-wizard .wizard-footer {
|
||||
min-height: $footer-min-height;
|
||||
border: none;
|
||||
|
||||
Reference in New Issue
Block a user