From 6d63573393b911444db599b1b2e2d5c680ee5a15 Mon Sep 17 00:00:00 2001 From: John Yorio Date: Mon, 13 Jun 2016 09:49:27 -0400 Subject: [PATCH] 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 --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) 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 }); -- 1.7.2.5