mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 14:54:03 -05:00
20 lines
No EOL
516 B
CoffeeScript
20 lines
No EOL
516 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.directive "resolvedCommentEntry", () ->
|
|
restrict: "E"
|
|
templateUrl: "resolvedCommentEntryTemplate"
|
|
scope:
|
|
thread: "="
|
|
permissions: "="
|
|
onUnresolve: "&"
|
|
onDelete: "&"
|
|
link: (scope, element, attrs) ->
|
|
scope.contentLimit = 40
|
|
scope.needsCollapsing = scope.thread.content.length > scope.contentLimit
|
|
scope.isCollapsed = true
|
|
|
|
scope.toggleCollapse = () ->
|
|
scope.isCollapsed = !scope.isCollapsed
|
|
$timeout () ->
|
|
scope.$emit "review-panel:layout" |