🚧 dinglehopper: Display segment id in the corresponding column

pull/38/head
Gerber, Mike 5 years ago
parent a448133394
commit 25191b24f6

@ -71,8 +71,8 @@ def gen_diff_report(gt_in, ocr_in, css_prefix, joiner, none):
return \ return \
''' '''
<div class="row"> <div class="row">
<div class="col-md-6 gt">{}</div> <div class="col-md-6 gt"><div class="status-box"></div>{}</div>
<div class="col-md-6 ocr">{}</div> <div class="col-md-6 ocr"><div class="status-box"></div>{}</div>
</div> </div>
'''.format(gtx, ocrx) '''.format(gtx, ocrx)

@ -26,7 +26,7 @@
border: 2px solid; border: 2px solid;
border-radius: 5px; border-radius: 5px;
} }
#status-box { .status-box {
position: fixed; position: fixed;
background: grey; background: grey;
color: white; color: white;
@ -39,10 +39,6 @@
<div id="status-box"> foo</div>
<div class="container"> <div class="container">
{{ gt }}<br> {{ gt }}<br>

@ -8,12 +8,12 @@ $(document).ready(function() {
$('.' + c).addClass('diff-highlight'); $('.' + c).addClass('diff-highlight');
segment_id = $(this).attr('data-segment-id'); segment_id = $(this).attr('data-segment-id');
$('#status-box').text(segment_id); $(this).closest('div').find('.status-box').text(segment_id);
}); });
$('.diff').mouseout(function() { $('.diff').mouseout(function() {
let c = find_diff_class($(this).attr('class')); let c = find_diff_class($(this).attr('class'));
$('.' + c).removeClass('diff-highlight'); $('.' + c).removeClass('diff-highlight');
$('#status-box').text(''); $(this).closest('div').find('.status-box').text('');
}); });
}); });

Loading…
Cancel
Save