Fix Bug #1279: Deleting block condition from task in taskboard does not restore color

stable
David Barragán Merino 2014-10-12 00:47:46 +02:00
parent 1376c063bb
commit 8b1fbca5f7
1 changed files with 7 additions and 2 deletions

View File

@ -244,8 +244,13 @@ module.directive("tgTaskboard", ["$rootScope", TaskboardDirective])
TaskboardTaskDirective = ($rootscope) -> TaskboardTaskDirective = ($rootscope) ->
link = ($scope, $el, $attrs, $model) -> link = ($scope, $el, $attrs, $model) ->
$el.disableSelection() $el.disableSelection()
if $scope.task.is_blocked
$el.addClass('blocked') $scope.$watch "task", (task) ->
if task.is_blocked and not $el.hasClass("blocked")
$el.addClass("blocked")
else if not task.is_blocked and $el.hasClass("blocked")
$el.removeClass("blocked")
$el.find(".icon-edit").on "click", (event) -> $el.find(".icon-edit").on "click", (event) ->
if $el.find('.icon-edit').hasClass('noclick') if $el.find('.icon-edit').hasClass('noclick')
return return