Further styling fixes.

This commit is contained in:
Aditya Toshniwal authored and Dave Page committed 2019-01-03 14:50:24 +00:00
1 parent 1283c22bb9
commit 7d765fea04
15 files changed
+193 -45

No files matched your search

+1 -1
View File
@@ -368,7 +368,7 @@ define('pgadmin.browser.node', [
if (formType == 'fieldset') { if (formType == 'fieldset') {
// It is used to show, edit, create the object in the // It is used to show, edit, create the object in the
// properties tab. // properties tab.
view = new Backform.Fieldset({ view = new Backform.Accordian({
el: el, el: el,
model: newModel, model: newModel,
schema: fields, schema: fields,
+3 -4
View File
@@ -221,14 +221,13 @@ def file_manager_js():
mimetype="application/javascript") mimetype="application/javascript")
@blueprint.route("/en.js") @blueprint.route("/en.json")
@login_required @login_required
def language(): def language():
"""render the required javascript""" """render the required javascript"""
return Response(response=render_template( return Response(response=render_template(
"file_manager/js/languages/en.js", _=gettext), "file_manager/js/languages/en.json", _=gettext),
status=200, status=200)
mimetype="application/javascript")
@blueprint.route("/file_manager_config.js") @blueprint.route("/file_manager_config.js")
@@ -36,7 +36,7 @@ define([
}; };
/* Common function to load: /* Common function to load:
* en.js language file * en.json language file
* file_manager_config.js config file * file_manager_config.js config file
* return transaction id * return transaction id
*/ */
@@ -585,7 +585,7 @@ define([
result += '</ul>'; result += '</ul>';
} else { } else {
result += '<table id="contents" class="table table-bordered table-noouter-border table-bottom-border table-hover tablesorter">'; result += '<table id="contents" class="table table-bordered table-noouter-border table-bottom-border table-hover tablesorter file_listing_table">';
result += '<thead><tr><th>'; result += '<thead><tr><th>';
result += '<span>' + lg.name + '</span></th>'; result += '<span>' + lg.name + '</span></th>';
result += '<th><span>' + lg.size + '</span></th><th>'; result += '<th><span>' + lg.size + '</span></th><th>';
@@ -1096,8 +1096,8 @@ define([
*/ */
var lg = [], var lg = [],
enjs = url_for('file_manager.index') + 'en.js', enjson = url_for('file_manager.index') + 'en.json',
lgf = loadData(enjs); lgf = loadData(enjson);
if (lgf.readyState == 4) { if (lgf.readyState == 4) {
this.lg = lg = JSON.parse(lgf.responseText); this.lg = lg = JSON.parse(lgf.responseText);
@@ -5,6 +5,58 @@
.file_listing { .file_listing {
min-width: 100%; min-width: 100%;
.file_listing_table {
height: 100%;
display: block;
padding: 0;
overflow-y: hidden !important;
}
.file_listing_table thead {
display: table;
width: 100%;
}
.file_listing_table thead tr {
position: relative;
display: block;
width: 100%;
border-bottom: $panel-border;
}
.file_listing_table tbody {
display: block;
overflow: auto;
width: 100%;
/* 100% minus thead height */
height: calc(100% - 30px);
}
.file_listing_table tbody tr {
max-width: 100%;
width: 100%;
}
.file_listing_table tbody tr td:nth-child(1),
.file_listing_table thead tr th:nth-child(1) {
width: 100%;
min-width: 100%;
}
.file_listing_table tbody tr td:nth-child(2),
.file_listing_table thead tr th:nth-child(2) {
width: 100px;
min-width: 100px;
max-width: 100px;
}
.file_listing_table tbody tr td:nth-child(3),
.file_listing_table thead tr th:nth-child(3) {
width: 200px;
min-width: 200px;
max-width: 200px;
}
} }
.file_listing #contents.grid li:hover, .file_listing #contents.grid li:hover,
@@ -1,12 +1,3 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2019, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
{ {
"LANGUAGE_FILE_NOT_FOUND": "Language file not found.", "LANGUAGE_FILE_NOT_FOUND": "Language file not found.",
"upload_success": "File uploaded successfully.", "upload_success": "File uploaded successfully.",
+81 -3
View File
@@ -38,6 +38,8 @@ define([
setGroupClassName: 'set-group pg-el-12', setGroupClassName: 'set-group pg-el-12',
tabClassName: 'backform-tab pg-el-12', tabClassName: 'backform-tab pg-el-12',
setGroupContentClassName: 'fieldset-content pg-el-12', setGroupContentClassName: 'fieldset-content pg-el-12',
accordianGroupClassName: 'accordian-group pg-el-12',
accordianContentClassName: 'accordian-content pg-el-12',
hiddenClassName: 'd-none', hiddenClassName: 'd-none',
}); });
@@ -429,12 +431,14 @@ define([
offColor: 'primary', offColor: 'primary',
size: 'small', size: 'small',
}, },
controlLabelClassName: Backform.controlLabelClassName,
controlsClassName: Backform.controlsClassName,
extraClasses: [], extraClasses: [],
helpMessage: null, helpMessage: null,
}, },
template: _.template([ template: _.template([
'<label class="<%=Backform.controlLabelClassName%>"><%=label%></label>', '<label class="<%=controlLabelClassName%>"><%=label%></label>',
'<div class="<%=Backform.controlsClassName%>">', '<div class="<%=controlsClassName%>">',
' <div class="checkbox">', ' <div class="checkbox">',
' <label>', ' <label>',
' <input type="checkbox" class="<%=extraClasses.join(\' \')%>" name="<%=name%>" <%=value ? "checked=\'checked\'" : ""%> <%=disabled ? "disabled" : ""%> <%=required ? "required" : ""%> />', ' <input type="checkbox" class="<%=extraClasses.join(\' \')%>" name="<%=name%>" <%=value ? "checked=\'checked\'" : ""%> <%=disabled ? "disabled" : ""%> <%=required ? "required" : ""%> />',
@@ -636,6 +640,80 @@ define([
}, },
}); });
Backform.Accordian = Backform.Dialog.extend({
className: function() {
return 'set-group pg-el-12';
},
tabPanelClassName: function() {
return Backform.tabClassName;
},
legendClass: 'badge',
contentClass: Backform.accordianContentClassName + ' collapse show',
template: {
'header': _.template([
'<div class="<%=Backform.accordianGroupClassName%>" <%=disabled ? "disabled" : ""%>>',
' <% if (legend != false) { %>',
' <div class="<%=legendClass%>" <%=collapse ? "data-toggle=\'collapse\'" : ""%> data-target="#<%=cId%>"><%=collapse ? "<span class=\'caret\'></span>" : "" %><%=label%></legend>',
' <% } %>',
'</div>',
].join('\n')),
'content': _.template(
' <div id="<%= cId %>" class="<%=contentClass%>"></div>'
),
},
collapse: true,
render: function() {
this.cleanup();
var m = this.model,
$el = this.$el,
tmpl = this.template,
controls = this.controls,
data = {
'className': _.result(this, 'className'),
'legendClass': _.result(this, 'legendClass'),
'contentClass': _.result(this, 'contentClass'),
'collapse': _.result(this, 'collapse'),
},
idx = (this.tabIndex * 100),
evalF = function(f, d, m) {
return (_.isFunction(f) ? !!f.apply(d, [m]) : !!f);
};
this.$el.empty();
_.each(this.schema, function(o) {
idx++;
if (!o.version_compatible || !evalF(o.visible, o, m)) {
return;
}
if (!o.fields)
return;
var d = _.extend({}, data, o),
h = $((tmpl['header'])(d)).appendTo($el),
el = $((tmpl['content'])(d)).appendTo(h);
o.fields.each(function(f) {
var cntr = new(f.get('control'))({
field: f,
model: m,
tabIndex: idx,
});
el.append(cntr.render().$el);
controls.push(cntr);
});
});
return this;
},
getValueFromDOM: function() {
return '';
},
events: {},
});
Backform.Fieldset = Backform.Dialog.extend({ Backform.Fieldset = Backform.Dialog.extend({
className: function() { className: function() {
return 'set-group pg-el-12'; return 'set-group pg-el-12';
@@ -650,7 +728,7 @@ define([
'header': _.template([ 'header': _.template([
'<fieldset class="<%=fieldsetClass%>" <%=disabled ? "disabled" : ""%>>', '<fieldset class="<%=fieldsetClass%>" <%=disabled ? "disabled" : ""%>>',
' <% if (legend != false) { %>', ' <% if (legend != false) { %>',
' <div><legend class="<%=legendClass%>" <%=collapse ? "data-toggle=\'collapse\'" : ""%> data-target="#<%=cId%>"><%=collapse ? "<span class=\'caret\'></span>" : "" %><%=label%></legend></div>', ' <legend class="<%=legendClass%>" <%=collapse ? "data-toggle=\'collapse\'" : ""%> data-target="#<%=cId%>"><%=collapse ? "<span class=\'caret\'></span>" : "" %><%=label%></legend>',
' <% } %>', ' <% } %>',
'</fieldset>', '</fieldset>',
].join('\n')), ].join('\n')),
@@ -48,16 +48,11 @@
} }
.backform_control_notes { .backform_control_notes {
background-color: $color-gray-lighter; border: $panel-border;
border: 1px solid $color-gray-light; border-radius: $border-radius;
border-radius: 3px;
color: $color-gray-dark;
display: block;
font-family: $font-family-editor; font-family: $font-family-editor;
font-size: 12px; font-size: 0.8rem;
line-height: 1.42857;
margin: 0 0 10px; margin: 0 0 10px;
overflow: auto;
padding: 5px 10px; padding: 5px 10px;
word-wrap: break-word; word-wrap: break-word;
} }
@@ -69,6 +64,6 @@ div.backform_control_notes label.control-label {
max-width: 90% !important; max-width: 90% !important;
} }
.set-group { .set-group, .accordian-group {
margin-bottom: $form-group-margin-bottom; margin-bottom: $form-group-margin-bottom;
} }
@@ -268,13 +268,18 @@ table.backgrid {
} }
.backgrid tbody { .backgrid tbody {
& td.editor { & td.edit-cell.editor {
background-color: $color-gray-light !important; background-color: $color-gray-light !important;
border-bottom-color: $color-gray-light !important; border-bottom-color: $color-gray-light !important;
outline: none !important; outline: none !important;
} }
& td.editor {
background-color: $color-bg-theme !important;
}
tr.editor-row { tr.editor-row {
background-color: $color-gray-light !important;
& > td { & > td {
padding: 15px !important; padding: 15px !important;
background-color: $color-gray-light !important; background-color: $color-gray-light !important;
@@ -127,18 +127,27 @@
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 2px; padding: 0px;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); -webkit-box-shadow: $dropdown-box-shadow;
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); -moz-box-shadow: $dropdown-box-shadow;
box-shadow: 2px 3px 5px rgba(0,0,0,.2); box-shadow: $dropdown-box-shadow;
border-radius: 3px; border-radius: $border-radius;
border: 1px solid $border-color; border: $panel-border;
background: $color-bg-theme; background: $sql-hint-bg;
font-size: 90%; font-size: 90%;
font-family: $font-family-editor; font-family: $font-family-editor;
max-height: 20em; max-height: 20em;
overflow-y: auto; overflow-y: auto;
}
& li {
padding: 0.125rem;
border-radius: 0rem;
&.CodeMirror-hint-active {
background: $sql-hint-active-bg;
color: $sql-hint-active-fg;
}
}
}
+11 -1
View File
@@ -363,6 +363,10 @@
padding: 5px 10px; padding: 5px 10px;
} }
.obj_properties .accordian-group > .accordian-content {
padding: 5px 10px;
}
.obj_properties .badge { .obj_properties .badge {
display: block; display: block;
text-align: left; text-align: left;
@@ -409,15 +413,21 @@
.obj_properties .set-group { .obj_properties .set-group {
margin: 0.5rem 0rem; margin: 0.5rem 0rem;
padding: 0rem; padding: 0rem;
}
.obj_properties .accordian-group {
margin: 0.5rem 0rem;
padding: 0rem;
border: $panel-border; border: $panel-border;
border-radius: $card-border-radius; border-radius: $card-border-radius;
background-color: $color-bg; background-color: $color-bg-theme;
} }
fieldset.inline-fieldset { fieldset.inline-fieldset {
padding: 10px; padding: 10px;
border-radius: $card-border-radius; border-radius: $card-border-radius;
background: $color-gray-light; background: $color-gray-light;
border: $panel-border;
& legend { & legend {
font-size: 0.875rem; font-size: 0.875rem;
font-weight: bold; font-weight: bold;
@@ -174,6 +174,9 @@ $sql-history-success-bg: $color-primary-light;
$sql-history-success-fg: $color-primary; $sql-history-success-fg: $color-primary;
$sql-history-error-bg: $color-danger-lighter; $sql-history-error-bg: $color-danger-lighter;
$sql-history-error-fg: $color-danger; $sql-history-error-fg: $color-danger;
$sql-hint-bg: $color-bg-theme;
$sql-hint-active-bg: $color-primary;
$sql-hint-active-fg: $white;
$negative-bg: $color-gray-light; $negative-bg: $color-gray-light;
$dialog-box-shadow: $box-shadow; $dialog-box-shadow: $box-shadow;
@@ -8,7 +8,7 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="panel-header h4"><i class="app-icon pg-icon-blue"></i> {{ _('%(appname)s', appname=config.APP_NAME) }}</div> <div class="panel-header h4"><i class="app-icon pg-icon-blue"></i> {{ _('%(appname)s', appname=config.APP_NAME) }}</div>
<div class="panel-body"> <div class="panel-body">
<div class="d-block text-color pb-3 h5">{{ _('Password Change', appname=config.APP_NAME) }}</div> <div class="d-block text-color pb-3 h5">{{ _('Password Change') }}</div>
{% if config.SERVER_MODE %} {% if config.SERVER_MODE %}
<form action="{{ url_for('browser.change_password') }}" method="POST" name="change_password_form"> <form action="{{ url_for('browser.change_password') }}" method="POST" name="change_password_form">
{{ change_password_form.hidden_tag() }} {{ change_password_form.hidden_tag() }}
+5 -2
View File
@@ -45,8 +45,8 @@ define([
Backform.CustomSwitchControl = Backform.SwitchControl.extend({ Backform.CustomSwitchControl = Backform.SwitchControl.extend({
template: _.template([ template: _.template([
'<label class="<%=Backform.controlLabelClassName%> custom_switch_label_class"><%=label%></label>', '<label class="<%=controlLabelClassName%> custom_switch_label_class"><%=label%></label>',
'<div class="<%=Backform.controlsClassName%> custom_switch_control_class">', '<div class="<%=controlsClassName%> custom_switch_control_class">',
' <div class="checkbox">', ' <div class="checkbox">',
' <label>', ' <label>',
' <input type="checkbox" class="<%=extraClasses.join(\' \')%>"', ' <input type="checkbox" class="<%=extraClasses.join(\' \')%>"',
@@ -93,6 +93,7 @@ define([
type: 'nested', type: 'nested',
control: 'fieldset', control: 'fieldset',
label: gettext('Miscellaneous'), label: gettext('Miscellaneous'),
contentClass: 'row',
schema: [{ schema: [{
id: 'verbose', id: 'verbose',
label: gettext('Verbose messages'), label: gettext('Verbose messages'),
@@ -105,6 +106,8 @@ define([
control: Backform.CustomSwitchControl, control: Backform.CustomSwitchControl,
disabled: false, disabled: false,
group: gettext('Miscellaneous'), group: gettext('Miscellaneous'),
controlLabelClassName: 'control-label pg-el-sm-6 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-6 pg-el-12',
}], }],
}, { }, {
id: 'globals_note', id: 'globals_note',
@@ -949,7 +949,7 @@ define([
this.grid.listenTo(this.debuggerInputArgsColl, 'backgrid:error', this.grid.listenTo(this.debuggerInputArgsColl, 'backgrid:error',
(function(obj) { (function(obj) {
return function() { return function() {
obj.__internal.buttons[0].element.disabled = true; obj.__internal.buttons[1].element.disabled = true;
}; };
})(this) })(this)
); );
@@ -3435,6 +3435,9 @@ define('tools.querytool', [
disable_tool_buttons: function(disabled) { disable_tool_buttons: function(disabled) {
$('#btn-clear').prop('disabled', disabled); $('#btn-clear').prop('disabled', disabled);
$('#btn-query-dropdown').prop('disabled', disabled); $('#btn-query-dropdown').prop('disabled', disabled);
$('#btn-explain').prop('disabled', disabled);
$('#btn-explain-analyze').prop('disabled', disabled);
$('#btn-explain-options-dropdown').prop('disabled', disabled);
$('#btn-edit-dropdown').prop('disabled', disabled); $('#btn-edit-dropdown').prop('disabled', disabled);
$('#btn-edit').prop('disabled', disabled); $('#btn-edit').prop('disabled', disabled);
$('#btn-load-file').prop('disabled', disabled); $('#btn-load-file').prop('disabled', disabled);