mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
23 lines
No EOL
520 B
CoffeeScript
23 lines
No EOL
520 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.directive "commentEntry", () ->
|
|
restrict: "E"
|
|
templateUrl: "commentEntryTemplate"
|
|
scope:
|
|
entry: "="
|
|
users: "="
|
|
onResolve: "&"
|
|
onReply: "&"
|
|
onIndicatorClick: "&"
|
|
onDelete: "&"
|
|
onUnresolve: "&"
|
|
onShowThread: "&"
|
|
onHideThread: "&"
|
|
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()
|
|
|