diff --git a/docs/en_US/release_notes_3_3.rst b/docs/en_US/release_notes_3_3.rst index 02fc7dee0..f0456a5c6 100644 --- a/docs/en_US/release_notes_3_3.rst +++ b/docs/en_US/release_notes_3_3.rst @@ -17,11 +17,12 @@ Bug fixes ********* | `Bug #3136 `_ - Stabilise feature tests for continuous running on CI systems. +| `Bug #3313 `_ - Ensure 'select all' and 'unselect all' working properly for pgAgent schedule. | `Bug #3325 `_ - Fix sort/filter dialog issue where it incorrectly requires ASC/DESC. | `Bug #3347 `_ - Ensure backup should work with '--data-only' and '--schema-only' for any format. | `Bug #3407 `_ - Fix keyboard shortcuts layout in the preferences panel. | `Bug #3461 `_ - Ensure that refreshing a node also updates the Property list. | `Bug #3528 `_ - Handle connection errors properly in the query tool. -| `Bug #3547 `_ - Make session implementation thread safe +| `Bug #3547 `_ - Make session implementation thread safe | `Bug #3558 `_ - Fix sort/filter dialog editing issue. | `Bug #3578 `_ - Ensure sql for Role should be visible in SQL panel for GPDB. diff --git a/web/pgadmin/browser/static/js/node.ui.js b/web/pgadmin/browser/static/js/node.ui.js index 064ca3125..393394d2b 100644 --- a/web/pgadmin/browser/static/js/node.ui.js +++ b/web/pgadmin/browser/static/js/node.ui.js @@ -17,47 +17,56 @@ define([ function SelectAll() {} SelectAll.prototype.render = function(decorated) { - var self = this, - $rendered = decorated.call(this), - $selectAll = $([ - '', - ].join('')), - $unselectAll = $([ - '', - ].join('')), - $btnContainer = $( - '
' - ).append($selectAll).append($unselectAll); + let self = this; + let $rendered = decorated.call(this); + + let $selectAll = $([ + '', + ].join('')); + + let $unselectAll = $([ + '', + ].join('')); + + let $btnContainer = $( + '
' + ).append($selectAll).append($unselectAll); if (!this.$element.prop('multiple')) { // this isn't a multi-select -> don't add the buttons! return $rendered; } $rendered.find('.select2-dropdown').prepend($btnContainer); + // Select All button click $selectAll.on('click', function() { $rendered.find('.select2-results__option[aria-selected=false]').each( function() { + // Note: With latest version we do not get data in the data attribute of a element + // Hence as per new logic we will fetch the data from the cache created by Select2. + let data = Utils.GetData($(this)[0], 'data'); self.trigger('select', { - data: $(this).data('data'), + data: data, }); } ); self.trigger('close'); }); + // Unselect All button click $unselectAll.on('click', function() { $rendered.find('.select2-results__option[aria-selected=true]').each( function() { + let data = Utils.GetData($(this)[0], 'data'); self.trigger('unselect', { - data: $(this).data('data'), + data: data, }); } );