Merge branch 'master' into sk-pug

This commit is contained in:
Shane Kilkelly 2017-01-31 10:18:53 +00:00
commit 83d0f26011
3 changed files with 13 additions and 1 deletions

View file

@ -49,6 +49,7 @@
on-reject="rejectChange(entry_id);"
on-accept="acceptChange(entry_id);"
on-indicator-click="toggleReviewPanel();"
on-body-click="gotoEntry(editor.open_doc_id, entry)"
permissions="permissions"
)
@ -61,6 +62,7 @@
on-indicator-click="toggleReviewPanel();"
on-save-edit="saveEdit(entry.thread_id, comment)"
on-delete="deleteComment(entry.thread_id, comment)"
on-body-click="gotoEntry(editor.open_doc_id, entry)"
permissions="permissions"
ng-if="!reviewPanel.loadingThreads"
)
@ -190,7 +192,7 @@ script(type='text/ng-template', id='commentEntryTemplate')
.rp-loading(ng-if="!threads[entry.thread_id].submitting && (!threads[entry.thread_id] || threads[entry.thread_id].messages.length == 0)")
| No comments
div
.rp-comment-loaded
.rp-comment(
ng-repeat="comment in threads[entry.thread_id].messages track by comment.id"
)

View file

@ -11,11 +11,16 @@ define [
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 () ->

View file

@ -13,10 +13,15 @@ define [
onIndicatorClick: "&"
onSaveEdit: "&"
onDelete: "&"
onBodyClick: "&"
link: (scope, element, attrs) ->
scope.state =
animating: false
element.on "click", (e) ->
if $(e.target).is('.rp-entry, .rp-comment-loaded, .rp-comment-content, .rp-comment-reply, .rp-entry-metadata')
scope.onBodyClick()
scope.handleCommentReplyKeyPress = (ev) ->
if ev.keyCode == 13 and !ev.shiftKey and !ev.ctrlKey and !ev.metaKey
ev.preventDefault()