mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-26 02:30:21 -06:00
Fix an issue where clicking on an empty textbox like fill factor or comments, considers it as change and enabled the save button. Fixes #4506.
This commit is contained in:
parent
43d37e3b4c
commit
11bf5fc679
@ -17,4 +17,5 @@ Housekeeping
|
|||||||
Bug fixes
|
Bug fixes
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
| `Issue #4506 <https://redmine.postgresql.org/issues/4506>`_ - Fix an issue where clicking on an empty textbox like fill factor or comments, considers it as change and enabled the save button.
|
||||||
| `Issue #5004 <https://redmine.postgresql.org/issues/5004>`_ - Fix vulnerability issues reported by 'yarn audit'. Replace the deprecated uglifyjs-webpack-plugin with a terser-webpack-plugin.
|
| `Issue #5004 <https://redmine.postgresql.org/issues/5004>`_ - Fix vulnerability issues reported by 'yarn audit'. Replace the deprecated uglifyjs-webpack-plugin with a terser-webpack-plugin.
|
@ -56,6 +56,9 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
|||||||
{% if data.fillfactor and data.fillfactor != o_data.fillfactor %}
|
{% if data.fillfactor and data.fillfactor != o_data.fillfactor %}
|
||||||
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
||||||
SET (FILLFACTOR={{data.fillfactor}});
|
SET (FILLFACTOR={{data.fillfactor}});
|
||||||
|
{% elif data.fillfactor == '' and data.fillfactor != o_data.fillfactor %}
|
||||||
|
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
||||||
|
RESET (FILLFACTOR);
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{###############################}
|
{###############################}
|
||||||
|
@ -64,6 +64,9 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
|||||||
{% if data.fillfactor and data.fillfactor != o_data.fillfactor %}
|
{% if data.fillfactor and data.fillfactor != o_data.fillfactor %}
|
||||||
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
||||||
SET (FILLFACTOR={{data.fillfactor}});
|
SET (FILLFACTOR={{data.fillfactor}});
|
||||||
|
{% elif data.fillfactor == '' and data.fillfactor != o_data.fillfactor %}
|
||||||
|
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
|
||||||
|
RESET (FILLFACTOR);
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{###############################}
|
{###############################}
|
||||||
|
@ -203,7 +203,7 @@ define('pgadmin.node.mview', [
|
|||||||
},{
|
},{
|
||||||
id: 'fillfactor', label: gettext('Fill factor'),
|
id: 'fillfactor', label: gettext('Fill factor'),
|
||||||
group: gettext('Storage'), mode: ['edit', 'create'],
|
group: gettext('Storage'), mode: ['edit', 'create'],
|
||||||
type: 'int',
|
type: 'int', min: 10, max: 100,
|
||||||
},{
|
},{
|
||||||
type: 'nested', control: 'tab', id: 'materialization',
|
type: 'nested', control: 'tab', id: 'materialization',
|
||||||
label: gettext('Parameter'), mode: ['edit', 'create'],
|
label: gettext('Parameter'), mode: ['edit', 'create'],
|
||||||
|
@ -367,7 +367,8 @@ define([
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
attrs[k] = v;
|
attrs[k] = v;
|
||||||
if (_.isEqual(self.origSessAttrs[k], v)) {
|
/* If the orig value was null and new one is empty string, then its a "no change" */
|
||||||
|
if (_.isEqual(self.origSessAttrs[k], v) || (self.origSessAttrs[k] === null && v === '')) {
|
||||||
delete self.sessAttrs[k];
|
delete self.sessAttrs[k];
|
||||||
} else {
|
} else {
|
||||||
self.sessAttrs[k] = v;
|
self.sessAttrs[k] = v;
|
||||||
@ -738,9 +739,7 @@ define([
|
|||||||
field = this.fieldData[keys[i]];
|
field = this.fieldData[keys[i]];
|
||||||
msg = null;
|
msg = null;
|
||||||
|
|
||||||
if (!(_.isUndefined(value) || _.isNull(value) ||
|
if (!(_.isUndefined(value) || _.isNull(value) || String(value) === '')) {
|
||||||
String(value).replace(/^\s+|\s+$/g, '') == '')) {
|
|
||||||
|
|
||||||
if (!field) {
|
if (!field) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ define(
|
|||||||
'SQL_NO_CHANGE': gettext('Nothing changed'),
|
'SQL_NO_CHANGE': gettext('Nothing changed'),
|
||||||
'MUST_BE_INT' : gettext("'%s' must be an integer."),
|
'MUST_BE_INT' : gettext("'%s' must be an integer."),
|
||||||
'MUST_BE_NUM' : gettext("'%s' must be a numeric."),
|
'MUST_BE_NUM' : gettext("'%s' must be a numeric."),
|
||||||
'MUST_GR_EQ' : gettext("%s' must be greater than or equal to %d."),
|
'MUST_GR_EQ' : gettext("'%s' must be greater than or equal to %s."),
|
||||||
'MUST_LESS_EQ' : gettext("'%s' must be less than or equal to %d."),
|
'MUST_LESS_EQ' : gettext("'%s' must be less than or equal to %s."),
|
||||||
'STATISTICS_LABEL': gettext("Statistics"),
|
'STATISTICS_LABEL': gettext("Statistics"),
|
||||||
'STATISTICS_VALUE_LABEL': gettext("Value"),
|
'STATISTICS_VALUE_LABEL': gettext("Value"),
|
||||||
'NODE_HAS_NO_SQL': gettext("No SQL could be generated for the selected object."),
|
'NODE_HAS_NO_SQL': gettext("No SQL could be generated for the selected object."),
|
||||||
|
Loading…
Reference in New Issue
Block a user