1) Fix alignment of import/export toggle switch. Fixes #3963

2) Remove unnecessary options for toggle switch which are already the default options.
pull/21/head
Akshay Joshi 2019-02-06 16:45:18 +05:30
parent c888b282ea
commit 8f4d1f14f2
14 changed files with 14 additions and 60 deletions

View File

@ -0,0 +1,12 @@
***********
Version 4.3
***********
Release date: 2019-03-07
This release contains a number of fixes reported since the release of pgAdmin4 4.2
Bug fixes
*********
| `Bug #3963 <https://redmine.postgresql.org/issues/3963>`_ - Fix alignment of import/export toggle switch.

View File

@ -260,11 +260,6 @@ define('pgadmin.node.cast', [
},{
id: 'syscast', label: gettext('System cast?'),
cell: 'switch', type: 'switch', mode: ['properties'], disabled: true,
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
'size': 'small',
},
},{
id: 'description', label: gettext('Comment'),
type: 'multiline', cellHeaderClasses: 'width_percent_50',

View File

@ -205,11 +205,6 @@ define('pgadmin.node.extension', [
{
id: 'relocatable', label: gettext('Relocatable?'), cell: 'switch',
group: gettext('Definition'), type: 'switch', mode: ['properties'],
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
'size': 'small',
},
},
{
id: 'version', label: gettext('Version'), cell: 'string',

View File

@ -135,10 +135,6 @@ define('pgadmin.node.language', [
type: 'multiline',
},{
id: 'trusted', label: gettext('Trusted?'), type: 'switch',
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
group: gettext('Definition'), mode: ['edit', 'properties', 'create'], deps: ['name'],
disabled: function(m) {
if (m.isNew()) {

View File

@ -180,11 +180,6 @@ define('pgadmin.node.domain', [
},{
id: 'sysdomain', label: gettext('System domain?'), cell: 'boolean',
type: 'switch', mode: ['properties'],
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
'size': 'small',
},
},{
id: 'description', label: gettext('Comment'), cell: 'string',
type: 'multiline',
@ -261,10 +256,6 @@ define('pgadmin.node.domain', [
},{
id: 'typnotnull', label: gettext('Not Null?'), cell: 'boolean',
type: 'switch', group: gettext('Definition'),
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
},{
id: 'collname', label: gettext('Collation'), cell: 'string',
control: 'node-ajax-options', type: 'text', url: 'get_collations',

View File

@ -283,10 +283,6 @@ define('pgadmin.node.function', [
id: 'proisstrict', label: gettext('Strict?'), type: 'switch',
group: gettext('Options'), disabled: 'isDisabled',
deps: ['lanname'],
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
},{
id: 'prosecdef', label: gettext('Security of definer?'),
group: gettext('Options'), type: 'switch',

View File

@ -217,10 +217,6 @@ define('pgadmin.node.trigger_function', [
},{
id: 'proisstrict', label: gettext('Strict?'), type: 'switch',
disabled: 'isDisabled', group: gettext('Options'),
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
},{
id: 'prosecdef', label: gettext('Security of definer?'),
group: gettext('Options'), cell:'boolean', type: 'switch',

View File

@ -157,10 +157,6 @@ define('pgadmin.node.sequence', [
},{
id: 'cycled', label: gettext('Cycled'), type: 'switch',
mode: ['properties', 'create', 'edit'], group: gettext('Definition'),
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
}, pgBrowser.SecurityGroupSchema,{
id: 'acl', label: gettext('Privileges'), type: 'text',
group: gettext('Security'), mode: ['properties'], disabled: true,

View File

@ -147,8 +147,6 @@ define('pgadmin.node.index', [
deps: ['amname'],
options: {
'onText': 'DESC', 'offText': 'ASC',
'onColor': 'success', 'offColor': 'primary',
'size': 'small',
},
},{
id: 'nulls', label: gettext('NULLs'),
@ -170,8 +168,6 @@ define('pgadmin.node.index', [
deps: ['amname', 'sort_order'],
options: {
'onText': 'FIRST', 'offText': 'LAST',
'onColor': 'success', 'offColor': 'primary',
'size': 'small',
},
},
],

View File

@ -385,18 +385,10 @@ define('pgadmin.node.database', [
id: 'is_template', label: gettext('Template?'),
editable: false, type: 'switch', group: gettext('Definition'),
disabled: true, mode: ['properties', 'edit'],
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
},{
id: 'datallowconn', label: gettext('Allow connections?'),
editable: false, type: 'switch', group: gettext('Definition'),
mode: ['properties'], disabled: true,
options: {
'onText': gettext('Yes'), 'offText': gettext('No'),
'onColor': 'success', 'offColor': 'primary',
},
},{
id: 'datacl', label: gettext('Privileges'), type: 'collection',
model: pgBrowser.Node.PrivilegeRoleModel.extend({

View File

@ -415,7 +415,6 @@ define('pgadmin.node.role', [
},{
id: 'rolcanlogin', label: gettext('Can login?'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
group: gettext('Privileges'),
@ -423,7 +422,6 @@ define('pgadmin.node.role', [
},{
id: 'rolsuper', label: gettext('Superuser'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
group: gettext('Privileges'),
@ -441,7 +439,6 @@ define('pgadmin.node.role', [
id: 'rolcreaterole', label: gettext('Create roles?'),
group: gettext('Privileges'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
disabled: 'readonly',
@ -453,14 +450,12 @@ define('pgadmin.node.role', [
id: 'rolcreatedb', label: gettext('Create databases?'),
group: gettext('Privileges'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
disabled: 'readonly',
},{
id: 'rolcatupdate', label: gettext('Update catalog?'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
max_version: 90400,
@ -471,7 +466,6 @@ define('pgadmin.node.role', [
id: 'rolinherit', group: gettext('Privileges'),
label: gettext('Inherit rights from the parent roles?'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
disabled: 'readonly',
@ -479,7 +473,6 @@ define('pgadmin.node.role', [
id: 'rolreplication', group: gettext('Privileges'),
label: gettext('Can initiate streaming replication and backups?'),
type: 'switch',
options: {'onText': gettext('Yes'), 'offText': gettext('No')},
controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
min_version: 90100,

View File

@ -18,6 +18,7 @@
.toggle input[type="checkbox"] {
display: block;
opacity: 0;
margin-top: 0px !important;
}
.toggle:focus-within {

View File

@ -55,8 +55,7 @@ Backform, commonUtils, supportedNodes
options: {
'onText': gettext('Import'),
'offText': gettext('Export'),
'onColor': 'success',
'offColor': 'primary',
width: '65',
},
}, {
type: 'nested',

View File

@ -312,10 +312,6 @@ define([
type: 'switch',
cell: 'switch',
cellHeaderClasses: 'width_percent_10',
options: {
'onText': gettext('Yes'),
'offText': gettext('No'),
},
editable: function(m) {
if (m instanceof Backbone.Collection) {
return true;