From 2d58ddf691682d1ef3c5c8a18cf2911ac2af5634 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 10 Oct 2017 10:58:24 -0300
Subject: [PATCH] Bug 19083: Fix 'show all details' link on closed basket
 detail
Content-Type: text/plain; charset=utf-8

'Show all details' add columns on the basket summary page.
This link is broken if the basket is closed.

Indeed there is a JS error raised by $('#toolbar').fixFloat();
The toolbar is not displayed if the basket is closed.

This is caused by bug 12333, which added the floating toolbar.

Test plan:
Create 2 baskets with orders
Close 1 basket
Click on the 'show all details' links and confirm it works as expected
Also confirm that the toolbar works correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
---
 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
index bf37a37..6903a01 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
@@ -38,7 +38,7 @@
     }
 
     $(document).ready(function() {
-        $('#toolbar').fixFloat();
+        if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
         $("#show_all_details").click(function(){
             updateColumnsVisibility($(this).is(":checked"));
         });
-- 
2.1.4