diff --git a/web/pgadmin/browser/templates/browser/js/collection.js b/web/pgadmin/browser/templates/browser/js/collection.js index 771cc07..9603ed0 100644 --- a/web/pgadmin/browser/templates/browser/js/collection.js +++ b/web/pgadmin/browser/templates/browser/js/collection.js @@ -103,12 +103,14 @@ function($, _, S, pgAdmin, Backbone, Alertify, Backform) { n_value = treeHierarchy[n_type]._id; } - if (n_value == $(panel).data(n_type)) { + if (n_value == $(panel).data(n_type) && + n_type == $(panel).data('uniq_id')) { return; } // Cache the current IDs for next time $(panel).data(n_type, n_value); + $(panel).data('uniq_id', n_type); // Reset the data object j.data('obj-view', null); diff --git a/web/pgadmin/browser/templates/browser/js/node.js b/web/pgadmin/browser/templates/browser/js/node.js index e5a96c4..38c7116 100644 --- a/web/pgadmin/browser/templates/browser/js/node.js +++ b/web/pgadmin/browser/templates/browser/js/node.js @@ -804,12 +804,14 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { n_value = treeHierarchy[n_type]._id; } - if (n_value == $(panel).data(n_type)) { + if (n_value == $(panel).data(n_type) && + n_type == $(panel).data('uniq_id')) { return; } // Cache the current IDs for next time $(panel).data(n_type, n_value); + $(panel).data('uniq_id', n_type); if (!content.hasClass('has-pg-prop-btn-group')) content.addClass('has-pg-prop-btn-group'); diff --git a/web/pgadmin/misc/depends/static/js/depends.js b/web/pgadmin/misc/depends/static/js/depends.js index 6883aa3..a72cf89 100644 --- a/web/pgadmin/misc/depends/static/js/depends.js +++ b/web/pgadmin/misc/depends/static/js/depends.js @@ -192,12 +192,14 @@ define( n_value = treeHierarchy[n_type]._id; } - if (n_value == $(panel[0]).data(n_type)) { + if (n_value == $(panel[0]).data(n_type) && + n_type == $(panel).data('uniq_id')) { return; } // Cache the current IDs for next time $(panel[0]).data(n_type, n_value); + $(panel).data('uniq_id', n_type); // Hide the grid container and show the default message container diff --git a/web/pgadmin/misc/sql/static/js/sql.js b/web/pgadmin/misc/sql/static/js/sql.js index 9c06c65..56b1673 100644 --- a/web/pgadmin/misc/sql/static/js/sql.js +++ b/web/pgadmin/misc/sql/static/js/sql.js @@ -74,12 +74,14 @@ function(_, $, pgBrowser) { n_value = treeHierarchy[n_type]._id; } - if (n_value == $(sqlPanels[0]).data(n_type)) { + if (n_value == $(sqlPanels[0]).data(n_type) && + n_type == $(sqlPanels).data('uniq_id')) { return; } // Cache the current IDs for next time - $(this.sqlPanels[0]).data(n_type, n_value); + $(sqlPanels[0]).data(n_type, n_value); + $(sqlPanels).data('uniq_id', n_type); sql = ''; var url = node.generate_url(item, 'sql', data, true); diff --git a/web/pgadmin/misc/statistics/static/js/statistics.js b/web/pgadmin/misc/statistics/static/js/statistics.js index f1217ae..87a0c23 100644 --- a/web/pgadmin/misc/statistics/static/js/statistics.js +++ b/web/pgadmin/misc/statistics/static/js/statistics.js @@ -166,12 +166,14 @@ function(_, $, pgBrowser, Backgrid) { n_value = treeHierarchy[n_type]._id; } - if (n_value == $(this.panel[0]).data(n_type)) { + if (n_value == $(this.panel[0]).data(n_type) && + n_type == $(panel).data('uniq_id')) { return; } // Cache the current IDs for next time $(this.panel[0]).data(n_type, n_value); + $(panel).data('uniq_id', n_type); /* Set the message because ajax request may take time to * fetch the information from the server.