mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-29 12:13:32 +00:00
Wire up new button with existing UI for adding comments.
This commit is contained in:
parent
beac43741c
commit
2c2abc3cae
3 changed files with 8 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
a.rp-add-comment-btn(
|
||||
href
|
||||
ng-if="reviewPanel.entries[editor.open_doc_id]['add-comment'] != null"
|
||||
ng-click="startNewComment();"
|
||||
ng-click="addNewComment();"
|
||||
)
|
||||
i.fa.fa-comment
|
||||
| #{translate("add_comment")}
|
||||
|
|
|
@ -327,6 +327,10 @@ define [
|
|||
$scope.$broadcast "change:reject", entry_id
|
||||
event_tracking.sendMB "rp-change-rejected", { view: if $scope.ui.reviewPanelOpen then $scope.reviewPanel.subView else 'mini' }
|
||||
|
||||
$scope.addNewComment = () ->
|
||||
$scope.$broadcast "comment:start_adding"
|
||||
$scope.toggleReviewPanel()
|
||||
|
||||
$scope.startNewComment = () ->
|
||||
$scope.$broadcast "comment:select_line"
|
||||
$timeout () ->
|
||||
|
|
|
@ -15,6 +15,9 @@ define [
|
|||
isAdding: false
|
||||
content: ""
|
||||
|
||||
scope.$on "comment:start_adding", () ->
|
||||
scope.startNewComment()
|
||||
|
||||
scope.startNewComment = () ->
|
||||
scope.state.isAdding = true
|
||||
scope.onStartNew()
|
||||
|
|
Loading…
Reference in a new issue