From e61529c9a29abc97bf2a45558635bcf7590985b2 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 20 Oct 2013 08:12:29 -0700 Subject: [PATCH] [PASSED QA] Bug 2310 - Delete grayed out w/out explanation 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. --- .../intranet-tmpl/prog/en/css/staff-global.css | 6 ++++++ .../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 aa7310c..581d59b 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 258ccc6..caa2fbf 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
  • -- 1.7.9.5