mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Track-changes usage.
This commit is contained in:
parent
e6898d64c9
commit
216779fafe
3 changed files with 7 additions and 7 deletions
|
@ -119,7 +119,6 @@ define [
|
|||
diff.deleted = true
|
||||
|
||||
restoreDeletedDoc: (doc) ->
|
||||
console.log("track-changes-restore-deleted")
|
||||
url = "/project/#{@$scope.project_id}/doc/#{doc.id}/restore"
|
||||
@ide.$http.post(url, name: doc.name, _csrf: window.csrfToken)
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
App.controller "TrackChangesDiffController", ($scope, $modal, ide) ->
|
||||
App.controller "TrackChangesDiffController", ($scope, $modal, ide, event_tracking) ->
|
||||
$scope.restoreDeletedDoc = () ->
|
||||
event_tracking.sendCountly "track-changes-restore-deleted"
|
||||
ide.trackChangesManager.restoreDeletedDoc(
|
||||
$scope.trackChanges.diff.doc
|
||||
)
|
||||
|
||||
$scope.openRestoreDiffModal = () ->
|
||||
console.log("track-changes-restore-modal")
|
||||
event_tracking.sendCountly "track-changes-restore-modal"
|
||||
$modal.open {
|
||||
templateUrl: "trackChangesRestoreDiffModalTemplate"
|
||||
controller: "TrackChangesRestoreDiffModalController"
|
||||
|
@ -16,14 +17,14 @@ define [
|
|||
diff: () -> $scope.trackChanges.diff
|
||||
}
|
||||
|
||||
App.controller "TrackChangesRestoreDiffModalController", ($scope, $modalInstance, diff, ide) ->
|
||||
App.controller "TrackChangesRestoreDiffModalController", ($scope, $modalInstance, diff, ide, event_tracking) ->
|
||||
$scope.state =
|
||||
inflight: false
|
||||
|
||||
$scope.diff = diff
|
||||
|
||||
$scope.restore = () ->
|
||||
console.log("track-changes-restored")
|
||||
event_tracking.sendCountly "track-changes-restored"
|
||||
$scope.state.inflight = true
|
||||
ide.trackChangesManager
|
||||
.restoreDiff(diff)
|
||||
|
|
|
@ -2,7 +2,7 @@ define [
|
|||
"base"
|
||||
], (App) ->
|
||||
|
||||
App.controller "TrackChangesPremiumPopup", ($scope, ide, sixpack)->
|
||||
App.controller "TrackChangesPremiumPopup", ($scope, ide, sixpack, event_tracking)->
|
||||
$scope.$watch "ui.view", ->
|
||||
if $scope.ui.view == "track-changes"
|
||||
if $scope.project?.features?.versioning
|
||||
|
@ -92,7 +92,7 @@ define [
|
|||
$scope.recalculateSelectedUpdates()
|
||||
|
||||
$scope.select = () ->
|
||||
console.log("track-changes-view")
|
||||
event_tracking.sendCountly "track-changes-view-change"
|
||||
$scope.update.selectedTo = true
|
||||
$scope.update.selectedFrom = true
|
||||
|
||||
|
|
Loading…
Reference in a new issue