Commit 88947126 authored by Randall Leeds's avatar Randall Leeds

shift+enter save shortcut

closes #224
parent 343724c7
......@@ -9,8 +9,12 @@ annotation = ['$filter', ($filter) ->
post: (scope, iElement, iAttrs, controller) ->
return unless controller
# Publish the controller
scope.model = controller
# Bind shift+enter to save
iElement.find('textarea').bind
keydown: (e) ->
if e.keyCode == 13 && e.shiftKey
e.preventDefault()
scope.save()
# Format the annotation for display
controller.$formatters.push (value) ->
......@@ -32,6 +36,9 @@ annotation = ['$filter', ($filter) ->
#scope.previewText = ($filter 'converter') scope.editText
else
scope.previewText = ''
# Publish the controller
scope.model = controller
controller: 'AnnotationController'
priority: 100 # Must run before ngModel
require: '?ngModel'
......
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