mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following:
- Base font size changed from 0.815rem to 0.875rem, for navbar from 0.875rem to 0.925rem. - Dialog sizes made consistent throughout the application. Now there are 3 size options for width and height each - sm, md, lg. Combination of any of these to be used hereafter - Alignment fix for controls of Node properties dialogs which includes showing text and label in one line without dialog size change, checkbox alignment, switch control alignment at places and other minor improvements in other dialogs - Error message design change in dialogs validation - SQL Editor data grid editor popup design changes which were missed - Design change for dashboard server activity grid - Login page language dropdown color fix - Properties accordion collapse design fix - Help, Info icon fixed across all dialogs which were not working if clicked exactly on the text - Added missing icon with buttons at few places - Shadow behind the dialogs is increased to make it look clearly separated and depth. - Control Alignment fix in maintenance dialog - Min height of alertify dialogs set for better UX - File dialog design fix when no files found - Grant wizard fixes - Scroll bar visibility on first page, use full space for SQL generated on the last page - Browser toolbar buttons changed to sync with SQL editor toolbar buttons - Rounded corners for docker floating dialog (no properties) - Renaming file in file dialog should show original file name - SQL data grid text edit popup buttons behaviour was swapped. This is fixed. - Import/Export dialog changes as per new design.
This commit is contained in:
committed by
Akshay Joshi
parent
1b9c841c15
commit
86ecf9c84e
@@ -108,6 +108,19 @@ define('pgadmin.browser', [
|
||||
// It will be used to register extensions, tools, child node scripts,
|
||||
// etc.
|
||||
scripts: {},
|
||||
// Standard Widths and Height for dialogs in px
|
||||
stdW: {
|
||||
sm: 500,
|
||||
md: 700,
|
||||
lg: 900,
|
||||
default: 500,
|
||||
},
|
||||
stdH: {
|
||||
sm: 200,
|
||||
md: 400,
|
||||
lg: 550,
|
||||
default: 550,
|
||||
},
|
||||
// Default panels
|
||||
panels: {
|
||||
// Panel to keep the left hand browser tree
|
||||
|
||||
@@ -313,18 +313,19 @@ define('pgadmin.browser.node', [
|
||||
}
|
||||
|
||||
var onSessionInvalid = function(msg) {
|
||||
var alertMessage = '\
|
||||
<div class="media error-in-footer bg-danger-light border-danger text-danger text-14">\
|
||||
<div class="media-body media-middle">\
|
||||
<div class="alert-icon error-icon">\
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>\
|
||||
</div>\
|
||||
<div class="alert-text">' + msg + '</div>\
|
||||
<div class="close-error-bar">\
|
||||
<a class="close-error">x</a>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>';
|
||||
var alertMessage = `
|
||||
<div class="error-in-footer">
|
||||
<div class="d-flex px-2 py-1">
|
||||
<div class="pr-2">
|
||||
<i class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="alert-text">${msg}</div>
|
||||
<div class="ml-auto close-error-bar">
|
||||
<a class="close-error fa fa-times text-danger"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
if (!_.isUndefined(that.statusBar)) {
|
||||
that.statusBar.html(alertMessage).css('visibility', 'visible');
|
||||
that.statusBar.find('a.close-error').bind('click', function() {
|
||||
@@ -558,12 +559,43 @@ define('pgadmin.browser.node', [
|
||||
|
||||
d.body.insertBefore(el, d.body.firstChild);
|
||||
|
||||
var pW = screen.width < 800 ? '95%' : '500px',
|
||||
pH = screen.height < 600 ? '95%' : '550px',
|
||||
w = pgAdmin.toPx(el, self.width || pW, 'width', true),
|
||||
h = pgAdmin.toPx(el, self.height || pH, 'height', true),
|
||||
x = (b.offsetWidth - w) / 2,
|
||||
y = (b.offsetHeight - h) / 2;
|
||||
let w, h, x, y;
|
||||
if(screen.width < 800) {
|
||||
w= pgAdmin.toPx(el, '95%', 'width', true);
|
||||
} else {
|
||||
w= pgAdmin.toPx(el, self.width || pgBrowser.stdW.default+'px', 'width', true);
|
||||
|
||||
/* Fit to standard sizes */
|
||||
if(w <= pgBrowser.stdW.sm) {
|
||||
w = pgBrowser.stdW.sm;
|
||||
} else {
|
||||
if(w <= pgBrowser.stdW.md) {
|
||||
w = pgBrowser.stdW.md;
|
||||
} else {
|
||||
w = pgBrowser.stdW.lg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(screen.height < 600) {
|
||||
h = pgAdmin.toPx(el, '95%', 'height', true);
|
||||
} else {
|
||||
h = pgAdmin.toPx(el, self.height || pgBrowser.stdH.default+'px', 'height', true);
|
||||
|
||||
/* Fit to standard sizes */
|
||||
if(h <= pgBrowser.stdH.sm) {
|
||||
h = pgBrowser.stdH.sm;
|
||||
} else {
|
||||
if(h <= pgBrowser.stdH.md) {
|
||||
h = pgBrowser.stdH.md;
|
||||
} else {
|
||||
h = pgBrowser.stdH.lg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
x = (b.offsetWidth - w) / 2,
|
||||
y = (b.offsetHeight - h) / 4;
|
||||
|
||||
var p = pgBrowser.docker.addPanel(
|
||||
'node_props', wcDocker.DOCK.FLOAT, undefined, {
|
||||
@@ -1319,7 +1351,7 @@ define('pgadmin.browser.node', [
|
||||
|
||||
var btnGroup = this.find('.pg-prop-btn-group'),
|
||||
btnSave = btnGroup.find('button.btn-primary'),
|
||||
btnReset = btnGroup.find('button.btn-warning');
|
||||
btnReset = btnGroup.find('button.btn-secondary[type="reset"]');
|
||||
|
||||
if (hasError || !modified) {
|
||||
btnSave.prop('disabled', true);
|
||||
|
||||
@@ -142,10 +142,10 @@ define(
|
||||
p.pgResizeTimeout = null;
|
||||
|
||||
/** Calculations based on https://getbootstrap.com/docs/4.1/layout/grid/#grid-options **/
|
||||
if (w < 576) {
|
||||
if (w < 480) {
|
||||
w = 'xs';
|
||||
}
|
||||
if (w >= 576) {
|
||||
if (w >= 480) {
|
||||
w = 'sm';
|
||||
}
|
||||
if (w >= 768) {
|
||||
|
||||
@@ -13,6 +13,7 @@ let _defaultToolBarButtons = [
|
||||
text: '',
|
||||
toggled: false,
|
||||
toggleClass: '',
|
||||
parentClass: 'pg-toolbar-btn',
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
@@ -21,6 +22,7 @@ let _defaultToolBarButtons = [
|
||||
text: '',
|
||||
toggled: false,
|
||||
toggleClass: '',
|
||||
parentClass: 'pg-toolbar-btn',
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
@@ -29,6 +31,7 @@ let _defaultToolBarButtons = [
|
||||
text: '',
|
||||
toggled: false,
|
||||
toggleClass: '',
|
||||
parentClass: 'pg-toolbar-btn',
|
||||
enabled: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -106,20 +106,19 @@ define([
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="wizard-footer pg-prop-footer">' +
|
||||
' <div class="pg-prop-status-bar" style="visibility:hidden">' +
|
||||
' <div class="media error-in-footer bg-danger-light border-danger text-danger text-14">' +
|
||||
' <div class="media-body media-middle">' +
|
||||
' <div class="alert-icon error-icon">' +
|
||||
' <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>' +
|
||||
' </div>' +
|
||||
' <div class="alert-text">' +
|
||||
' </div>' +
|
||||
' <div class="close-error-bar">' +
|
||||
' <a class="close-error">x</a>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="pg-prop-status-bar" style="visibility:hidden">' +
|
||||
' <div class="error-in-footer"> ' +
|
||||
' <div class="d-flex px-2 py-1"> ' +
|
||||
' <div class="pr-2"> ' +
|
||||
' <i class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></i> ' +
|
||||
' </div> ' +
|
||||
' <div class="alert-text"></div> ' +
|
||||
' <div class="ml-auto close-error-bar"> ' +
|
||||
' <a class="close-error fa fa-times text-danger"></a> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
' </div>' +
|
||||
' <div class="wizard-buttons d-flex">' +
|
||||
' <div>' +
|
||||
' <button title = "' + gettext('Help for this dialog.') + '"' +
|
||||
@@ -128,14 +127,14 @@ define([
|
||||
' </div>' +
|
||||
' <div class="ml-auto">' +
|
||||
' <button class="btn btn-secondary wizard-cancel" <%=this.options.disable_cancel ? "disabled" : ""%>>' +
|
||||
' <i class="fa fa-lg fa-close"></i>' + gettext('Cancel') + '</button>' +
|
||||
' <i class="fa fa-close"></i> ' + gettext('Cancel') + '</button>' +
|
||||
' <button class="btn btn-secondary wizard-back" <%=this.options.disable_prev ? "disabled" : ""%>>' +
|
||||
' <i class="fa fa-backward"></i>' + gettext('Back') + '</button>' +
|
||||
' <i class="fa fa-backward"></i> ' + gettext('Back') + '</button>' +
|
||||
' <button class="btn btn-secondary wizard-next" <%=this.options.disable_next ? "disabled" : ""%>>' +
|
||||
' ' + gettext('Next') +
|
||||
' <i class="fa fa-forward"></i></button>' +
|
||||
' <i class="fa fa-forward"></i></button>' +
|
||||
' <button class="btn btn-primary wizard-finish" <%=this.options.disable_finish ? "disabled" : ""%>>' +
|
||||
' ' + gettext('Finish') + '</button>' +
|
||||
' <i class="fa fa-check"></i> ' + gettext('Finish') + '</button>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
|
||||
Reference in New Issue
Block a user