Bug 16230 - Show tooltip with menu item when fund cannot be deleted
Summary: Show tooltip with menu item when fund cannot be deleted
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P3 minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 2310
  Show dependency treegraph
 
Reported: 2016-04-08 16:47 UTC by Owen Leonard
Modified: 2017-06-14 22:14 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 16230 - Show tooltip with menu item when fund cannot be deleted (1.89 KB, patch)
2016-04-08 17:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16230 - Show tooltip with menu item when fund cannot be deleted (2.07 KB, patch)
2016-04-11 03:54 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 16230 - Show tooltip with menu item when fund cannot be deleted (2.13 KB, patch)
2016-04-11 05:52 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-04-08 16:47:02 UTC
In Acquisitions -> Funds, if you cannot delete a fund (for instance, because it has children), the "Delete" menu item is grayed out. The menu has the correct markup to trigger a Bootstrap tooltip, but there isn't the correct JavaScript to trigger its display.
Comment 1 Owen Leonard 2016-04-08 17:37:50 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-04-11 03:54:42 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-11 05:52:31 UTC
Created attachment 50109 [details] [review]
[PASSED QA] Bug 16230 - Show tooltip with menu item when fund cannot be deleted

This patch enables Bootstrap to generate a tooltip for the fund deletion
menu item when a fund cannot be deleted because it has children.

Also changed: Enable translation of the associated error message.

To test you must have at least one fund which has a child fund. Apply
the patch and go to Administration -> Funds.

- In the list of funds, find a fund which has children.
- Click the "Actions" menu. The "Delete" item should be disabled.
- Hovering over the "Delete" item should display a Bootstrap-style
  tooltip with the explanation "This fund has children."
- Clicking the "Delete" item should trigger an alert, "This fund has
  children. It cannot be deleted."
- Clicking "Delete" on funds without children should work correctly.

NOTE: Before tooltip shows in Chrome, but not bootstrap styling.
      After, bootstrap styled.
      The use of _() will add the ability to translate the alert().

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Brendan Gallagher 2016-04-22 22:57:02 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 5 Julian Maurice 2016-05-16 11:20:47 UTC
Patch pushed to 3.22.x, will be in 3.22.7