Show add comment tooltip to the left when appropriate.

This commit is contained in:
Paulo Reis 2017-02-14 14:40:21 +00:00
parent b48f57c2cb
commit badc4ecb7a
2 changed files with 3 additions and 1 deletions

View file

@ -79,6 +79,7 @@
on-submit="submitNewComment(content);"
on-cancel="cancelNewComment();"
on-indicator-click="toggleReviewPanel();"
layout-to-left="reviewPanel.layoutToLeft"
)
.rp-entry-list(
@ -310,7 +311,7 @@ script(type='text/ng-template', id='addCommentEntryTemplate')
ng-if="!commentState.adding"
ng-click="startNewComment(); onIndicatorClick();"
tooltip="Add a comment"
tooltip-placement="right"
tooltip-placement="{{ layoutToLeft ? 'left' : 'right' }}"
tooltip-append-to-body="true"
)
i.fa.fa-commenting

View file

@ -9,6 +9,7 @@ define [
onSubmit: "&"
onCancel: "&"
onIndicatorClick: "&"
layoutToLeft: "="
link: (scope, element, attrs) ->
scope.state =
isAdding: false