Commit d19c613f authored by Aron Carroll's avatar Aron Carroll Committed by Randall Leeds

Focus share link when pop-up opens

parent 3931e1e3
......@@ -296,8 +296,8 @@ AnnotationController = [
# an embedded widget.
###
annotation = [
'annotator',
(annotator) ->
'$document', 'annotator',
($document, annotator) ->
linkFn = (scope, elem, attrs, [ctrl, thread, threadFilter, counter]) ->
# Helper function to remove the temporary thread created for a new reply.
prune = (message) ->
......@@ -321,6 +321,12 @@ annotation = [
scope.$evalAsync ->
ctrl.save()
scope.share = (event) ->
scope.$evalAsync ->
$container = angular.element(event.target).parent()
$container.addClass('open').find('input').focus().select()
$document.one('click', (event) -> $container.removeClass('open'))
# Keep track of edits going on in the thread.
if counter?
# Expand the thread if descendants are editing.
......
......@@ -116,7 +116,7 @@
ng-click="vm.reply()"
><i class="h-icon-reply"></i> Reply</a>
<span class="magicontrol share-dialog-wrapper">
<a class="small dropdown-toggle" href="" title="Share"
<a class="small" href="" title="Share" ng-click="share($event)"
><i class="h-icon-export"></i> Share</a>
<span class="share-dialog" ng-click="$event.stopPropagation()">
<a class="h-icon-export"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment