From 93463e943821bc3ee782969693083f399e28c33f 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. --- .../intranet-tmpl/prog/en/css/staff-global.css | 37 +++++---- .../intranet-tmpl/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 a638129..47875d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -509,12 +509,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; } @@ -998,32 +997,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 cea3e88..92dba4b 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 6a01327..9215488 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -644,7 +644,7 @@ No patron matched [% message %] [% IF (forceallow) %][% END %] - +
Enter item barcode:
@@ -655,18 +655,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 %] @@ -680,45 +706,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.1.4