Bug 25274: Don't initialize DataTable if table isn't present
commit9c39093b3d397790003f82a56ed2a506c3556cc9
authorOwen Leonard <oleonard@myacpl.org>
Fri, 24 Apr 2020 11:49:21 +0000 (24 11:49 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 27 Apr 2020 10:12:50 +0000 (27 11:12 +0100)
treec33a93b08088facc6fb0b7fa39d898a80c2a27f7
parent69b1a62aa46ce9c378eef678357318714ba8744c
Bug 25274: Don't initialize DataTable if table isn't present

This patch modifies the OPAC basket JavaScript so that a check is added
for the existence of the "itemst" table. This avoids an error if the
"More details" view is selected and hte "itemst" table isn't present.

To reproduce the error, add some items to the OPAC cart and open the
cart window. Open the JavaScript console in your browser and click the
"More details" link. You'll see an error.

To test, apply the patch and perform the same test as above. The error
should not be present. Test that table sorting in the "brief" view words
correctly.

Signed-off-by: David Roberts <david@koha-ptfs.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt