Bug 28928 - Minor follow-ups to Bug 28376 - Flatpickr introduction
Summary: Minor follow-ups to Bug 28376 - Flatpickr introduction
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 28376
Blocks: 29239 28938
  Show dependency treegraph
 
Reported: 2021-08-31 12:08 UTC by Owen Leonard
Modified: 2021-10-14 08:19 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction (3.89 KB, patch)
2021-08-31 12:17 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction (3.90 KB, patch)
2021-08-31 12:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28928: Minor follow-ups to Bug 28376 - Flatpickr introduction (3.97 KB, patch)
2021-09-01 13:46 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!