mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where like options should be disabled if the relation is not selected while creating a table. Fixes #4504
This commit is contained in:
parent
6642860d51
commit
ef58d277ca
@ -41,6 +41,7 @@ Bug fixes
|
|||||||
| `Issue #4292 <https://redmine.postgresql.org/issues/4292>`_ - Added dark mode support for the configuration dialog on Windows/macOS runtime.
|
| `Issue #4292 <https://redmine.postgresql.org/issues/4292>`_ - Added dark mode support for the configuration dialog on Windows/macOS runtime.
|
||||||
| `Issue #4440 <https://redmine.postgresql.org/issues/4440>`_ - Ensure the DROP statements in reverse engineered SQL are properly quoted for all objects.
|
| `Issue #4440 <https://redmine.postgresql.org/issues/4440>`_ - Ensure the DROP statements in reverse engineered SQL are properly quoted for all objects.
|
||||||
| `Issue #4445 <https://redmine.postgresql.org/issues/4445>`_ - Ensure all object names in the title line of the reverse-engineered SQL are not quoted.
|
| `Issue #4445 <https://redmine.postgresql.org/issues/4445>`_ - Ensure all object names in the title line of the reverse-engineered SQL are not quoted.
|
||||||
|
| `Issue #4504 <https://redmine.postgresql.org/issues/4504>`_ - Fixed an issue where like options should be disabled if the relation is not selected while creating a table.
|
||||||
| `Issue #4512 <https://redmine.postgresql.org/issues/4512>`_ - Fixed calendar opening issue on the exception tab inside the schedules tab of pgAgent.
|
| `Issue #4512 <https://redmine.postgresql.org/issues/4512>`_ - Fixed calendar opening issue on the exception tab inside the schedules tab of pgAgent.
|
||||||
| `Issue #4545 <https://redmine.postgresql.org/issues/4545>`_ - Fixed an issue wherein grant wizard the last object is not selectable.
|
| `Issue #4545 <https://redmine.postgresql.org/issues/4545>`_ - Fixed an issue wherein grant wizard the last object is not selectable.
|
||||||
| `Issue #4573 <https://redmine.postgresql.org/issues/4573>`_ - Ensure that if the delimiter is set other than comma then download the file as '.txt' file.
|
| `Issue #4573 <https://redmine.postgresql.org/issues/4573>`_ - Ensure that if the delimiter is set other than comma then download the file as '.txt' file.
|
||||||
|
@ -860,29 +860,29 @@ define('pgadmin.node.table', [
|
|||||||
group: gettext('advanced'),
|
group: gettext('advanced'),
|
||||||
schema:[{
|
schema:[{
|
||||||
id: 'like_relation', label: gettext('Relation'),
|
id: 'like_relation', label: gettext('Relation'),
|
||||||
type: 'text', mode: ['create', 'edit'], deps: ['typname'],
|
type: 'text', mode: ['create', 'edit'], deps: ['typname', 'like_relation'],
|
||||||
control: 'node-ajax-options', url: 'get_relations',
|
control: 'node-ajax-options', url: 'get_relations',
|
||||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
disabled: 'isLikeDisable', group: gettext('Like'),
|
||||||
},{
|
},{
|
||||||
id: 'like_default_value', label: gettext('With default values?'),
|
id: 'like_default_value', label: gettext('With default values?'),
|
||||||
type: 'switch', mode: ['create', 'edit'], deps: ['typname'],
|
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||||
},{
|
},{
|
||||||
id: 'like_constraints', label: gettext('With constraints?'),
|
id: 'like_constraints', label: gettext('With constraints?'),
|
||||||
type: 'switch', mode: ['create', 'edit'], deps: ['typname'],
|
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||||
},{
|
},{
|
||||||
id: 'like_indexes', label: gettext('With indexes?'),
|
id: 'like_indexes', label: gettext('With indexes?'),
|
||||||
type: 'switch', mode: ['create', 'edit'], deps: ['typname'],
|
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||||
},{
|
},{
|
||||||
id: 'like_storage', label: gettext('With storage?'),
|
id: 'like_storage', label: gettext('With storage?'),
|
||||||
type: 'switch', mode: ['create', 'edit'], deps: ['typname'],
|
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||||
},{
|
},{
|
||||||
id: 'like_comments', label: gettext('With comments?'),
|
id: 'like_comments', label: gettext('With comments?'),
|
||||||
type: 'switch', mode: ['create', 'edit'], deps: ['typname'],
|
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||||
}],
|
}],
|
||||||
},{
|
},{
|
||||||
id: 'partition_type', label:gettext('Partition Type'),
|
id: 'partition_type', label:gettext('Partition Type'),
|
||||||
@ -1247,6 +1247,24 @@ define('pgadmin.node.table', [
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// We will disable other Like option if Relation is not defined
|
||||||
|
isRelationDisable: function(m) {
|
||||||
|
if ( _.isUndefined(m.get('like_relation')) ||
|
||||||
|
_.isNull(m.get('like_relation')) ||
|
||||||
|
String(m.get('like_relation')).replace(/^\s+|\s+$/g, '') == ''){
|
||||||
|
setTimeout(function() {
|
||||||
|
m.set('like_default_value', false);
|
||||||
|
m.set('like_constraints', false);
|
||||||
|
m.set('like_indexes', false);
|
||||||
|
m.set('like_storage', false);
|
||||||
|
m.set('like_comments', false);
|
||||||
|
}, 10);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
// Check for column grid when to Add
|
// Check for column grid when to Add
|
||||||
check_grid_add_condition: function(m) {
|
check_grid_add_condition: function(m) {
|
||||||
var enable_flag = true;
|
var enable_flag = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user