mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
Merge branch 'ja-review-panel' of github.com:sharelatex/web-sharelatex into ja-review-panel
This commit is contained in:
@@ -135,7 +135,7 @@ script(type='text/ng-template', id='commentEntryTemplate')
|
||||
)
|
||||
i.fa.fa-comment
|
||||
.rp-entry.rp-entry-comment(
|
||||
ng-class="entry.focused ? 'rp-entry-focused' : '';"
|
||||
ng-class="{ 'rp-entry-focused': entry.focused, 'rp-entry-comment-resolved': entry.resolved}"
|
||||
)
|
||||
.rp-comment(
|
||||
ng-if="!entry.resolved || entry.showWhenResolved"
|
||||
@@ -160,7 +160,10 @@ script(type='text/ng-template', id='commentEntryTemplate')
|
||||
placeholder="{{ 'Hit \"Enter\" to reply' + (entry.resolved ? ' and re-open' : '') }}"
|
||||
)
|
||||
.rp-comment-resolved-description(ng-if="entry.resolved && !entry.showWhenResolved")
|
||||
| Resolved comment
|
||||
div
|
||||
| Comment resolved by
|
||||
span(style="color: hsl({{ users[entry.resolved_data.user_id].hue }}, 70%, 40%);") {{ users[entry.resolved_data.user_id].name }}
|
||||
div {{ entry.resolved_data.ts | date : 'MMM d, y h:mm a' }}
|
||||
.rp-entry-actions
|
||||
a.rp-entry-button(href, ng-click="onResolve();", ng-if="!entry.resolved")
|
||||
i.fa.fa-check
|
||||
|
||||
@@ -48,8 +48,8 @@ define [
|
||||
@$scope.$on "comment:remove", (e, comment_id) =>
|
||||
@removeCommentId(comment_id)
|
||||
|
||||
@$scope.$on "comment:resolve", (e, comment_id) =>
|
||||
@resolveCommentId(comment_id)
|
||||
@$scope.$on "comment:resolve", (e, comment_id, user_id) =>
|
||||
@resolveCommentId(comment_id, user_id)
|
||||
|
||||
@$scope.$on "comment:unresolve", (e, comment_id) =>
|
||||
@unresolveCommentId(comment_id)
|
||||
@@ -206,8 +206,10 @@ define [
|
||||
removeCommentId: (comment_id) ->
|
||||
@changesTracker.removeCommentId(comment_id)
|
||||
|
||||
resolveCommentId: (comment_id) ->
|
||||
@changesTracker.resolveCommentId(comment_id)
|
||||
resolveCommentId: (comment_id, user_id) ->
|
||||
@changesTracker.resolveCommentId(comment_id, {
|
||||
user_id, ts: new Date()
|
||||
})
|
||||
|
||||
unresolveCommentId: (comment_id) ->
|
||||
@changesTracker.unresolveCommentId(comment_id)
|
||||
|
||||
@@ -69,10 +69,11 @@ define [
|
||||
break
|
||||
return comment
|
||||
|
||||
resolveCommentId: (comment_id) ->
|
||||
resolveCommentId: (comment_id, resolved_data) ->
|
||||
comment = @getComment(comment_id)
|
||||
return if !comment?
|
||||
comment.metadata.resolved = true
|
||||
comment.metadata.resolved_data = resolved_data
|
||||
@emit "comment:resolved", comment
|
||||
|
||||
unresolveCommentId: (comment_id) ->
|
||||
|
||||
@@ -196,6 +196,7 @@ define [
|
||||
type: "comment"
|
||||
thread: comment.metadata.thread
|
||||
resolved: comment.metadata.resolved
|
||||
resolved_data: comment.metadata.resolved_data
|
||||
offset: comment.offset
|
||||
length: comment.length
|
||||
}
|
||||
@@ -308,7 +309,7 @@ define [
|
||||
$scope.resolveComment = (entry, entry_id) ->
|
||||
entry.showWhenResolved = false
|
||||
entry.focused = false
|
||||
$scope.$broadcast "comment:resolve", entry_id
|
||||
$scope.$broadcast "comment:resolve", entry_id, window.user_id
|
||||
|
||||
$scope.unresolveComment = (entry_id) ->
|
||||
$scope.$broadcast "comment:unresolve", entry_id
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
@rp-dim-red : #f3cdce;
|
||||
@rp-yellow : #f3b111;
|
||||
@rp-dim-yellow : #ffe9b2;
|
||||
@rp-grey : #aaaaaa;
|
||||
|
||||
@rp-type-blue : #6b7797;
|
||||
@rp-type-darkgrey : #3f3f3f;
|
||||
@@ -236,6 +237,11 @@
|
||||
&-comment {
|
||||
border-color: @rp-yellow;
|
||||
}
|
||||
|
||||
&-comment-resolved {
|
||||
border-color: @rp-grey;
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
&-add-comment {
|
||||
background-color: transparent;
|
||||
|
||||
Reference in New Issue
Block a user