🚧 dinglehopper: Use a Bootstrap tooltip for the segment id
parent
a1c1b9c5ca
commit
4b86f01b15
@ -1,19 +1,15 @@
|
||||
function find_diff_class(classes) {
|
||||
return classes.split(/\s+/).find(x => x.match(/.diff\d.*/));
|
||||
return $('.' + classes.split(/\s+/).find(x => x.match(/.diff\d.*/)));
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.diff').mouseover(function() {
|
||||
let c = find_diff_class($(this).attr('class'));
|
||||
$('.' + c).addClass('diff-highlight');
|
||||
/* Enable Bootstrap tooltips */
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
segment_id = $(this).attr('data-segment-id');
|
||||
$(this).closest('div').find('.status-box').text(segment_id);
|
||||
$('.diff').mouseover(function() {
|
||||
find_diff_class($(this).attr('class')).addClass('diff-highlight');
|
||||
});
|
||||
$('.diff').mouseout(function() {
|
||||
let c = find_diff_class($(this).attr('class'));
|
||||
$('.' + c).removeClass('diff-highlight');
|
||||
|
||||
$(this).closest('div').find('.status-box').text('');
|
||||
find_diff_class($(this).attr('class')).removeClass('diff-highlight');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue