Commit 2567071c authored by Randall Leeds's avatar Randall Leeds

Merge branch 'link-annotations-2' into develop

parents 368d2821 d75e9a86
......@@ -666,7 +666,23 @@ blockquote {
}
}
.share-dialog {
display: none;
.icon-input {
position: relative;
.share-text {
width: 100%;
}
}
}
.clipboard-icon {
text-decoration: none;
cursor: pointer;
color: black;
opacity: .5;
display: inline;
}
//SUMMARY////////////////////////////////
//This is specific to the summary view.
.summary {
......
This diff is collapsed.
......@@ -187,8 +187,8 @@ class App
class Annotation
this.$inject = ['$element', '$location', '$scope', 'annotator', 'drafts']
constructor: ($element, $location, $scope, annotator, drafts) ->
this.$inject = ['$element', '$location', '$scope', 'annotator', 'drafts', '$timeout']
constructor: ($element, $location, $scope, annotator, drafts, $timeout) ->
threading = annotator.threading
$scope.action = 'create'
......@@ -268,11 +268,24 @@ class Annotation
if id?
$scope.thread = threading.getContainer id
$scope.$watch 'shared', (newValue) ->
if newValue and newValue is true
$timeout -> $element.find('input').focus()
$timeout -> $element.find('input').select()
$scope.shared_link = window.location.protocol + '//' +
window.location.host + '/a/' + $scope.model.$modelValue.id
$scope.shared = false
# Check if this is a brand new annotation
annotation = $scope.thread.message?.annotation
if annotation? and drafts.contains annotation
$scope.editing = true
$scope.share = ->
$scope.shared = not $scope.shared
$element.find('.share-dialog').slideToggle()
console.log $scope.shared
class Editor
this.$inject = ['$location', '$routeParams', '$scope', 'annotator']
......
angular.module('h.displayer',[])
.controller('DisplayerCtrl',
($scope, $element) ->
$scope.toggleCollapse = (event, replynumber, thread) ->
#Plus/minus sign and italics
elem = (angular.element event.srcElement).parent()
if elem.hasClass 'hyp-collapsed'
elem.removeClass 'hyp-collapsed'
expand = true
else elem.addClass 'hyp-collapsed'
#Now for the replies
if replynumber
toggle_elem = $element.find('.thread_' + (thread+1)).parent().parent()
if expand? then toggle_elem.removeAttr 'style'
else toggle_elem.css 'display', 'none'
)
\ No newline at end of file
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