mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
21 lines
572 B
CoffeeScript
21 lines
572 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "LinkSharingOnboardingController", ($scope, $timeout, event_tracking) ->
|
|
|
|
popover = angular.element('#onboarding-linksharing')
|
|
popover.hide()
|
|
|
|
$scope.dismiss = () ->
|
|
$scope.onboarding.linkSharing = 'dismissed'
|
|
event_tracking.sendMB "shown-linksharing-onboarding"
|
|
|
|
$scope.$on 'ide:loaded', () ->
|
|
shareBtn = angular.element('#shareButton')
|
|
offset = shareBtn.offset()
|
|
popover.show()
|
|
$scope.placement = 'bottom'
|
|
popover.offset({
|
|
top: offset.top + 8 + shareBtn.height(),
|
|
left: offset.left
|
|
})
|