diff --git a/app/coffee/modules/issues/detail.coffee b/app/coffee/modules/issues/detail.coffee index 0f0ea79c..35a06c0e 100644 --- a/app/coffee/modules/issues/detail.coffee +++ b/app/coffee/modules/issues/detail.coffee @@ -67,9 +67,9 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin, tai @location.replace() return @q.reject(xhr) - @scope.$on("attachment:create", => @.loadHistory()) - @scope.$on("attachment:edit", => @.loadHistory()) - @scope.$on("attachment:delete", => @.loadHistory()) + @scope.$on("attachment:create", => @rootscope.$broadcast("history:reload")) + @scope.$on("attachment:edit", => @rootscope.$broadcast("history:reload")) + @scope.$on("attachment:delete", => @rootscope.$broadcast("history:reload")) loadProject: -> return @rs.projects.get(@scope.projectId).then (project) => diff --git a/app/coffee/modules/tasks/detail.coffee b/app/coffee/modules/tasks/detail.coffee index f2d4e886..c1f08250 100644 --- a/app/coffee/modules/tasks/detail.coffee +++ b/app/coffee/modules/tasks/detail.coffee @@ -59,9 +59,10 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig promise.then null, -> console.log "FAIL" #TODO - @scope.$on "attachment:create", @loadHistory - @scope.$on "attachment:edit", @loadHistory - @scope.$on "attachment:delete", @loadHistory + + @scope.$on("attachment:create", => @rootscope.$broadcast("history:reload")) + @scope.$on("attachment:edit", => @rootscope.$broadcast("history:reload")) + @scope.$on("attachment:delete", => @rootscope.$broadcast("history:reload")) loadProject: -> return @rs.projects.get(@scope.projectId).then (project) => diff --git a/app/coffee/modules/userstories/detail.coffee b/app/coffee/modules/userstories/detail.coffee index 70e32692..a4f6c344 100644 --- a/app/coffee/modules/userstories/detail.coffee +++ b/app/coffee/modules/userstories/detail.coffee @@ -64,9 +64,9 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin, @location.replace() return @q.reject(xhr) - @scope.$on("attachment:create", => @loadHistory()) - @scope.$on("attachment:edit", => @loadHistory()) - @scope.$on("attachment:delete", => @loadHistory()) + @scope.$on("attachment:create", => @rootscope.$broadcast("history:reload")) + @scope.$on("attachment:edit", => @rootscope.$broadcast("history:reload")) + @scope.$on("attachment:delete", => @rootscope.$broadcast("history:reload")) loadProject: -> return @rs.projects.get(@scope.projectId).then (project) =>