overleaf/services/web/public/coffee/ide/LinkSharingOnboardingController.coffee

22 lines
579 B
CoffeeScript
Raw Normal View History

2017-11-09 09:28:11 -05:00
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', () ->
2017-11-09 09:28:11 -05:00
shareBtn = angular.element('#shareButton')
offset = shareBtn.offset()
popover.show()
$scope.placement = 'bottom'
popover.offset({
top: offset.top + 11 + shareBtn.height(),
left: offset.left - 180
2017-11-09 09:28:11 -05:00
})