diff --git a/web/pgadmin/browser/static/js/node.ui.js b/web/pgadmin/browser/static/js/node.ui.js index 476fd2ec2..878497165 100644 --- a/web/pgadmin/browser/static/js/node.ui.js +++ b/web/pgadmin/browser/static/js/node.ui.js @@ -341,13 +341,18 @@ define([ backgridDivTop = backgridDiv.offset().top, backgridDivHeight = backgridDiv.height(), backformTab = $(this).closest(cls), // Backform-tab - gridScroll = backformTab[0].offsetHeight - backgridDivTop; + gridScroll = null; + + if(backformTab.length == 0) { + return false; + } + gridScroll = backformTab[0].offsetHeight - backgridDivTop; if (backgridDivHeight > gridScroll) { var top = elem.get(0).offsetTop + elem.height(); backformTab.find('.tab-content').scrollTop(top); } - return; + return true; }); }; diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js index a31eaafd2..df4d8aecb 100644 --- a/web/pgadmin/static/js/backform.pgadmin.js +++ b/web/pgadmin/static/js/backform.pgadmin.js @@ -1421,13 +1421,10 @@ define([ newRow = self.grid.body.rows[idx].$el; newRow.addClass('new'); - try { - $(newRow).pgMakeBackgridVisible('.backform-tab'); - } catch(err) { + if(!$(newRow).pgMakeBackgridVisible('.backform-tab')){ // We can have subnode controls in Panels $(newRow).pgMakeBackgridVisible('.set-group'); } - return false; } }); @@ -1692,9 +1689,8 @@ define([ newRow.attr('class', 'new').on('click',() => { $(this).attr('class', 'editable'); }); - try { - $(newRow).pgMakeBackgridVisible('.backform-tab'); - } catch(err) { + + if(!$(newRow).pgMakeBackgridVisible('.backform-tab')){ // We can have subnode controls in Panels $(newRow).pgMakeBackgridVisible('.set-group'); } diff --git a/web/pgadmin/tools/grant_wizard/__init__.py b/web/pgadmin/tools/grant_wizard/__init__.py index 09c84c8c3..997f4fbb1 100644 --- a/web/pgadmin/tools/grant_wizard/__init__.py +++ b/web/pgadmin/tools/grant_wizard/__init__.py @@ -336,7 +336,7 @@ def properties(sid, did, node_id, node_type): @blueprint.route( '/sql///', - methods=['GET'], endpoint='modified_sql' + methods=['POST'], endpoint='modified_sql' ) @login_required @check_precondition @@ -346,13 +346,7 @@ def msql(sid, did): """ server_prop = server_info - data = {} - for k, v in request.args.items(): - try: - data[k] = json.loads(v) - except ValueError: - data[k] = v - + data = request.form if request.form else json.loads(request.data.decode()) # Form db connection manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(sid) conn = manager.connection(did=did) diff --git a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js index b36f184da..e143ee984 100644 --- a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js +++ b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js @@ -1012,9 +1012,9 @@ define([ // Fetches modified SQL $.ajax({ url: this.msql_url, - type: 'GET', + type: 'POST', cache: false, - data: self.model.toJSON(true, 'GET'), + data: JSON.stringify(self.model.toJSON(true)), dataType: 'json', contentType: 'application/json', }).done(function(res) {