|
|
@@ -30,7 +30,7 @@
|
|
|
entry="entry"
|
|
|
threads="reviewPanel.commentThreads"
|
|
|
on-resolve="resolveComment(entry, entry_id)"
|
|
|
- on-unresolve="unresolveComment(entry_id)"
|
|
|
+ on-unresolve="unresolveComment(entry, entry_id)"
|
|
|
on-show-thread="showThread(entry)"
|
|
|
on-hide-thread="hideThread(entry)"
|
|
|
on-delete="deleteComment(entry_id)"
|
|
|
@@ -77,7 +77,7 @@
|
|
|
entry="entry"
|
|
|
users="users"
|
|
|
on-resolve="resolveComment(entry, entry.id)"
|
|
|
- on-unresolve="unresolveComment(entry.id)"
|
|
|
+ on-unresolve="unresolveComment(entry, entry.id)"
|
|
|
on-delete="deleteComment(entry.id)"
|
|
|
on-reply="submitReply(entry, entry_id);"
|
|
|
on-indicator-click="toggleReviewPanel();"
|
|
|
@@ -139,18 +139,18 @@ script(type='text/ng-template', id='changeEntryTemplate')
|
|
|
|
|
|
script(type='text/ng-template', id='commentEntryTemplate')
|
|
|
div
|
|
|
- .rp-entry-callout.rp-entry-callout-comment(ng-if="!entry.resolved")
|
|
|
+ .rp-entry-callout.rp-entry-callout-comment(ng-if="!threads[entry.thread_id].resolved")
|
|
|
.rp-entry-indicator(
|
|
|
ng-class="{ 'rp-entry-indicator-focused': entry.focused }"
|
|
|
ng-click="onIndicatorClick();"
|
|
|
)
|
|
|
i.fa.fa-comment
|
|
|
.rp-entry.rp-entry-comment(
|
|
|
- ng-class="{ 'rp-entry-focused': entry.focused, 'rp-entry-comment-resolved': entry.resolved}"
|
|
|
+ ng-class="{ 'rp-entry-focused': entry.focused, 'rp-entry-comment-resolved': threads[entry.thread_id].resolved}"
|
|
|
)
|
|
|
.rp-comment(
|
|
|
- ng-if="!entry.resolved || entry.showWhenResolved"
|
|
|
- ng-repeat="comment in threads[entry.thread_id]"
|
|
|
+ ng-if="!threads[entry.thread_id].resolved || entry.showWhenResolved"
|
|
|
+ ng-repeat="comment in threads[entry.thread_id].messages"
|
|
|
ng-class="comment.user.isSelf ? 'rp-comment-self' : '';"
|
|
|
)
|
|
|
.rp-avatar(
|
|
|
@@ -163,29 +163,29 @@ script(type='text/ng-template', id='commentEntryTemplate')
|
|
|
| {{ comment.timestamp | date : 'MMM d, y h:mm a' }}
|
|
|
| •
|
|
|
span(style="color: hsl({{ comment.user.hue }}, 70%, 40%);") {{ comment.user.name }}
|
|
|
- .rp-comment-reply(ng-if="!entry.resolved || entry.showWhenResolved")
|
|
|
+ .rp-comment-reply(ng-if="!threads[entry.thread_id].resolved || entry.showWhenResolved")
|
|
|
textarea.rp-comment-input(
|
|
|
ng-model="entry.replyContent"
|
|
|
ng-keypress="handleCommentReplyKeyPress($event);"
|
|
|
stop-propagation="click"
|
|
|
placeholder="{{ 'Hit \"Enter\" to reply' + (entry.resolved ? ' and re-open' : '') }}"
|
|
|
)
|
|
|
- .rp-comment-resolved-description(ng-if="entry.resolved && !entry.showWhenResolved")
|
|
|
+ .rp-comment-resolved-description(ng-if="threads[entry.thread_id].resolved && !entry.showWhenResolved")
|
|
|
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' }}
|
|
|
+ span(style="color: hsl({{ threads[entry.thread_id].resolved_by_user.hue }}, 70%, 40%);") {{ threads[entry.thread_id].resolved_by_user.name }}
|
|
|
+ div {{ threads[entry.thread_id].resolved_at | date : 'MMM d, y h:mm a' }}
|
|
|
.rp-entry-actions
|
|
|
- a.rp-entry-button(href, ng-click="onResolve();", ng-if="!entry.resolved")
|
|
|
+ a.rp-entry-button(href, ng-click="onResolve();", ng-if="!threads[entry.thread_id].resolved")
|
|
|
i.fa.fa-check
|
|
|
| Mark as resolved
|
|
|
- a.rp-entry-button(href, ng-click="onShowThread();", ng-if="entry.resolved && !entry.showWhenResolved")
|
|
|
+ a.rp-entry-button(href, ng-click="onShowThread();", ng-if="threads[entry.thread_id].resolved && !entry.showWhenResolved")
|
|
|
| Show
|
|
|
- a.rp-entry-button(href, ng-click="onHideThread();", ng-if="entry.resolved && entry.showWhenResolved")
|
|
|
+ a.rp-entry-button(href, ng-click="onHideThread();", ng-if="threads[entry.thread_id].resolved && entry.showWhenResolved")
|
|
|
| Hide
|
|
|
- a.rp-entry-button(href, ng-click="onUnresolve();", ng-if="entry.resolved")
|
|
|
+ a.rp-entry-button(href, ng-click="onUnresolve();", ng-if="threads[entry.thread_id].resolved")
|
|
|
| Re-open
|
|
|
- a.rp-entry-button(href, ng-click="onDelete();", ng-if="entry.resolved")
|
|
|
+ a.rp-entry-button(href, ng-click="onDelete();", ng-if="threads[entry.thread_id].resolved")
|
|
|
| Delete
|
|
|
|
|
|
|