Change restricted of the directive tg-[kanban/taskboard]-user-avatar to A
parent
3c7b9ed490
commit
f5527d3941
|
@ -293,10 +293,10 @@ KanbanUserDirective = ($log) ->
|
||||||
uniqueId = _.uniqueId("user_photo")
|
uniqueId = _.uniqueId("user_photo")
|
||||||
|
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
if not $attrs.model?
|
if not $attrs.tgKanbanUserAvatar
|
||||||
return $log.error "KanbanUserDirective: no model attr is defined"
|
return $log.error "KanbanUserDirective: no attr is defined"
|
||||||
|
|
||||||
wtid = $scope.$watch $attrs.model, (v) ->
|
wtid = $scope.$watch $attrs.tgKanbanUserAvatar, (v) ->
|
||||||
if not $scope.usersById?
|
if not $scope.usersById?
|
||||||
$log.error "KanbanUserDirective requires userById set in scope."
|
$log.error "KanbanUserDirective requires userById set in scope."
|
||||||
wtid()
|
wtid()
|
||||||
|
@ -320,10 +320,7 @@ KanbanUserDirective = ($log) ->
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
$scope.$eval($attrs.click)
|
$scope.$eval($attrs.click)
|
||||||
|
|
||||||
return {
|
return {link: link}
|
||||||
link: link
|
|
||||||
restrict: "AE"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module.directive("tgKanbanUserAvatar", ["$log", KanbanUserDirective])
|
module.directive("tgKanbanUserAvatar", ["$log", KanbanUserDirective])
|
||||||
|
|
|
@ -240,10 +240,10 @@ TaskboardUserDirective = ($log) ->
|
||||||
uniqueId = _.uniqueId("user_photo")
|
uniqueId = _.uniqueId("user_photo")
|
||||||
|
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
if not $attrs.model?
|
if not $attrs.tgTaskboardUserAvatar?
|
||||||
return $log.error "TaskboardUserDirective: no model attr is defined"
|
return $log.error "TaskboardUserDirective: no attr is defined"
|
||||||
|
|
||||||
wtid = $scope.$watch $attrs.model, (v) ->
|
wtid = $scope.$watch $attrs.tgTaskboardUserAvatar, (v) ->
|
||||||
if not $scope.usersById?
|
if not $scope.usersById?
|
||||||
$log.error "TaskboardUserDirective requires userById set in scope."
|
$log.error "TaskboardUserDirective requires userById set in scope."
|
||||||
wtid()
|
wtid()
|
||||||
|
@ -268,10 +268,7 @@ TaskboardUserDirective = ($log) ->
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
$scope.$eval($attrs.click)
|
$scope.$eval($attrs.click)
|
||||||
|
|
||||||
return {
|
return {link: link}
|
||||||
link: link
|
|
||||||
restrict: "AE"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module.directive("tgTaskboardUserAvatar", ["$log", TaskboardUserDirective])
|
module.directive("tgTaskboardUserAvatar", ["$log", TaskboardUserDirective])
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
div.kanban-tagline
|
div.kanban-tagline
|
||||||
a.taskboard-tag(ng-repeat="tag in us.tags", href="", tg-bo-title="tag", tg-colorize-tag="tag")
|
a.taskboard-tag(ng-repeat="tag in us.tags", href="", tg-bo-title="tag", tg-colorize-tag="tag")
|
||||||
div.kanban-task-inner
|
div.kanban-task-inner
|
||||||
tg-kanban-user-avatar(model="us.assigned_to", click="ctrl.changeUsAssignedTo(us)")
|
div(tg-kanban-user-avatar="us.assigned_to", click="ctrl.changeUsAssignedTo(us)")
|
||||||
div.task-text
|
div.task-text
|
||||||
span.task-num(tg-bo-ref="us.ref")
|
span.task-num(tg-bo-ref="us.ref")
|
||||||
a.task-name(href="", title="", tg-bind-html="us.subject",
|
a.task-name(href="", title="", tg-bind-html="us.subject",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
div.taskboard-tagline
|
div.taskboard-tagline
|
||||||
a.taskboard-tag(ng-repeat="tag in task.tags", href="", tg-bo-title="tag", tg-colorize-tag="tag")
|
a.taskboard-tag(ng-repeat="tag in task.tags", href="", tg-bo-title="tag", tg-colorize-tag="tag")
|
||||||
div.taskboard-task-inner
|
div.taskboard-task-inner
|
||||||
tg-taskboard-user-avatar(model="task.assigned_to", click="ctrl.editTaskAssignedTo(task)")
|
div(tg-taskboard-user-avatar="task.assigned_to", click="ctrl.editTaskAssignedTo(task)")
|
||||||
p.taskboard-text
|
p.taskboard-text
|
||||||
span.task-num(tg-bo-ref="task.ref")
|
span.task-num(tg-bo-ref="task.ref")
|
||||||
a.task-name(href="", title="See task details", tg-bind-html="task.subject",
|
a.task-name(href="", title="See task details", tg-bind-html="task.subject",
|
||||||
|
|
Loading…
Reference in New Issue