-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecf1237
commit ca8e311
Showing
13 changed files
with
223 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
(function ($) { | ||
'use strict'; | ||
|
||
/** | ||
* All of the code for admin-facing JavaScript source | ||
* should reside in this file. | ||
*/ | ||
|
||
$(document).ready(function () { | ||
|
||
initToolTips(); | ||
function initToolTips() { | ||
$('.pp-title-tooltip').each(function() { | ||
var $this = $(this); | ||
var titleText = $this.attr('title'); | ||
|
||
if (titleText && titleText !== '') { | ||
$this.removeAttr('title'); | ||
|
||
var $tooltip = $('<div class="pp-title-tooltip-text"></div>').text(titleText); | ||
$('body').append($tooltip); | ||
|
||
$this.hover(function() { | ||
$tooltip.show(); | ||
|
||
// Adjust the tooltip position to account for the arrow | ||
var tooltipTop = $this.offset().top - $tooltip.outerHeight() - 10; // Position 10px above the element | ||
var tooltipLeft = $this.offset().left + ($this.outerWidth() / 2) - ($tooltip.outerWidth() / 2); | ||
|
||
$tooltip.css({ | ||
top: tooltipTop + 'px', | ||
left: tooltipLeft + 'px', | ||
position: 'absolute' | ||
}); | ||
}, function() { | ||
$tooltip.hide(); | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
}); | ||
|
||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.