Bug 18685: (bug 18551 follow-up) Fix patron toolbar

Bug 18551 moves the way the filters are displayed and so the position of
the patron toolbar must be recalculated.

Test plan:
Edit patron's detail
open the filters, scrolldown
close the filters, scrolldown
=> The toolbar must be correctly placed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This commit is contained in:
Jonathan Druart 2017-06-12 11:38:59 -03:00
parent 6d78d7a610
commit 6ae6d4bcb5

View file

@ -13,16 +13,16 @@ $(document).ready(function() {
$("#saverecord").css({ 'margin-left': 0 });
var original_offset = $("#toolbar").position().top;
var additional_height = $("#filters").height();
$('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
$('#toolbar').fixFloat({ 'originalOffset': original_offset });
$("#filteraction_on").on("click", function(){
$(window).off('scroll');
$("#toolbar").css({ top: original_offset });
$('#toolbar').fixFloat({ 'originalOffset': original_offset });
$("#toolbar").css({ top: original_offset + additional_height });
$('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
});
$("#filteraction_off").on("click", function(){
$(window).off('scroll');
$("#toolbar").css({ top: original_offset - additional_height});
$('#toolbar').fixFloat({ 'originalOffset': original_offset - additional_height });
$("#toolbar").css({ top: original_offset });
$('#toolbar').fixFloat({ 'originalOffset': original_offset });
})
[% IF categorycode %]