Fix annotation highlighting for multimode annotation

This commit is contained in:
Fernando Blat
2017-02-13 10:12:03 +01:00
parent faa6cb90ed
commit 667d86788e

View File

@@ -56,7 +56,14 @@ App.LegislationAnnotatable =
return
$('[data-annotation-id]').removeClass('current-annotation')
$(this).addClass('current-annotation')
parent = $(this).parents('[data-annotation-id]:eq(0)')
if parent.length
target = parent
else
target = $(this)
annotation_id = target.data('annotation-id')
$('[data-annotation-id="'+annotation_id+'"]').addClass('current-annotation')
App.LegislationAllegations.show_comments()
$("#comments-box").show()