Files
pgadmin4/web/pgadmin/static/scss/_backgrid.overrides.scss
T
Aditya Toshniwal 014ce31589 Fixed user management related issues:
1) Unable to add a user when there are many users. The dialog went blank. Fixed.
 2) The error message did not have a close button. Fixed.
 3) When clicked on the add button, then the cursor will focus on the email box of
    the new row for convenience.
 4) When the dialog opens, the cursor will focus on the search text box.
 5) By default, the "User" role will be selected when adding a new user.
    Also removed an empty option in the roles dropdown.
 6) When the search filter is applied and we try to add an already existing user, the
    validation is done only on the filtered data and not on all the users' data. 

Fixes #5227
2020-04-10 16:49:33 +05:30

354 lines
6.7 KiB
SCSS

.backgrid th, .backgrid td {
text-align: left;
line-height: $line-height-base;
}
.backgrid td {
font-weight: normal!important;
}
.backgrid.table th.sortable > button {
width: 100%;
text-align: left;
cursor: pointer;
}
.backgrid .ascending .sort-caret {
border-bottom-color: $color-fg;
}
.backgrid .descending .sort-caret {
border-top-color: $color-fg;
}
.backgrid.backgrid-striped tbody {
& tr:nth-child(even) {
background: $table-bg;
& td.editor {
background: $table-bg;
outline: none;
}
}
& tr:nth-child(odd) {
background: $table-bg;
& td.editor {
background: $table-bg;
outline: none;
}
}
}
.backgrid tbody tr.empty td {
display: table-cell;
font-style: normal;
color: $text-muted;
}
.backgrid .textarea-cell {
text-align: left;
}
.backgrid .textarea-cell.editor textarea {
width: 100%;
height: auto;
}
/* Override Backgrid's default z-index */
.dashboard-tab-container .backgrid-filter .search {
z-index: 10 !important;
}
.dashboard-tab-container .backgrid-filter .clear {
z-index: 10 !important;
}
.backgrid .string-cell.editor input[type=password] {
text-align: left;
}
.backgrid > tbody > td.editor input[type=password] {
display: block;
width: 100%;
height: 100%;
padding: 0 5px;
margin: 0;
background-color: transparent;
border: 0;
outline: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
}
.backgrid {
border-radius: inherit;
}
.backgrid thead td,
.backgrid thead th{
background: $table-bg;
background-color: $table-bg !important;
text-align: left;
}
.backgrid:not(.presentation) td.renderable:not(.editable):not(.delete-cell) {
background-color: $color-gray-lighter;
// if transparent border then setting color will help
border-bottom-color: $color-gray-lighter;
}
.backgrid tr.header td.renderable:not(.editable):not(.delete-cell) {
background-color: $color-gray-light;
}
.backgrid:not(.presentation) td.renderable.editable:not(.delete-cell):not(.edit-cell) {
background-color: $input-bg;
}
.sql-editor-grid-container .backgrid > thead > th.renderable,
.sql-editor-grid-container .backgrid > tbody > td.renderable {
white-space: pre-wrap;
}
.backgrid > thead > th.renderable {
font-weight: bold;
}
table.backgrid {
position: initial;
}
.backgrid td.editor input[type=password] {
display: block;
width: 100%;
height: 100%;
padding: 0 5px;
margin: 0;
background-color: transparent;
border: 0;
outline: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
}
.backgrid td.editor input[type=password]::-ms-clear {
display: none;
}
.enable-selection, .form-control, .backgrid td, .ajs-content {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
/* Latest backgrid adds column name like `label` to td element, override color*/
.backgrid td.label {
color: $color-fg;
font-size: $font-size-base;
font-weight: normal;
}
.subnode {
border: $panel-border;
background: $color-bg;
}
.subnode-noouter-border {
border: none !important;
}
.subnode > table.backgrid > thead > tr > th:last-child {
border-right-color: $color-primary;
}
.subnode > table.backgrid {
width: 100%;
margin: 0px;
padding: 0;
}
.subnode-header button {
border-left: 1px solid $border-color;
border-bottom-width: 0px !important;
border-top-width: 0px !important;
border-right-width: 0px !important;
border-radius: 0px !important;
text-align: center !important;
padding: 8px 8px !important;
min-height: 31px !important;
margin: 0px !important;
}
.subnode-header .control-label {
min-height: 31px;
font-weight: bold;
}
.subnode-footer {
text-align: right;
border-color: $color-gray-light;
border-style: inset inset inset solid;
border-width: 2px 1px 0;
margin-top: -10px;
}
.subnode-footer .ajs-button {
margin: 2px 2px 0;
}
/* Sub-Node */
.edit-cell, .delete-cell {
text-align:center !important;
width:25px;
height:29px !important;
}
.subnode-header {
background-color: $header-bg;
color: $color-fg;
border-bottom: $panel-border;
}
.subnode-header > button.add {
float: right;
margin-right: 3px;
margin-bottom: 3px;
margin-top: 5px;
}
.subnode-dialog {
bottom: 0;
left: 0;
overflow-x: auto;
overflow-y: auto;
right: 0;
height: auto;
margin-top: 0px;
}
.subnode-body {
height: auto;
overflow: inherit;
background-color: $color-bg;
border: 1px solid $border-color;
border-radius: $panel-border-radius;
& .tab-pane {
padding: 0.5rem;
}
& .tab-content {
padding: 0px;
}
fieldset.inline-fieldset {
background: $color-bg;
}
}
.subnode-footer {
height: 38px;
margin: 0px, 15px;
min-height: 40px;
vertical-align: bottom;
}
.sub-node-form {
height: auto;
padding-left: 0rem !important;
padding-right: 0rem !important;
}
.sub-node-form > ul.tab-content{
background-color: $color-bg;
padding-left: 15px;
left: 1px;
}
.subnode-header-form {
background-color: $color-gray-lighter;
padding: 7px;
border-bottom: $panel-border;
}
.subnode-header-form button.add {
float: right;
margin-right: 0px;
}
.subnode-error .help-block {
color: $color-danger;
}
table.backgrid {
overflow: auto;
}
.backgrid tbody {
& td.edit-cell.editor {
background-color: $color-gray-light !important;
border-bottom-color: $color-gray-light !important;
outline: none !important;
}
& td.editor {
background-color: $color-bg !important;
color: $color-fg !important;
& input {
color: $color-fg !important;
}
}
& td.edit-cell.editor:focus {
outline: $input-focus-border-color auto 5px !important;
}
& td.select-cell.editor select{
outline: none !important;
height: 100% !important;
width: 100% !important;
}
tr.editor-row {
background-color: $color-gray-light !important;
& > td {
padding: 15px !important;
background-color: $color-gray-light !important;
border-top: none !important;
border-bottom-color: $color-gray-light !important;
}
}
}
table tr th button {
font-weight: bold;
}
.custom-control.custom-checkbox.custom-checkbox-no-label {
padding-left: 0;
.custom-control-label {
// set same width/height as before and after
width: 1em;
height: 1em;
&::before,
&::after {
left: 0;
}
}
}