Commit 45097825 authored by Ujvari Gergely's avatar Ujvari Gergely

Fix for highlight only annotations

parent ce39a850
......@@ -19,7 +19,8 @@ annotation = ['$filter', 'annotator', ($filter, annotator) ->
priority: 100 # Must run before ngModel
require: '?ngModel'
restrict: 'C'
scope: {}
scope:
mode: '@'
templateUrl: 'annotation.html'
]
......
annotation = ['$filter', 'annotator', ($filter, annotator) ->
link: (scope, elem, attrs, controller) ->
return unless controller?
# Bind shift+enter to save
elem.bind
keydown: (e) ->
if e.keyCode == 13 && e.shiftKey
e.preventDefault()
scope.save()
# Watch for changes
scope.$watch 'model.$modelValue.id', (id) ->
scope.thread = annotator.threading.idTable[id]
# Publish the controller
scope.model = controller
controller: 'AnnotationController'
priority: 100 # Must run before ngModel
require: '?ngModel'
restrict: 'C'
scope:
mode: '@'
templateUrl: 'annotation.html'
]
authentication = ->
base =
username: null
......
......@@ -163,7 +163,7 @@ class Hypothesis extends Annotator
matches = false
break
when 'text'
unless annotation.text.toLowerCase().indexOf(value.toLowerCase()) > -1
unless annotation.text? and annotation.text.toLowerCase().indexOf(value.toLowerCase()) > -1
matches = false
break
when 'time'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment