mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
21 lines
No EOL
539 B
CoffeeScript
21 lines
No EOL
539 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 = false
|
|
scope.isCollapsed = true
|
|
|
|
scope.toggleCollapse = () ->
|
|
scope.isCollapsed = !scope.isCollapsed
|
|
|
|
scope.$watch "thread.content.length", (contentLength) ->
|
|
scope.needsCollapsing = contentLength > scope.contentLimit |