Commit 1bde1985 authored by Luke Howell's avatar Luke Howell

Fix tooltip for Copy to clipboard button.

Fix "Copy to clipboard" tooltip to say "Copied!" when clipboard button
is clicked.

Closes #22022
parent 80fef70b
...@@ -22,6 +22,7 @@ v 8.13.0 (unreleased) ...@@ -22,6 +22,7 @@ v 8.13.0 (unreleased)
- Fix broken repository 500 errors in project list - Fix broken repository 500 errors in project list
v 8.12.4 (unreleased) v 8.12.4 (unreleased)
- Fix "Copy to clipboard" tooltip to say "Copied!" when clipboard button is clicked. (lukehowell)
v 8.12.3 v 8.12.3
- Update Gitlab Shell to support low IO priority for storage moves - Update Gitlab Shell to support low IO priority for storage moves
......
...@@ -26,15 +26,15 @@ ...@@ -26,15 +26,15 @@
}; };
showTooltip = function(target, title) { showTooltip = function(target, title) {
return $(target).tooltip({ var $target = $(target);
container: 'body', var originalTitle = $target.data('original-title');
html: 'true',
placement: 'auto bottom', $target
title: title, .attr('title', 'Copied!')
trigger: 'manual' .tooltip('fixTitle')
}).tooltip('show').one('mouseleave', function() { .tooltip('show')
return $(this).tooltip('hide'); .attr('title', originalTitle)
}); .tooltip('fixTitle');
}; };
$(function() { $(function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment