mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add collapsing behaviour to resolved comments.
This commit is contained in:
parent
5eece9f5d9
commit
3968761ac8
2 changed files with 17 additions and 2 deletions
|
@ -206,7 +206,13 @@ script(type='text/ng-template', id='resolvedCommentEntryTemplate')
|
|||
.rp-resolved-comment-context
|
||||
| Quoted text on
|
||||
span.rp-resolved-comment-context-file {{ thread.docName }}
|
||||
p.rp-resolved-comment-context-quote {{ thread.content }}
|
||||
p.rp-resolved-comment-context-quote
|
||||
span {{ thread.content | limitTo:(isCollapsed ? contentLimit : thread.content.length)}}
|
||||
a.rp-collapse-toggle(
|
||||
href
|
||||
ng-if="needsCollapsing"
|
||||
ng-click="toggleCollapse();"
|
||||
) {{ isCollapsed ? '(more)' : '(less)' }}
|
||||
.rp-comment(
|
||||
ng-repeat="comment in thread.messages track by comment.id"
|
||||
)
|
||||
|
|
|
@ -8,4 +8,13 @@ define [
|
|||
thread: "="
|
||||
permissions: "="
|
||||
onUnresolve: "&"
|
||||
onDelete: "&"
|
||||
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"
|
Loading…
Reference in a new issue