mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add directive to show change entries.
This commit is contained in:
parent
17acede8ce
commit
a6108480f5
2 changed files with 31 additions and 0 deletions
|
@ -5,6 +5,7 @@ define [
|
|||
"ide/review-panel/directives/reviewPanelSorted"
|
||||
"ide/review-panel/directives/reviewPanelToggle"
|
||||
"ide/review-panel/directives/changeEntry"
|
||||
"ide/review-panel/directives/aggregateChangeEntry"
|
||||
"ide/review-panel/directives/commentEntry"
|
||||
"ide/review-panel/directives/addCommentEntry"
|
||||
"ide/review-panel/directives/bulkActionsEntry"
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
App.directive "aggregateChangeEntry", ($timeout) ->
|
||||
restrict: "E"
|
||||
templateUrl: "aggregateChangeEntryTemplate"
|
||||
scope:
|
||||
entry: "="
|
||||
user: "="
|
||||
permissions: "="
|
||||
onAccept: "&"
|
||||
onReject: "&"
|
||||
onIndicatorClick: "&"
|
||||
onBodyClick: "&"
|
||||
link: (scope, element, attrs) ->
|
||||
scope.contentLimit = 40
|
||||
scope.isCollapsed = true
|
||||
scope.needsCollapsing = false
|
||||
|
||||
element.on "click", (e) ->
|
||||
if $(e.target).is('.rp-entry, .rp-entry-description, .rp-entry-body, .rp-entry-action-icon i')
|
||||
scope.onBodyClick()
|
||||
|
||||
scope.toggleCollapse = () ->
|
||||
scope.isCollapsed = !scope.isCollapsed
|
||||
$timeout () ->
|
||||
scope.$emit "review-panel:layout"
|
||||
|
||||
# scope.$watch "entry.content.length", (contentLength) ->
|
||||
# scope.needsCollapsing = contentLength > scope.contentLimit
|
Loading…
Reference in a new issue