Merge branch 'ja-review-panel' of github.com:sharelatex/web-sharelatex into ja-review-panel

This commit is contained in:
Paulo Reis 2016-11-10 15:09:56 +00:00
commit 8dcbb6ea4f
3 changed files with 10 additions and 8 deletions

View file

@ -83,7 +83,6 @@ div.full-size(
a.rp-entry-button(href, ng-click="rejectChange(entry_id)")
i.fa.fa-times
|  Reject
div(ng-if="entry.type == 'comment'")
div(ng-repeat="comment in entry.thread", class="comment-thread__comment")
div.small(style="color: hsl({{ users[comment.user_id].hue }}, 70%, 50%)") {{ users[comment.user_id].name }}

View file

@ -67,8 +67,13 @@ define [
@nextUpdateMetaData = null
else
user_id = window.user.id
was_tracking = @changesTracker.track_changes
if @dont_track_next_update
@changesTracker.track_changes = false
@dont_track_next_update = false
@applyChange(e, { user_id })
@changesTracker.track_changes = was_tracking
# TODO: Just for debugging, remove before going live.
setTimeout () =>
@ -122,8 +127,7 @@ define [
change = @changesTracker.getChange(change_id)
return if !change?
@changesTracker.removeChangeId(change_id)
is_tracking = @changesTracker.track_changes
@changesTracker.track_changes = false
@dont_track_next_update = true
session = @editor.getSession()
if change.op.d?
content = change.op.d
@ -138,9 +142,7 @@ define [
session.remove({start, end})
else
throw new Error("unknown change: #{JSON.stringify(change)}")
setTimeout () =>
@changesTracker.track_changes = is_tracking
, 0
checkMapping: () ->
session = @editor.getSession()

View file

@ -23,7 +23,8 @@ define [
scope.$watch "reviewPanel.entries", (value) ->
return if !value?
layout()
$timeout () ->
layout()
scope.$on "review-panel:layout", () ->
$timeout () ->