mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the regression where initial changes make the Save button enabled when the table dialog is opened. Fixes #4504
This commit is contained in:
parent
b80784f5a1
commit
18748846ef
@ -860,28 +860,28 @@ define('pgadmin.node.table', [
|
||||
group: gettext('advanced'),
|
||||
schema:[{
|
||||
id: 'like_relation', label: gettext('Relation'),
|
||||
type: 'text', mode: ['create', 'edit'], deps: ['typname', 'like_relation'],
|
||||
type: 'text', mode: ['create'], deps: ['typname', 'like_relation'],
|
||||
control: 'node-ajax-options', url: 'get_relations',
|
||||
disabled: 'isLikeDisable', group: gettext('Like'),
|
||||
},{
|
||||
id: 'like_default_value', label: gettext('With default values?'),
|
||||
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||
type: 'switch', mode: ['create'], deps: ['like_relation'],
|
||||
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||
},{
|
||||
id: 'like_constraints', label: gettext('With constraints?'),
|
||||
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||
type: 'switch', mode: ['create'], deps: ['like_relation'],
|
||||
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||
},{
|
||||
id: 'like_indexes', label: gettext('With indexes?'),
|
||||
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||
type: 'switch', mode: ['create'], deps: ['like_relation'],
|
||||
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||
},{
|
||||
id: 'like_storage', label: gettext('With storage?'),
|
||||
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||
type: 'switch', mode: ['create'], deps: ['like_relation'],
|
||||
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||
},{
|
||||
id: 'like_comments', label: gettext('With comments?'),
|
||||
type: 'switch', mode: ['create', 'edit'], deps: ['like_relation'],
|
||||
type: 'switch', mode: ['create'], deps: ['like_relation'],
|
||||
disabled: 'isRelationDisable', group: gettext('Like'),
|
||||
}],
|
||||
},{
|
||||
@ -1253,14 +1253,15 @@ define('pgadmin.node.table', [
|
||||
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);
|
||||
|
||||
if (m.isNew()){
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user