From 5a5a9314f398c86d329b916a9985100b3be52b98 Mon Sep 17 00:00:00 2001 From: Rahul Shirsat Date: Fri, 26 Feb 2021 13:15:29 +0530 Subject: [PATCH] Fixed an issue where the Save button is enabled for functions/procedures by default when open the properties dialog. Fixes #5073 --- docs/en_US/release_notes_5_1.rst | 1 + .../databases/schemas/functions/static/js/function.js | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/en_US/release_notes_5_1.rst b/docs/en_US/release_notes_5_1.rst index 47fde08e2..ababce617 100644 --- a/docs/en_US/release_notes_5_1.rst +++ b/docs/en_US/release_notes_5_1.rst @@ -18,4 +18,5 @@ Bug fixes ********* | `Issue #4959 `_ - Fixed an issue where the properties tab for collection nodes is unresponsive after switching the tabs. +| `Issue #5073 `_ - Fixed an issue where the Save button is enabled for functions/procedures by default when open the properties dialog. | `Issue #6159 `_ - Ensure that the user should be able to kill the session from Dashboard if the user has a 'pg_signal_backend' role. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js index 6bda73d4e..2420fcf2f 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js @@ -179,7 +179,7 @@ define('pgadmin.node.function', [ proiswindow: undefined, /* Window Function ? */ proparallel: undefined, /* Parallel mode */ procost: undefined, /* Estimated execution Cost */ - prorows: undefined, /* Estimated number of rows */ + prorows: 0, /* Estimated number of rows */ proleakproof: undefined, prosupportfunc: undefined, /* Support function */ arguments: [], @@ -306,7 +306,7 @@ define('pgadmin.node.function', [ select2: {allowClear: false}, },{ id: 'procost', label: gettext('Estimated cost'), group: gettext('Options'), - cell:'string', type: 'text', readonly: 'isReadonly', deps: ['lanname'], + cell:'string', type: 'text', readonly: 'isReadonly', deps: ['lanname'], disabled: 'isDisabled', },{ id: 'prorows', label: gettext('Estimated rows'), type: 'text', deps: ['proretset'], visible: 'isVisible', readonly: 'isReadonly', @@ -462,9 +462,6 @@ define('pgadmin.node.function', [ if(m.get('proretset') == true) { return false; } - setTimeout(function() { - m.set('prorows', 0); - }, 10); return true; default: return false;