Bug 28928

Summary: Minor follow-ups to Bug 28376 - Flatpickr introduction
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Bug Depends on: 28376    
Bug Blocks: 28938, 29239    
Attachments: Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction

Description Owen Leonard 2021-08-31 12:08:50 UTC
I've discovered a few of minor follow-ups required for Bug 28376:

- Missing document.ready() in borrowers_stats.tt.
- Missing preventDefault() in calendar.inc
- Redundant calendarFirstDayOfWeek setting in caregories.js
Comment 1 Owen Leonard 2021-08-31 12:17:08 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-08-31 12:19:56 UTC
Created attachment 124276 [details] [review]
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction

This patch corrects three errors in the original Flatpickr introduction
patch:

- Missing document.ready() in borrowers_stats.tt.
- Redundant calendarFirstDayOfWeek setting in caregories.js
- Missing preventDefault() in calendar.inc

The first two issues don't appear to cause any malfunction but are best
practices. The third issue can cause the page to scroll unexpectedly.

To reproduce this bug, go to (for instance) Administration -> Patron
categories -> New category.

 - If necessary, narrow the height of your browser window so that there
   is a vertical scrollbar.
 - Scroll down the page so that the "Until date" field is at the top.
 - Click the "X" next to the field.
 - The page will scroll to the top.

Apply the patch and test again. The page jump should not occur.
Comment 3 Jonathan Druart 2021-09-01 13:46:33 UTC
Created attachment 124369 [details] [review]
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction

This patch corrects three errors in the original Flatpickr introduction
patch:

- Missing document.ready() in borrowers_stats.tt.
- Redundant calendarFirstDayOfWeek setting in caregories.js
- Missing preventDefault() in calendar.inc

The first two issues don't appear to cause any malfunction but are best
practices. The third issue can cause the page to scroll unexpectedly.

To reproduce this bug, go to (for instance) Administration -> Patron
categories -> New category.

 - If necessary, narrow the height of your browser window so that there
   is a vertical scrollbar.
 - Scroll down the page so that the "Until date" field is at the top.
 - Click the "X" next to the field.
 - The page will scroll to the top.

Apply the patch and test again. The page jump should not occur.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2021-09-02 10:10:59 UTC
Pushed to master for 21.11, thanks to everybody involved!