|
@@ -188,7 +188,8 @@ define [
|
|
|
|
|
|
|
|
refreshRanges = () ->
|
|
refreshRanges = () ->
|
|
|
$http.get "/project/#{$scope.project_id}/ranges"
|
|
$http.get "/project/#{$scope.project_id}/ranges"
|
|
|
- .then (docs) ->
|
|
|
|
|
|
|
+ .then (response) ->
|
|
|
|
|
+ docs = response.data
|
|
|
for doc in docs
|
|
for doc in docs
|
|
|
if !$scope.reviewPanel.overview.docsCollapsedState[doc.id]?
|
|
if !$scope.reviewPanel.overview.docsCollapsedState[doc.id]?
|
|
|
$scope.reviewPanel.overview.docsCollapsedState[doc.id] = false
|
|
$scope.reviewPanel.overview.docsCollapsedState[doc.id] = false
|
|
@@ -438,7 +439,7 @@ define [
|
|
|
thread.submitting = true
|
|
thread.submitting = true
|
|
|
$scope.$broadcast "comment:add", thread_id, offset, length
|
|
$scope.$broadcast "comment:add", thread_id, offset, length
|
|
|
$http.post("/project/#{$scope.project_id}/thread/#{thread_id}/messages", {content, _csrf: window.csrfToken})
|
|
$http.post("/project/#{$scope.project_id}/thread/#{thread_id}/messages", {content, _csrf: window.csrfToken})
|
|
|
- .catch (error) ->
|
|
|
|
|
|
|
+ .catch () ->
|
|
|
ide.showGenericMessageModal("Error submitting comment", "Sorry, there was a problem submitting your comment")
|
|
ide.showGenericMessageModal("Error submitting comment", "Sorry, there was a problem submitting your comment")
|
|
|
$scope.$broadcast "editor:clearSelection"
|
|
$scope.$broadcast "editor:clearSelection"
|
|
|
$timeout () ->
|
|
$timeout () ->
|
|
@@ -458,7 +459,7 @@ define [
|
|
|
thread_id = entry.thread_id
|
|
thread_id = entry.thread_id
|
|
|
content = entry.replyContent
|
|
content = entry.replyContent
|
|
|
$http.post("/project/#{$scope.project_id}/thread/#{thread_id}/messages", {content, _csrf: window.csrfToken})
|
|
$http.post("/project/#{$scope.project_id}/thread/#{thread_id}/messages", {content, _csrf: window.csrfToken})
|
|
|
- .catch (error) ->
|
|
|
|
|
|
|
+ .catch () ->
|
|
|
ide.showGenericMessageModal("Error submitting comment", "Sorry, there was a problem submitting your comment")
|
|
ide.showGenericMessageModal("Error submitting comment", "Sorry, there was a problem submitting your comment")
|
|
|
|
|
|
|
|
trackingMetadata =
|
|
trackingMetadata =
|
|
@@ -598,7 +599,8 @@ define [
|
|
|
_refreshingRangeUsers = true
|
|
_refreshingRangeUsers = true
|
|
|
|
|
|
|
|
$http.get "/project/#{$scope.project_id}/changes/users"
|
|
$http.get "/project/#{$scope.project_id}/changes/users"
|
|
|
- .then (users) ->
|
|
|
|
|
|
|
+ .then (response) ->
|
|
|
|
|
+ users = response.data
|
|
|
_refreshingRangeUsers = false
|
|
_refreshingRangeUsers = false
|
|
|
$scope.users = {}
|
|
$scope.users = {}
|
|
|
# Always include ourself, since if we submit an op, we might need to display info
|
|
# Always include ourself, since if we submit an op, we might need to display info
|
|
@@ -619,7 +621,8 @@ define [
|
|
|
_threadsLoaded = true
|
|
_threadsLoaded = true
|
|
|
$scope.reviewPanel.loadingThreads = true
|
|
$scope.reviewPanel.loadingThreads = true
|
|
|
$http.get "/project/#{$scope.project_id}/threads"
|
|
$http.get "/project/#{$scope.project_id}/threads"
|
|
|
- .then (threads) ->
|
|
|
|
|
|
|
+ .then (response) ->
|
|
|
|
|
+ threads = response.data
|
|
|
$scope.reviewPanel.loadingThreads = false
|
|
$scope.reviewPanel.loadingThreads = false
|
|
|
for thread_id, _ of $scope.reviewPanel.resolvedThreadIds
|
|
for thread_id, _ of $scope.reviewPanel.resolvedThreadIds
|
|
|
delete $scope.reviewPanel.resolvedThreadIds[thread_id]
|
|
delete $scope.reviewPanel.resolvedThreadIds[thread_id]
|