From 3828ac1b4f3712fcca6a1afc175fd58b786e4010 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 31 May 2017 13:58:27 +0000 Subject: [PATCH] [SIGNED OFF] Bug 18708 [Revised] Show itemBarcodeFallbackSearch results in a modal window This patch modifies the circulation template so that itemBarcodeFallbackSearch results show in a modal window. To test, enable the itemBarcodeFallbackSearch system preference and open a patron's account in circulation. - Submit a string which will return search results. When the page reloads a modal should display showing a table of title search results. - Test the "Check out" button and confirm that the correct item is submitted. - Test closing the modal and re-displaying it using the new "Show matching titles" button. - Confirm that the "Add record using fast cataloging" button still works correctly. - Submit a string which will return no results. No modal window should display, and only the "Add record" button should appear. - Confirm that normal checkout works correctly. - Test with itemBarcodeFallbackSearch disabled, and with a user who lacks Fast Cataloging permission. Revision removes a heading which was made redundant by the modal markup. Signed-off-by: Josef Moravec Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 18 ++++- .../prog/en/modules/circ/circulation.tt | 89 +++++++++++++++------- .../intranet-tmpl/prog/js/pages/circulation.js | 4 + 3 files changed, 82 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index fb09d51..784fc3e 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -1177,24 +1177,32 @@ div.alert strong { list-style-position:inside; } -.dialog button { +.dialog button, +.dialog a.approve { background: #fff none; border: 1px outset #999999; border-top-color: #666; border-left-color: #666; + color: #000; margin : .4em; padding : .4em; white-space: pre-line; } -.dialog button:hover { +.dialog button:hover, +.dialog a.approve:hover { background-color : #ffc; } -.dialog button:active { +.dialog button:active, +.dialog a.approve:active { border : 1px inset #999999; } +.dialog a.approve { + display: inline-block; +} + .approve i.fa, .success i.fa { color: green; @@ -2638,6 +2646,10 @@ button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit overflow-y: auto; } +.modal-dialog.modal-wide { + width: 80%; +} + .btn-group label, .btn-group select { font-size: 13px; 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 21fbbf2..184a939 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -438,34 +438,24 @@ $(document).ready(function() { [% IF ( UNKNOWN_BARCODE ) %]
  • The barcode was not found: [% barcode |html %] - [% IF ( fast_cataloging ) %] - [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] - Add record using fast cataloging - [% END %] - [% END %] - [% IF ( FALLBACK ) %] - [% IF options %] -
    The following items were found by searching: - [% FOREACH book IN options %] -
    -
    - [% IF (forceallow) %][% END %] - - - - - - - -
    - [% END %] - [% ELSE %] -
    No items were found by searching. - [% END %] - [% END %] +
    + [% IF ( FALLBACK ) %] + [% IF options %] + + [% ELSE %] +
    No items were found by searching.
    + [% END %] + [% END %] -
  • + [% IF ( fast_cataloging ) %] + [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] + Add record using fast cataloging + [% END %] + [% END %] + + + [% END %] [% IF ( NOT_FOR_LOAN ) %] @@ -545,6 +535,53 @@ $(document).ready(function() { [% END %] + + [% IF ( FALLBACK ) %] + [% IF options %] + + + + [% END %] + [% END %] + [% ELSE %] [% IF (forceallow) %]
    Restriction overridden temporarily
    diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js index cbe274b..aeeaf8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -81,6 +81,10 @@ $(document).ready(function() { $("#barcode").focus(); }); + $("#itemSearchFallback").ready(function(){ + $("#itemSearchFallback").modal("show"); + }); + }); function export_checkouts(format) { -- 2.7.4