Add bind title directive.
parent
525063496d
commit
5e6bc87176
|
@ -57,6 +57,13 @@ BindOnceTitleDirective = ->
|
||||||
$el.attr("title", val)
|
$el.attr("title", val)
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
BindTitleDirective = ->
|
||||||
|
link = ($scope, $el, $attrs) ->
|
||||||
|
$scope.$watch $attrs.tgTitleHtml, (val) ->
|
||||||
|
$el.attr("title", val) if val?
|
||||||
|
|
||||||
|
return {link:link}
|
||||||
|
|
||||||
BindHtmlDirective = ->
|
BindHtmlDirective = ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
$scope.$watch $attrs.tgBindHtml, (val) ->
|
$scope.$watch $attrs.tgBindHtml, (val) ->
|
||||||
|
@ -64,11 +71,11 @@ BindHtmlDirective = ->
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
|
||||||
module = angular.module("taigaBase")
|
module = angular.module("taigaBase")
|
||||||
module.directive("tgBoHtml", BindOnceHtmlDirective)
|
module.directive("tgBoHtml", BindOnceHtmlDirective)
|
||||||
module.directive("tgBoRef", BindOnceRefDirective)
|
module.directive("tgBoRef", BindOnceRefDirective)
|
||||||
module.directive("tgBoSrc", BindOnceSrcDirective)
|
module.directive("tgBoSrc", BindOnceSrcDirective)
|
||||||
module.directive("tgBoAlt", BindOnceAltDirective)
|
module.directive("tgBoAlt", BindOnceAltDirective)
|
||||||
module.directive("tgBoTitle", BindOnceTitleDirective)
|
module.directive("tgBoTitle", BindOnceTitleDirective)
|
||||||
|
module.directive("tgBindTitle", BindTitleDirective)
|
||||||
module.directive("tgBindHtml", BindHtmlDirective)
|
module.directive("tgBindHtml", BindHtmlDirective)
|
||||||
|
|
Loading…
Reference in New Issue