mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05: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(
|
a.rp-add-comment-btn(
|
||||||
href
|
href
|
||||||
ng-if="reviewPanel.entries[editor.open_doc_id]['add-comment'] != null"
|
ng-if="reviewPanel.entries[editor.open_doc_id]['add-comment'] != null"
|
||||||
ng-click="startNewComment();"
|
ng-click="addNewComment();"
|
||||||
)
|
)
|
||||||
i.fa.fa-comment
|
i.fa.fa-comment
|
||||||
| #{translate("add_comment")}
|
| #{translate("add_comment")}
|
||||||
|
|
|
@ -327,6 +327,10 @@ define [
|
||||||
$scope.$broadcast "change:reject", entry_id
|
$scope.$broadcast "change:reject", entry_id
|
||||||
event_tracking.sendMB "rp-change-rejected", { view: if $scope.ui.reviewPanelOpen then $scope.reviewPanel.subView else 'mini' }
|
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.startNewComment = () ->
|
||||||
$scope.$broadcast "comment:select_line"
|
$scope.$broadcast "comment:select_line"
|
||||||
$timeout () ->
|
$timeout () ->
|
||||||
|
|
|
@ -15,6 +15,9 @@ define [
|
||||||
isAdding: false
|
isAdding: false
|
||||||
content: ""
|
content: ""
|
||||||
|
|
||||||
|
scope.$on "comment:start_adding", () ->
|
||||||
|
scope.startNewComment()
|
||||||
|
|
||||||
scope.startNewComment = () ->
|
scope.startNewComment = () ->
|
||||||
scope.state.isAdding = true
|
scope.state.isAdding = true
|
||||||
scope.onStartNew()
|
scope.onStartNew()
|
||||||
|
|
Loading…
Reference in a new issue