|
@@ -159,7 +159,7 @@ define [
|
|
|
entries = $scope.reviewPanel.entries[$scope.editor.open_doc_id] or {}
|
|
entries = $scope.reviewPanel.entries[$scope.editor.open_doc_id] or {}
|
|
|
permEntries = {}
|
|
permEntries = {}
|
|
|
for entry, entryData of entries
|
|
for entry, entryData of entries
|
|
|
- if entry != "add-comment"
|
|
|
|
|
|
|
+ if entry not in [ "add-comment", "bulk-accept", "bulk-reject" ]
|
|
|
permEntries[entry] = entryData
|
|
permEntries[entry] = entryData
|
|
|
Object.keys(permEntries).length
|
|
Object.keys(permEntries).length
|
|
|
), (nEntries) ->
|
|
), (nEntries) ->
|
|
@@ -285,12 +285,25 @@ define [
|
|
|
entries = getDocEntries(doc_id)
|
|
entries = getDocEntries(doc_id)
|
|
|
|
|
|
|
|
delete entries["add-comment"]
|
|
delete entries["add-comment"]
|
|
|
|
|
+ delete entries["bulk-accept"]
|
|
|
|
|
+ delete entries["bulk-reject"]
|
|
|
|
|
+
|
|
|
if selection
|
|
if selection
|
|
|
entries["add-comment"] = {
|
|
entries["add-comment"] = {
|
|
|
type: "add-comment"
|
|
type: "add-comment"
|
|
|
offset: selection_offset_start
|
|
offset: selection_offset_start
|
|
|
length: selection_offset_end - 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
|
|
for id, entry of entries
|
|
|
if entry.type == "comment" and not $scope.reviewPanel.resolvedThreadIds[entry.thread_id]
|
|
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)
|
|
entry.focused = (entry.offset <= selection_offset_start <= entry.offset + entry.content.length)
|
|
|
else if entry.type == "delete"
|
|
else if entry.type == "delete"
|
|
|
entry.focused = (entry.offset == selection_offset_start)
|
|
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
|
|
entry.focused = true
|
|
|
|
|
|
|
|
$scope.$broadcast "review-panel:recalculate-screen-positions"
|
|
$scope.$broadcast "review-panel:recalculate-screen-positions"
|