|
@@ -5,6 +5,24 @@
|
|
|
|
|
|
function init() {
|
|
|
|
|
|
+ // on note-section hover, highlight the according left-tree node(s)
|
|
|
+ $(document)
|
|
|
+ .off('mouseenter', '.note-section')
|
|
|
+ .on('mouseenter', '.note-section', function(){
|
|
|
+ $('.note-tree-node').removeClass('hovered');
|
|
|
+ let target = $('.note-tree-node a[data-segment-uid="' + $(this).attr('data-segment-uid') + '"]');
|
|
|
+ target.parent().addClass('hovered');
|
|
|
+ target.parent().parents('.note-tree-node').addClass('hovered');
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document)
|
|
|
+ .off('mouseleave', '.note-section')
|
|
|
+ .on('mouseleave', '.note-section', () => {
|
|
|
+ $('.note-tree-node').removeClass('hovered');
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
// print note
|
|
|
$(document)
|
|
|
.off('click.print', '.print-note')
|