From afae8e583a2f020941c341be374712ab72365126 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 22 Mar 2016 09:04:25 -0400 Subject: [PATCH] Bug 11565 [QA Followup] - Hide checkout options when not in use This follow-up reformats the checkout screen so that checkout settings like specify due date, on-site checkout, and override high holds are grouped in a panel which is hidden by default. Clicking a link shows all the available settings. Also modified in this patch: The default color for div.hint has been made a little darker for readability. To test, apply the patch and clear your browser cache if necessary. - Check out to a patron who is not blocked from checking out. - Click the "Checkout settings" link and confirm that the settings panel is displayed. - Test that the settings in the panel behave as expected. - Test with preferences on and off: decreaseLoanHighHolds, OnSiteCheckouts, SpecifyDueDate. NOTE: This patch is a work in progress. It does not address the issue of checkout setting being hidden even if they are active. Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- .../prog/en/css/staff-global.css | 37 +++++--- .../prog/en/js/pages/circulation.js | 15 +++ .../prog/en/modules/circ/circulation.tt | 93 ++++++++++--------- 3 files changed, 87 insertions(+), 58 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 1780e00f25..697e7255c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -517,12 +517,11 @@ fieldset.brief ol, fieldset.brief li { } .hint { - color : #999999; + color : #666; font-size : 95%; } fieldset.brief div.hint, fieldset.rows div.hint, div.yui-u div.hint { - font-size : 95%; margin-bottom : .4em; } @@ -1006,32 +1005,40 @@ tr.highlight th[scope=row] { border-color : #BCBCBC; } -#circ_circulation_issue label { - font-size: 105%; - font-weight : bold; -} - -#circ_circulation_issue div.hint { - color : #666666; - margin: .2em 0; +label.circ_barcode { + font-size: 105%; + font-weight : bold; } -.date-select, -.onsite_checkout-select { +.checkout-setting { font-size : 85%; padding-top : .3em; } -#circ_circulation_issue .date-select label, -.date-select label { +.checkout-setting label { font-size : inherit; font-weight: normal; } -.date-select input { +.checkout-setting input { vertical-align: middle; } +.checkout-settings { + background-color: #f4f8f9; + border-radius: 0; + border-top: 2px solid #b9d8d9; + display: none; + margin-left: -1em; + margin-right: -1em; + margin-top: 1em; + padding: 1em 1em 0; +} + +#show-checkout-settings { + margin-top: .5em; +} + tr.expired td { color : #999999; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js index cea3e88265..92dba4b524 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js @@ -45,6 +45,21 @@ $(document).ready(function() { export_checkouts(output_format); return false; }); + + var checkout_settings = $(".checkout-settings"); + var checkout_settings_icon = $(".checkout-settings-icon"); + + $("#show-checkout-settings a").on("click",function(){ + if( checkout_settings.is(":hidden")){ + checkout_settings.show(); + checkout_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down"); + } else { + $("#barcode").focus(); + checkout_settings.hide(); + checkout_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right"); + } + }); + }); function export_checkouts(format) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 633cc0dad9..302824255b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -650,7 +650,7 @@ No patron matched [% message %] [% IF (forceallow) %][% END %] - +
Enter item barcode:
@@ -661,18 +661,44 @@ No patron matched [% message %] [% END %] - [% UNLESS noissues %] -
- [% IF NEEDSCONFIRMATION %] - - [% ELSE %] - + + +
+ + [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %] + [% IF ( SpecifyDueDate ) %] +
+
Specify due date [% INCLUDE 'date-format.inc' %]:
+ [% IF ( duedatespec ) %] + + [% ELSE %] + + [% END %] + + [% IF ( stickyduedate ) %] + + [% ELSE %] + + [% END %] + +
[% END %] + [% END %] - + [% UNLESS ( noissues ) %] +
+ [% IF NEEDSCONFIRMATION %] + + [% ELSE %] + + [% END %] - - [% IF Koha.Preference('decreaseLoanHighHolds') %] + +
+ [% IF Koha.Preference('decreaseLoanHighHolds') %] +
[% IF NEEDSCONFIRMATION %] [% IF override_high_holds %] @@ -686,45 +712,26 @@ No patron matched [% message %] [% END %] [% END %] - - [% END %] - -
- [% END %] + +
+ [% END %] + [% END %] - [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %] - [% IF ( SpecifyDueDate ) %] -
-
Specify due date [% INCLUDE 'date-format.inc' %]:
- [% IF ( duedatespec ) %] - - [% ELSE %] - - [% END %] - - [% IF ( stickyduedate ) %] - + [% IF Koha.Preference('OnSiteCheckouts') %] +
+ [% IF noissues %] +
+ + + +
[% ELSE %] - + [% END %] -
[% END %] - [% END %] - [% IF Koha.Preference('OnSiteCheckouts') %] -
- [% IF noissues %] -
- - - -
- [% ELSE %] - - [% END %] -
- [% END %] +
-- 2.39.5