Bug 21050 - Datepickers on LabelItemSearch broken
Summary: Datepickers on LabelItemSearch broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 19709
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-07 11:58 UTC by Katrin Fischer
Modified: 2019-10-14 19:57 UTC (History)
4 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:


Attachments
Bug 21050: Fix datepickers on LabelItemSearch (1.26 KB, patch)
2018-07-16 14:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21050: Fix datepickers on LabelItemSearch (1.31 KB, patch)
2018-07-16 21:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21050: Fix datepickers on LabelItemSearch (1.37 KB, patch)
2018-08-08 09:25 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-07-07 11:58:13 UTC
Something is wrong with the JavaScript on the label item search. The visible problem is the missing datepickers on the date fields in the search form.

To test:
 - Open or create a label batch.
 - Click "Add items" to trigger the pop-up search window.
Comment 1 Jonathan Druart 2018-07-11 20:12:04 UTC
Seems ok here - https://screenshots.firefox.com/3CmAOf29z2fHLjzR/pro.kohadev.org
Comment 2 Katrin Fischer 2018-07-15 17:40:51 UTC
Strange, still broken for me.

This is the URL:
http://localhost:8081/cgi-bin/koha/labels/label-item-search.pl?batch_id=0&type=labels

Looking at the source code the jquery libraries are at the bottom of the page, but there is a lot of JavaScript code above. Can you take another look and confirm you were looking on master?
Comment 3 Jonathan Druart 2018-07-16 14:13:15 UTC
Hum, it is failing now (?)

ReferenceError: _ is not defined

at line:
var MSG_PLEASE_ENTER_A_VALID_DATE = (_("Please enter a valid date (should match %s)."));
Comment 4 Jonathan Druart 2018-07-16 14:21:45 UTC
Caused by
  commit 3c887b4e07acf9459767a7b934aa4f6c16cae534
  Bug 19709: Move template JavaScript to the footer: Labels
Comment 5 Jonathan Druart 2018-07-16 14:23:25 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2018-07-16 21:00:45 UTC Comment hidden (obsolete)
Comment 7 Julian Maurice 2018-08-08 09:25:20 UTC
Created attachment 77553 [details] [review]
Bug 21050: Fix datepickers on LabelItemSearch

calendar.inc must be in the jsinclude block when jsfooter is set

Test plan:
- Open or create a label batch.
- Click "Add items" to trigger the pop-up search window.
- Date picker should work now

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Nick Clemens 2018-08-09 12:26:41 UTC
Awesome work all!

Pushed to master for 18.11
Comment 9 Martin Renvoize 2018-08-10 07:36:06 UTC
Depends on (and is caused by) bug 19709 not in 18.05.x series.