diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt index 1ae68e74dc..f55d4fc276 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt @@ -25,7 +25,7 @@ $(document).ready(function() { // DataTables removes hidden rows from the DOM, so we can't expect a // "regular" submit to work and we need to build another form containing // all form elements, and then submit this form. - $('form').submit(function(e) { + $('#tabs form').submit(function(e) { e.preventDefault(); var form = $(this); @@ -49,19 +49,17 @@ $(document).ready(function() { $(".CheckNone").click(function(e){ e.preventDefault(); var form = $(this).parents("form").first(); - var table = form.find('table').dataTable(); - table.$('input[type="checkbox"]').attr('checked', false); + form.find('table input[type="checkbox"]').prop('checked', false); enableCheckboxActions(form); }); $(".CheckAll").click(function(e){ e.preventDefault(); var form = $(this).parents("form").first(); - var table = form.find('table').dataTable(); - table.$('input[type="checkbox"]').attr('checked', true); + form.find('table input[type="checkbox"]').prop('checked', true); enableCheckboxActions(form); }); - $("input:checkbox").click(function(){ + $('#tabs table').on('click', 'input:checkbox', function() { var form = $(this).parents("form").first(); enableCheckboxActions(form); }); @@ -88,6 +86,9 @@ $(document).ready(function() { return false; }); + $('#tabs form').each(function() { + enableCheckboxActions($(this)); + }); }); function enableCheckboxActions(form){ @@ -136,8 +137,9 @@ function enableCheckboxActions(form){