mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Track hovering of header features.
This commit is contained in:
parent
892511820e
commit
e6898d64c9
5 changed files with 10 additions and 0 deletions
|
@ -91,12 +91,14 @@ header.toolbar.toolbar-header(ng-cloak, ng-hide="state.loading")
|
|||
ng-if="permissions.admin",
|
||||
tooltip="#{translate('share')}",
|
||||
tooltip-placement="bottom",
|
||||
ng-mouseenter="trackHover('share')"
|
||||
ng-click="openShareProjectModal()",
|
||||
ng-controller="ShareController"
|
||||
)
|
||||
i.fa.fa-fw.fa-group
|
||||
a.btn.btn-full-height(
|
||||
href,
|
||||
ng-mouseenter="trackHover('track-changes')"
|
||||
ng-click="toggleTrackChanges()",
|
||||
ng-class="{ active: (ui.view == 'track-changes') }"
|
||||
tooltip="#{translate('recent_changes')}",
|
||||
|
@ -108,6 +110,7 @@ header.toolbar.toolbar-header(ng-cloak, ng-hide="state.loading")
|
|||
tooltip="#{translate('chat')}",
|
||||
tooltip-placement="bottom",
|
||||
ng-class="{ active: ui.chatOpen }",
|
||||
ng-mouseenter="trackHover('chat')"
|
||||
ng-click="toggleChat()",
|
||||
ng-controller="ChatButtonController",
|
||||
ng-show="!anonymous"
|
||||
|
|
|
@ -81,6 +81,9 @@ define [
|
|||
|
||||
$scope.$watch "ui.leftMenuShown", (isOpen) ->
|
||||
event_tracking.sendCountlyOnce "ide-open-left-menu-once" if isOpen
|
||||
|
||||
$scope.trackHover = (feature) ->
|
||||
event_tracking.sendCountlyOnce "ide-hover-#{feature}-once"
|
||||
# End of tracking code.
|
||||
|
||||
window._ide = ide
|
||||
|
|
|
@ -119,6 +119,7 @@ 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)
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ define [
|
|||
)
|
||||
|
||||
$scope.openRestoreDiffModal = () ->
|
||||
console.log("track-changes-restore-modal")
|
||||
$modal.open {
|
||||
templateUrl: "trackChangesRestoreDiffModalTemplate"
|
||||
controller: "TrackChangesRestoreDiffModalController"
|
||||
|
@ -22,6 +23,7 @@ define [
|
|||
$scope.diff = diff
|
||||
|
||||
$scope.restore = () ->
|
||||
console.log("track-changes-restored")
|
||||
$scope.state.inflight = true
|
||||
ide.trackChangesManager
|
||||
.restoreDiff(diff)
|
||||
|
|
|
@ -92,6 +92,7 @@ define [
|
|||
$scope.recalculateSelectedUpdates()
|
||||
|
||||
$scope.select = () ->
|
||||
console.log("track-changes-view")
|
||||
$scope.update.selectedTo = true
|
||||
$scope.update.selectedFrom = true
|
||||
|
||||
|
|
Loading…
Reference in a new issue