Commit d701ea65 authored by Ujvari Gergely's avatar Ujvari Gergely

Fixes #417

parent 93bc8be3
......@@ -329,10 +329,12 @@ class Annotation
window.location.host + '/a/' + $scope.model.$modelValue.id
$scope.shared = false
$scope.share = ->
$scope.shared = not $scope.shared
$scope.toggle = ->
$element.find('.share-dialog').slideToggle()
$scope.share = ->
$scope.shared = not $scope.shared
$scope.toggle()
class Editor
this.$inject = ['$location', '$routeParams', '$scope', 'annotator']
......
......@@ -214,6 +214,15 @@ thread = ->
restrict: 'C'
scope: true
#Directive will be removed once the angularjs official version will have this directive
ngBlur = ['$parse', ($parse) ->
(scope, element, attr) ->
fn = $parse attr['ngBlur']
element.bind 'blur', (event) ->
scope.$apply ->
fn scope,
$event: event
]
angular.module('h.directives', ['ngSanitize'])
.directive('annotation', annotation)
......@@ -224,3 +233,5 @@ angular.module('h.directives', ['ngSanitize'])
.directive('slowValidate', slowValidate)
.directive('tabReveal', tabReveal)
.directive('thread', thread)
.directive('ngBlur', ngBlur)
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