Fixed an issue where select all checkbox only selects the first 50 tables. Fixes #4226

This commit is contained in:
Yogesh Mahajan 2020-06-16 11:05:10 +05:30 committed by Akshay Joshi
parent 697f4aec95
commit 2ae5c0ec4f
2 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Bug fixes
| `Issue #3669 <https://redmine.postgresql.org/issues/3669>`_ - Ensure that proper error should be displayed for the deleted node. | `Issue #3669 <https://redmine.postgresql.org/issues/3669>`_ - Ensure that proper error should be displayed for the deleted node.
| `Issue #3787 <https://redmine.postgresql.org/issues/3787>`_ - Disabled the Stop process button after clicking it and added a message 'Terminating the process...' to notify the user. | `Issue #3787 <https://redmine.postgresql.org/issues/3787>`_ - Disabled the Stop process button after clicking it and added a message 'Terminating the process...' to notify the user.
| `Issue #4226 <https://redmine.postgresql.org/issues/4226>`_ - Fixed an issue where select all checkbox only selects the first 50 tables.
| `Issue #5416 <https://redmine.postgresql.org/issues/5416>`_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button. | `Issue #5416 <https://redmine.postgresql.org/issues/5416>`_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button.
| `Issue #5465 <https://redmine.postgresql.org/issues/5465>`_ - Fixed an issue where the Edge browser version is showing wrong and warning message gets displayed. | `Issue #5465 <https://redmine.postgresql.org/issues/5465>`_ - Fixed an issue where the Edge browser version is showing wrong and warning message gets displayed.
| `Issue #5507 <https://redmine.postgresql.org/issues/5507>`_ - Fixed connection and version number detection issue when the database server is upgraded. | `Issue #5507 <https://redmine.postgresql.org/issues/5507>`_ - Fixed connection and version number detection issue when the database server is upgraded.

View File

@ -312,6 +312,9 @@ define([
$('.pg-prop-content').on('scroll', that.__loadMoreRows.bind(that)); $('.pg-prop-content').on('scroll', that.__loadMoreRows.bind(that));
that.collection.reset(that.data.splice(0, 50)); that.collection.reset(that.data.splice(0, 50));
// Listen to select all checkbox event
that.collection.on('backgrid:select-all', that.__loadAllRows.bind(that));
} else { } else {
// Do not listen the scroll event // Do not listen the scroll event
$('.pg-prop-content').off('scroll', that.__loadMoreRows); $('.pg-prop-content').off('scroll', that.__loadMoreRows);
@ -436,6 +439,14 @@ define([
} }
} }
}, },
__loadAllRows: function(tmp, checked) {
if (this.data.length > 0) {
this.collection.add(this.data);
this.collection.each(function (model) {
model.trigger('backgrid:select', model, checked);
});
}
},
generate_url: function(item, type) { generate_url: function(item, type) {
/* /*
* Using list, and collection functions of a node to get the nodes * Using list, and collection functions of a node to get the nodes