Fix an error where 'false' string is displayed when we add a new parameter in the Parameters tab,

also clear the old value when the user changes the parameter name.

Corrected the implementation of BooleanCellFormatter.

Fixes #4753
pull/26/head
Akshay Joshi 2019-10-07 16:00:28 +05:30
parent 7489c372e5
commit 55c6fa0d93
3 changed files with 5 additions and 2 deletions

View File

@ -23,6 +23,7 @@ Bug fixes
| `Issue #4199 <https://redmine.postgresql.org/issues/4199>`_ - Ensure that 'ENTER' key in the data filter should not run the query.
| `Issue #4728 <https://redmine.postgresql.org/issues/4728>`_ - Highlighted the color of closing or opening parenthesis when user select them in CodeMirror.
| `Issue #4751 <https://redmine.postgresql.org/issues/4751>`_ - Fix issue where export job fails when deselecting all the columns.
| `Issue #4753 <https://redmine.postgresql.org/issues/4753>`_ - Fix an error where 'false' string is displayed when we add a new parameter in the Parameters tab, also clear the old value when the user changes the parameter name.
| `Issue #4755 <https://redmine.postgresql.org/issues/4755>`_ - Ensure that pgAdmin should work behind reverse proxy if the inbuilt server is used as it is.
| `Issue #4756 <https://redmine.postgresql.org/issues/4756>`_ - Fix issue where pgAdmin does not load completely if loaded in an iframe.
| `Issue #4760 <https://redmine.postgresql.org/issues/4760>`_ - Ensure the search path should not be quoted for Database.

View File

@ -87,7 +87,8 @@ function(gettext, _, $, Backbone, Backform, Backgrid, Alertify, pgAdmin, pgNode)
setTimeout(function() {
self.columns.each(function(col) {
if (col.get('name') == 'value') {
// Reset old value
self.model.set({'value': undefined}, {silent:true});
var idx = self.columns.indexOf(col),
cf = col.get('cellFunction'),
cell = new (cf.apply(col, [self.model]))({

View File

@ -1890,7 +1890,8 @@ define([
},
});
Backgrid.BooleanCellFormatter = _.extend(Backgrid.CellFormatter.prototype, {
var BooleanCellFormatter = Backgrid.BooleanCellFormatter = function() {};
_.extend(BooleanCellFormatter.prototype, {
fromRaw: function (rawValue) {
if (_.isUndefined(rawValue) || _.isNull(rawValue)) {
return false;