Track-changes usage.

This commit is contained in:
Paulo Reis 2016-08-03 12:36:42 +01:00
parent e6898d64c9
commit 216779fafe
3 changed files with 7 additions and 7 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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