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

View file

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