The new 'Patrons selected' feedback introduced on bug 29971 doesn't work as expected with the 'Select all' feature.. if you click "Select all" once it counts as expected.. if you work with the checkboxes, the counter changes as expected.. if you change your mind and click 'Select all' again, the counter adds all results again, effectively doubling the count each time you click it.
Created attachment 140923 [details] [review] Bug 31566: 'Patrons selected' counter doubles on 'Select all' This patch refines the JavaScript which is run when the "Select all" or "Clear all" controls are clicked. The script now checks to see whether the checkbox is checked before triggering the change function. To test, apply the patch and perform a patron search in the staff interface which will return multiple results. - After the patron search results are displayed, test the "Select all" control. The visible search results should all be checked, and the "Patrons selected" counter at the top should be incremented correctly. - Clicking the "Select all" control again should have no effect. The "Patrons selected" counter should not increment again. - Test the "Clear all" control to confirm that checkboxes are unchecked and the counter updates correctly. - Test with multiple pages of patron search results to confirm that the controls work correctly on any page of results..
Created attachment 140959 [details] [review] Bug 31566: 'Patrons selected' counter doubles on 'Select all' This patch refines the JavaScript which is run when the "Select all" or "Clear all" controls are clicked. The script now checks to see whether the checkbox is checked before triggering the change function. To test, apply the patch and perform a patron search in the staff interface which will return multiple results. - After the patron search results are displayed, test the "Select all" control. The visible search results should all be checked, and the "Patrons selected" counter at the top should be incremented correctly. - Clicking the "Select all" control again should have no effect. The "Patrons selected" counter should not increment again. - Test the "Clear all" control to confirm that checkboxes are unchecked and the counter updates correctly. - Test with multiple pages of patron search results to confirm that the controls work correctly on any page of results.. Signed-off-by: David Nind <david@davidnind.com>
Noted when testing: - The dropdown list for 'Show X entries' has the options: 10 20 (default) 20 50 100 All - Note that 20 is repeated. - This was there before the patch was applied, so not related to this bug and I should probably log as a separate one.
Created attachment 141016 [details] [review] Bug 31566: 'Patrons selected' counter doubles on 'Select all' This patch refines the JavaScript which is run when the "Select all" or "Clear all" controls are clicked. The script now checks to see whether the checkbox is checked before triggering the change function. To test, apply the patch and perform a patron search in the staff interface which will return multiple results. - After the patron search results are displayed, test the "Select all" control. The visible search results should all be checked, and the "Patrons selected" counter at the top should be incremented correctly. - Clicking the "Select all" control again should have no effect. The "Patrons selected" counter should not increment again. - Test the "Clear all" control to confirm that checkboxes are unchecked and the counter updates correctly. - Test with multiple pages of patron search results to confirm that the controls work correctly on any page of results.. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 22.11. Nice work everyone, thanks!