Improvements in the UI for both default and dark themes. Fixes #5133

Improve the style of the highlighted code after query execution for Dark mode. Fixes #4996.
Changed background pattern for geometry viewer to use #fff for all themes. Fixes #5077
Changed the color of selected and hovered item for Select2 dropdown, also tweak the appearance of the tags in multi-select boxes. Fixes #4955
Fixed Firefox monospaced issue by updating the font to the latest version. Fixes #5184
This commit is contained in:
Aditya Toshniwal
2020-02-24 14:11:00 +05:30
committed by Akshay Joshi
parent 29c236c33d
commit 9bad590e9e
46 changed files with 369 additions and 182 deletions

View File

@@ -201,7 +201,7 @@ define('pgadmin.browser', [
isCloseable: false,
isPrivate: true,
elContainer: true,
content: '<div class="obj_properties container-fluid"><div role="status" class="alert alert-info pg-panel-message">' + select_object_msg + '</div></div>',
content: '<div class="obj_properties container-fluid"><div role="status" class="pg-panel-message">' + select_object_msg + '</div></div>',
events: panelEvents,
onCreate: function(myPanel, $container) {
$container.addClass('pg-no-overflow');
@@ -215,7 +215,7 @@ define('pgadmin.browser', [
width: 500,
isCloseable: false,
isPrivate: true,
content: '<div class="negative-space p-2"><div role="status" class="alert alert-info pg-panel-message pg-panel-statistics-message">' + select_object_msg + '</div><div class="pg-panel-statistics-container d-none"></div></div>',
content: '<div class="negative-space p-2"><div role="status" class="pg-panel-message pg-panel-statistics-message">' + select_object_msg + '</div><div class="pg-panel-statistics-container d-none"></div></div>',
events: panelEvents,
}),
// Reversed engineered SQL for the object
@@ -236,7 +236,7 @@ define('pgadmin.browser', [
width: 500,
isCloseable: false,
isPrivate: true,
content: '<div class="negative-space p-2"><div role="status" class="alert alert-info pg-panel-message pg-panel-depends-message">' + select_object_msg + '</div><div class="pg-panel-dependencies-container d-none"></div></div>',
content: '<div class="negative-space p-2"><div role="status" class="pg-panel-message pg-panel-depends-message">' + select_object_msg + '</div><div class="pg-panel-dependencies-container d-none"></div></div>',
events: panelEvents,
}),
// Dependents of the object
@@ -247,7 +247,7 @@ define('pgadmin.browser', [
width: 500,
isCloseable: false,
isPrivate: true,
content: '<div class="negative-space p-2"><div role="status" class="alert alert-info pg-panel-message pg-panel-depends-message">' + select_object_msg + '</div><div class="pg-panel-dependents-container d-none"></div></div>',
content: '<div class="negative-space p-2"><div role="status" class="pg-panel-message pg-panel-depends-message">' + select_object_msg + '</div><div class="pg-panel-dependents-container d-none"></div></div>',
events: panelEvents,
}),
},

View File

@@ -162,13 +162,18 @@ define([
},
render: function() {
let model = this.model.toJSON();
// canDrop can be set to false for individual row from the server side to disable the checkbox
if ('canDrop' in model && model.canDrop === false)
this.$el.empty().append('<input tabindex="-1" type="checkbox" title="Select" disabled="disabled"/>');
else
this.$el.empty().append('<input tabindex="-1" type="checkbox" title="Select" />');
let disabled = ('canDrop' in model && model.canDrop === false);
let id = `row-${_.uniqueId(model.oid || model.name)}`;
this.$el.empty().append(`
<div class="custom-control custom-checkbox custom-checkbox-no-label">
<input tabindex="-1" type="checkbox" class="custom-control-input" id="${id}" ${disabled?'disabled':''}/>
<label class="custom-control-label" for="${id}">
<span class="sr-only">Select<span>
</label>
</div>
`);
this.delegateEvents();
return this;
},
@@ -216,7 +221,7 @@ define([
j.empty();
j.data('obj-view', gridView);
$msgContainer = '<div role="status" class="alert alert-info pg-panel-message pg-panel-properties-message">' +
$msgContainer = '<div role="status" class="pg-panel-message pg-panel-properties-message">' +
gettext('Retrieving data from the server...') + '</div>';
$msgContainer = $($msgContainer).appendTo(j);

View File

@@ -396,7 +396,7 @@ define('pgadmin.browser.node', [
if (!newModel.isNew()) {
// This is definetely not in create mode
var msgDiv = '<div role="status" class="alert alert-info pg-panel-message pg-panel-properties-message">' +
var msgDiv = '<div role="status" class="pg-panel-message pg-panel-properties-message">' +
gettext('Retrieving data from the server...') + '</div>',
$msgDiv = $(msgDiv);
var timer = setTimeout(function(ctx) {
@@ -500,7 +500,7 @@ define('pgadmin.browser.node', [
isPrivate: true,
isLayoutMember: false,
elContainer: true,
content: '<div class="obj_properties container-fluid"><div role="status" class="alert alert-info pg-panel-message">' + gettext('Please wait while we fetch information about the node from the server...') + '</div></div>',
content: '<div class="obj_properties container-fluid"><div role="status" class="pg-panel-message">' + gettext('Please wait while we fetch information about the node from the server...') + '</div></div>',
onCreate: function(myPanel, $container) {
$container.addClass('pg-no-overflow');
},

View File

@@ -100,7 +100,7 @@ define([
' <% } %>' +
' <div class="col-sm-<% if (this.options.show_left_panel) { %>9<% }' +
' else { %>12<% } %> wizard-right-panel">' +
' <% if ( typeof show_description != "undefined"){ %>' +
' <% if ( typeof show_description != "undefined" && show_description != ""){ %>' +
' <div class="wizard-description">' +
' <%= show_description %>' +
' </div>' +