From 8b037651780d86f6fc0576abe1a665a379a8a443 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 20 Oct 2013 08:12:29 -0700 Subject: [PATCH] Bug 2310: display tooltips explaining why patron menu items are disabled With some staff client menus options are displayed as disabled when the logged in user doesn't have permission to perform that function. This patch adds Bootstrap tooltips to patron menu items with text explaining why they are disabled. To test, log in as a user who lacks permission to modify patrons or set permissions. Open a patron record in circulation or patrons. Hovering over renew, delete, and set permissions links (in the patron toolbar "More" menu) should trigger a tooltip with a brief explanation. Test the "Update child to adult patron" link by viewing an adult patron. A separate patch will address catalog menu items. Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer New tooltip texts are translatable, patch passes all tests and QA script. Tested according to test plan in Chromium and Firefox. Signed-off-by: Galen Charlton (cherry picked from commit 01c101a6b9b60b685abca58fddfccb1087b4dbce) Signed-off-by: Fridolin SOMERS --- koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css | 6 ++++++ .../intranet-tmpl/prog/en/includes/members-toolbar.inc | 10 +++++----- 2 files changed, 11 insertions(+), 5 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 755a02a146..1f8ea3f562 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2570,6 +2570,12 @@ button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit font-size: 13px; } +.tooltip-inner { + white-space:pre-wrap; +} + +/* End Bootstrap overrides */ + .waiting { cursor: wait; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 258ccc6360..caa2fbf379 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -17,7 +17,7 @@ $(document).ready(function(){ $(".btn-group").removeClass("open"); });[% END %] [% END %] - + $("#updatechild, #patronflags, #renewpatron, #deletepatron").tooltip(); $("#exportcheckins").click(function(){ export_barcodes(); $(".btn-group").removeClass("open"); @@ -133,22 +133,22 @@ function searchToHold(){ [% IF ( CAN_user_borrowers ) %]
  • Renew patron
  • [% ELSE %] -
  • Renew patron
  • +
  • Renew patron
  • [% END %] [% IF ( CAN_user_permissions ) %]
  • Set permissions
  • [% ELSE %] -
  • Set permissions
  • +
  • Set permissions
  • [% END %] [% IF ( CAN_user_borrowers ) %]
  • Delete
  • [% ELSE %] -
  • Delete
  • +
  • Delete
  • [% END %] [% IF ( is_child ) %]
  • Update child to adult patron
  • [% ELSE %] -
  • Update child to adult patron
  • +
  • Update child to adult patron
  • [% END %]
  • Export today's checked in barcodes
  • -- 2.39.5