@@ -, +, @@ --- .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -428,26 +428,27 @@ return false; }); - var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, { - "order": [[ 1, "asc" ]], - "columnDefs": [ - { "targets": [ 0,-1 ], "sortable": false, "searchable": false } - ], - "columns": [ - null, - { "type": "anti-the" }, - null, - null, - null - ], - - })); - - var buttons = new $.fn.dataTable.Buttons(itemst, { - buttons: [ - 'print' - ] - }).container().appendTo($('#toolbar')); + if( $("#itemst").length > 0 ){ + var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, { + "order": [[ 1, "asc" ]], + "columnDefs": [ + { "targets": [ 0,-1 ], "sortable": false, "searchable": false } + ], + "columns": [ + null, + { "type": "anti-the" }, + null, + null, + null + ], + })); + + var buttons = new $.fn.dataTable.Buttons(itemst, { + buttons: [ + 'print' + ] + }).container().appendTo($('#toolbar')); + } $(".cb").change(function(){ selRecord( $(this).val(), $(this).prop("checked") ); --