mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
24 lines
646 B
CoffeeScript
24 lines
646 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "LinkSharingOnboardingController", ($scope, $timeout, event_tracking) ->
|
|
$scope._shown = false
|
|
|
|
popover = angular.element('#onboarding-linksharing')
|
|
popover.hide()
|
|
|
|
$scope.dismiss = () ->
|
|
$scope.onboarding.linkSharing = 'dismissed'
|
|
event_tracking.sendMB "shown-linksharing-onboarding"
|
|
|
|
$scope.$on 'doc:opened', () ->
|
|
return if $scope._shown
|
|
shareBtn = angular.element('#shareButton')
|
|
offset = shareBtn.offset()
|
|
popover.show()
|
|
$scope.placement = 'bottom'
|
|
popover.offset({
|
|
top: offset.top + 8 + shareBtn.height(),
|
|
left: offset.left
|
|
})
|
|
$scope.shown = true
|