Jump to code when clicking on review panel entries

This commit is contained in:
James Allen 2017-01-26 16:04:08 +01:00
parent 32b0c6a4fb
commit 0479b01b9d

View file

@ -50,6 +50,7 @@
on-reject="rejectChange(entry_id);" on-reject="rejectChange(entry_id);"
on-accept="acceptChange(entry_id);" on-accept="acceptChange(entry_id);"
on-indicator-click="toggleReviewPanel();" on-indicator-click="toggleReviewPanel();"
ng-click="gotoEntry(editor.open_doc_id, entry)"
permissions="permissions" permissions="permissions"
) )
@ -62,6 +63,7 @@
on-indicator-click="toggleReviewPanel();" on-indicator-click="toggleReviewPanel();"
on-save-edit="saveEdit(entry.thread_id, comment)" on-save-edit="saveEdit(entry.thread_id, comment)"
on-delete="deleteComment(entry.thread_id, comment)" on-delete="deleteComment(entry.thread_id, comment)"
ng-click="gotoEntry(editor.open_doc_id, entry)"
permissions="permissions" permissions="permissions"
ng-if="!reviewPanel.loadingThreads" ng-if="!reviewPanel.loadingThreads"
) )
@ -150,28 +152,28 @@ script(type='text/ng-template', id='changeEntryTemplate')
i.rp-icon-delete(ng-switch-when="delete") i.rp-icon-delete(ng-switch-when="delete")
.rp-entry-details .rp-entry-details
.rp-entry-description(ng-switch="entry.type") .rp-entry-description(ng-switch="entry.type")
span(ng-switch-when="insert") Added  span(ng-switch-when="insert", stop-propagation="click") Added 
ins.rp-content-highlight {{ entry.content | limitTo:(isCollapsed ? contentLimit : entry.content.length) }} ins.rp-content-highlight {{ entry.content | limitTo:(isCollapsed ? contentLimit : entry.content.length) }}
a.rp-collapse-toggle( a.rp-collapse-toggle(
href href
ng-if="needsCollapsing" ng-if="needsCollapsing"
ng-click="toggleCollapse();" ng-click="toggleCollapse();"
) {{ isCollapsed ? '... (show all)' : ' (show less)' }} ) {{ isCollapsed ? '... (show all)' : ' (show less)' }}
span(ng-switch-when="delete") Deleted  span(ng-switch-when="delete", stop-propagation="click") Deleted 
del.rp-content-highlight {{ entry.content | limitTo:(isCollapsed ? contentLimit : entry.content.length) }} del.rp-content-highlight {{ entry.content | limitTo:(isCollapsed ? contentLimit : entry.content.length) }}
a.rp-collapse-toggle( a.rp-collapse-toggle(
href href
ng-if="needsCollapsing" ng-if="needsCollapsing"
ng-click="toggleCollapse();" ng-click="toggleCollapse();"
) {{ isCollapsed ? '... (show all)' : ' (show less)' }} ) {{ isCollapsed ? '... (show all)' : ' (show less)' }}
.rp-entry-metadata .rp-entry-metadata(stop-propagation="click")
| {{ entry.metadata.ts | date : 'MMM d, y h:mm a' }} •  | {{ entry.metadata.ts | date : 'MMM d, y h:mm a' }} • 
span.rp-entry-user(style="color: hsl({{ user.hue }}, 70%, 40%);") {{ user.name }} span.rp-entry-user(style="color: hsl({{ user.hue }}, 70%, 40%);") {{ user.name }}
.rp-entry-actions(ng-if="permissions.write") .rp-entry-actions(ng-if="permissions.write")
a.rp-entry-button(href, ng-click="onReject();") a.rp-entry-button(href, ng-click="onReject();", stop-propagation="click")
i.fa.fa-times i.fa.fa-times
|  Reject |  Reject
a.rp-entry-button(href, ng-click="onAccept();") a.rp-entry-button(href, ng-click="onAccept();", stop-propagation="click")
i.fa.fa-check i.fa.fa-check
|  Accept |  Accept
@ -196,7 +198,7 @@ script(type='text/ng-template', id='commentEntryTemplate')
ng-repeat="comment in threads[entry.thread_id].messages track by comment.id" ng-repeat="comment in threads[entry.thread_id].messages track by comment.id"
) )
p.rp-comment-content p.rp-comment-content
span(ng-if="!comment.editing") span(ng-if="!comment.editing", stop-propagation="click")
span.rp-entry-user( span.rp-entry-user(
style="color: hsl({{ comment.user.hue }}, 70%, 40%);", style="color: hsl({{ comment.user.hue }}, 70%, 40%);",
) {{ comment.user.name }}:  ) {{ comment.user.name }}: 
@ -214,16 +216,16 @@ script(type='text/ng-template', id='commentEntryTemplate')
span(ng-if="!comment.deleting") {{ comment.timestamp | date : 'MMM d, y h:mm a' }} span(ng-if="!comment.deleting") {{ comment.timestamp | date : 'MMM d, y h:mm a' }}
span.rp-comment-actions(ng-if="comment.user.isSelf && !comment.deleting") span.rp-comment-actions(ng-if="comment.user.isSelf && !comment.deleting")
|  •  |  • 
a(href, ng-click="startEditing(comment)") Edit a(href, ng-click="startEditing(comment)", stop-propagation="click") Edit
span(ng-if="threads[entry.thread_id].messages.length > 1") span(ng-if="threads[entry.thread_id].messages.length > 1")
|  •  |  • 
a(href, ng-click="confirmDelete(comment)") Delete a(href, ng-click="confirmDelete(comment)", stop-propagation="click") Delete
span.rp-confim-delete(ng-if="comment.user.isSelf && comment.deleting") span.rp-confim-delete(ng-if="comment.user.isSelf && comment.deleting")
| Are you sure? | Are you sure?
| •  | • 
a(href, ng-click="doDelete(comment)") Delete a(href, ng-click="doDelete(comment)", stop-propagation="click") Delete
|  •  |  • 
a(href, ng-click="cancelDelete(comment)") Cancel a(href, ng-click="cancelDelete(comment)", stop-propagation="click") Cancel
.rp-loading(ng-if="threads[entry.thread_id].submitting") .rp-loading(ng-if="threads[entry.thread_id].submitting")
i.fa.fa-spinner.fa-spin i.fa.fa-spinner.fa-spin
@ -239,6 +241,7 @@ script(type='text/ng-template', id='commentEntryTemplate')
button.rp-entry-button( button.rp-entry-button(
ng-click="animateAndCallOnResolve();" ng-click="animateAndCallOnResolve();"
ng-if="permissions.comment && permissions.write" ng-if="permissions.comment && permissions.write"
stop-propagation="click"
) )
i.fa.fa-inbox i.fa.fa-inbox
|  Resolve |  Resolve
@ -246,6 +249,7 @@ script(type='text/ng-template', id='commentEntryTemplate')
ng-click="onReply();" ng-click="onReply();"
ng-if="permissions.comment" ng-if="permissions.comment"
ng-disabled="!entry.replyContent.length" ng-disabled="!entry.replyContent.length"
stop-propagation="click"
) )
i.fa.fa-reply i.fa.fa-reply
|  Reply |  Reply