From badc4ecb7a8f140a8dc4dc81b8ead3c3464880c9 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Tue, 14 Feb 2017 14:40:21 +0000 Subject: [PATCH] Show add comment tooltip to the left when appropriate. --- services/web/app/views/project/editor/review-panel.pug | 3 ++- .../coffee/ide/review-panel/directives/addCommentEntry.coffee | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/project/editor/review-panel.pug b/services/web/app/views/project/editor/review-panel.pug index 8b33be8ef6..1f4fd45a4e 100644 --- a/services/web/app/views/project/editor/review-panel.pug +++ b/services/web/app/views/project/editor/review-panel.pug @@ -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 diff --git a/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee b/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee index c23c37b674..c30eaadd0f 100644 --- a/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee +++ b/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee @@ -9,6 +9,7 @@ define [ onSubmit: "&" onCancel: "&" onIndicatorClick: "&" + layoutToLeft: "=" link: (scope, element, attrs) -> scope.state = isAdding: false