From: John Yorio Date: Mon, 13 Jun 2016 13:49:27 +0000 (-0400) Subject: hide last-checkout area when "Always show checkouts immediately" enabled X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=6d63573393b911444db599b1b2e2d5c680ee5a15 hide last-checkout area when "Always show checkouts immediately" enabled When the "Always show checkouts immediately" box is checked, hide the display of the last item checked out underneath the item barcode input. This saves a bit of vertical space and removes redundancy. cf. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14180#c4 Requesting-customer: Saugeen Signed-off-by: Galen Charlton --- diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index bf419d7..5157068 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -147,6 +147,12 @@ $(document).ready(function() { if ( this.checked && typeof issuesTable === 'undefined') { $('#issues-table-load-now-button').click(); } + if (this.checked){ + $('.lastchecked').next('.lastchecked').hide(); + } else { + $('.lastchecked').next('.lastchecked').show(); + } + barcodefield.focus(); }); $('#issues-table-load-now-button').click(function(){ @@ -158,6 +164,9 @@ $(document).ready(function() { if ( $.cookie("issues-table-load-immediately-" + script) == "true" ) { LoadIssuesTable(); $('#issues-table-load-immediately').prop('checked', true); + $('.lastchecked').next('.lastchecked').hide(); + } else { + $('.lastchecked').next('.lastchecked').show(); } $('#issues-table-load-immediately').on( "change", function(){ $.cookie("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365 });