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

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
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!