Bug 12755 - MARC Preview doesn't always display in managed MARC record
authorOwen Leonard <oleonard@myacpl.org>
Tue, 23 Sep 2014 16:24:34 +0000 (12:24 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 9 Oct 2014 15:00:33 +0000 (12:00 -0300)
commitd44a4adcc638e97995c00cffdca219ce9f5e7e7e
treefdbd67f0e68251f7326d108ddced0c81df23a7f9
parent56844b81d7e5afe7e71ba5a5079d62725573a450
Bug 12755 - MARC Preview doesn't always display in managed MARC record

The MARC preview feature seems to have been broken by Bug 11570 -
Upgrade jQueryUI to the latest version. When that patch was being
developed there were no existing cases where the jQueryUI dialog feature
was used, so the patch omitted it.

Rather than update the build of jQueryUI to include the dialog feature
I'm submitting a patch which uses a Bootstrap modal instead. This keeps
the jQueryUI library smaller and avoids an unnecessary duplication of JS
functionality. It also helps keep our modals consistent.

The implementation uses progressive enhancement principles to improve
click handling: Real links in the table, so that the preview link can be
opened in a new tab if the user chooses; Event handling in the
JavaScript instead of the markup ( $(selector).on(click... instead of <a
onclick=...).

To test, apply the patch and add or view a batch of staged MARC records
(Tools -> Staged MARC management). In the list of titles (the "Citation"
column) click any link and confirm that the MARC preview loads
correctly. Confirm that previews work correctly on any page and after
re-sorting.

Confirm also that the modal window flexibly handles different browser
window sizes.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt