diff --git a/services/web/app/views/project/editor/review-panel.pug b/services/web/app/views/project/editor/review-panel.pug index 2035af4775..132cce7232 100644 --- a/services/web/app/views/project/editor/review-panel.pug +++ b/services/web/app/views/project/editor/review-panel.pug @@ -82,6 +82,10 @@ on-submit="submitNewComment(content);" on-cancel="cancelNewComment();" ) + div(ng-if="entry.type === 'bulk-accept'") + | Bulk accept + div(ng-if="entry.type === 'bulk-reject'") + | Bulk reject .rp-entry-list( ng-if="reviewPanel.subView === SubViews.OVERVIEW" diff --git a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee index bf3f96ffc3..4bce7facc8 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -159,7 +159,7 @@ define [ entries = $scope.reviewPanel.entries[$scope.editor.open_doc_id] or {} permEntries = {} for entry, entryData of entries - if entry != "add-comment" + if entry not in [ "add-comment", "bulk-accept", "bulk-reject" ] permEntries[entry] = entryData Object.keys(permEntries).length ), (nEntries) -> @@ -285,12 +285,25 @@ define [ entries = getDocEntries(doc_id) delete entries["add-comment"] + delete entries["bulk-accept"] + delete entries["bulk-reject"] + if selection entries["add-comment"] = { type: "add-comment" offset: selection_offset_start length: selection_offset_end - selection_offset_start } + entries["bulk-accept"] = { + type: "bulk-accept" + offset: selection_offset_start + length: selection_offset_end - selection_offset_start + } + entries["bulk-reject"] = { + type: "bulk-reject" + offset: selection_offset_start + length: selection_offset_end - selection_offset_start + } for id, entry of entries if entry.type == "comment" and not $scope.reviewPanel.resolvedThreadIds[entry.thread_id] @@ -299,7 +312,7 @@ define [ entry.focused = (entry.offset <= selection_offset_start <= entry.offset + entry.content.length) else if entry.type == "delete" entry.focused = (entry.offset == selection_offset_start) - else if entry.type == "add-comment" and selection + else if entry.type in [ "add-comment", "bulk-accept", "bulk-reject" ] and selection entry.focused = true $scope.$broadcast "review-panel:recalculate-screen-positions"