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"
|
|
|
|
|
2017-11-09 10:12:55 -05:00
|
|
|
$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({
|
2017-11-10 05:24:36 -05:00
|
|
|
top: offset.top + 11 + shareBtn.height(),
|
|
|
|
left: offset.left - 180
|
2017-11-09 09:28:11 -05:00
|
|
|
})
|