mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Add cancel buttons for comments
This commit is contained in:
@@ -62,12 +62,14 @@ div.full-size(
|
||||
div(ng-if="entry.replying")
|
||||
textarea(ng-model="entry.replyContent")
|
||||
a.btn.btn-sm.btn-primary(href, ng-click="submitReply(entry)") Submit
|
||||
a(href, ng-click="cancelReply(entry)") X
|
||||
a.btn.btn-sm.btn-primary(href, ng-click="startReply(entry)", ng-if="!entry.replying") Reply
|
||||
div(ng-if="entry.type == 'focus-position'")
|
||||
a.btn.btn-sm(href, ng-if="!commentState.adding", ng-click="startNewComment()") Add comment
|
||||
div(ng-if="commentState.adding")
|
||||
textarea(ng-model="commentState.content")
|
||||
a.btn.btn-sm.btn-primary(href, ng-click="submitNewComment()") Submit
|
||||
a(href, ng-click="cancelNewComment()") X
|
||||
|
||||
.ui-layout-east
|
||||
div(ng-if="ui.pdfLayout == 'sideBySide'")
|
||||
|
||||
+10
-1
@@ -70,8 +70,12 @@ define [
|
||||
$scope.commentState.content = ""
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
$scope.cancelNewComment = (entry) ->
|
||||
$scope.commentState.adding = false
|
||||
$scope.commentState.content = ""
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
$scope.startReply = (entry) ->
|
||||
console.log "Start new reply"
|
||||
entry.replying = true
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
@@ -83,4 +87,9 @@ define [
|
||||
}
|
||||
entry.replyContent = ""
|
||||
entry.replying = false
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
$scope.cancelReply = (entry) ->
|
||||
entry.replying = false
|
||||
entry.replyContent = ""
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
Reference in New Issue
Block a user