Bug 28963 - Use Flatpickr on calendar page
Summary: Use Flatpickr on calendar page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 28937 28988
Blocks: 29239
  Show dependency treegraph
 
Reported: 2021-09-07 15:23 UTC by Owen Leonard
Modified: 2021-10-22 13:56 UTC (History)
2 users (show)

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


Attachments
Bug 28963: Use Flatpickr on calendar page (17.65 KB, patch)
2021-10-04 16:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28963: Use Flatpickr on calendar page (17.70 KB, patch)
2021-10-06 12:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 28963: Use Flatpickr on calendar page (17.78 KB, patch)
2021-10-10 12:29 UTC, Katrin Fischer
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-09-07 15:23:22 UTC
This bug will replace the use of jQueryUI's datepicker widget on the Calendar page under Tools.
Comment 1 Martin Renvoize 2021-09-17 07:17:44 UTC
I'm actually looking at a calendar component related to my work to add a bookings system for items.

I wonder if that same component may be used to improve the existing calendar page beyond just replacing the picker widget here.

Just thought I'd mention it to suggest you work on the other bugs in this series first whilst I get my act together ;)
Comment 2 Martin Renvoize 2021-09-30 12:56:12 UTC
I changed my mind.. go for it here ;)
Comment 3 Owen Leonard 2021-10-04 16:34:33 UTC
Created attachment 125709 [details] [review]
Bug 28963: Use Flatpickr on calendar page

This patch replaces the use of jQueryUI's datepicker widget on the
Calendar page.

In order to ease customization of the static calendar which shows the
current calendar, I've converted the calendar.css file to SCSS. This
allows us to define new SCSS variables to pass to the Flatpickr SCSS.

Also changed: Removed some unecessary comments in the template.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Tools -> Calendar.
- Confirm that entering holidays works correctly for all types: Single,
  weekly, yearly, ranges, repeated ranges.
- Confirm that holidays are deleted as expected.
- Confirm that the colors of each type of holiday is correct.
Comment 4 David Nind 2021-10-06 12:45:31 UTC
Created attachment 125797 [details] [review]
Bug 28963: Use Flatpickr on calendar page

This patch replaces the use of jQueryUI's datepicker widget on the
Calendar page.

In order to ease customization of the static calendar which shows the
current calendar, I've converted the calendar.css file to SCSS. This
allows us to define new SCSS variables to pass to the Flatpickr SCSS.

Also changed: Removed some unecessary comments in the template.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Tools -> Calendar.
- Confirm that entering holidays works correctly for all types: Single,
  weekly, yearly, ranges, repeated ranges.
- Confirm that holidays are deleted as expected.
- Confirm that the colors of each type of holiday is correct.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2021-10-10 12:29:36 UTC
Created attachment 126019 [details] [review]
Bug 28963: Use Flatpickr on calendar page

This patch replaces the use of jQueryUI's datepicker widget on the
Calendar page.

In order to ease customization of the static calendar which shows the
current calendar, I've converted the calendar.css file to SCSS. This
allows us to define new SCSS variables to pass to the Flatpickr SCSS.

Also changed: Removed some unecessary comments in the template.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Tools -> Calendar.
- Confirm that entering holidays works correctly for all types: Single,
  weekly, yearly, ranges, repeated ranges.
- Confirm that holidays are deleted as expected.
- Confirm that the colors of each type of holiday is correct.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-10-12 09:18:39 UTC
Pushed to master for 21.11, thanks to everybody involved!