mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
18 lines
416 B
CoffeeScript
18 lines
416 B
CoffeeScript
|
define [
|
||
|
"base"
|
||
|
], (App) ->
|
||
|
App.directive "commentEntry", () ->
|
||
|
restrict: "E"
|
||
|
templateUrl: "commentEntryTemplate"
|
||
|
scope:
|
||
|
entry: "="
|
||
|
users: "="
|
||
|
onResolve: "&"
|
||
|
onReply: "&"
|
||
|
link: (scope, element, attrs) ->
|
||
|
scope.handleCommentReplyKeyPress = (ev) ->
|
||
|
if ev.keyCode == 13 and !ev.shiftKey and !ev.ctrlKey and !ev.metaKey
|
||
|
ev.preventDefault()
|
||
|
ev.target.blur()
|
||
|
scope.onReply()
|
||
|
|