diff --git a/app/modules/components/wysiwyg/comment-wysiwyg.directive.coffee b/app/modules/components/wysiwyg/comment-wysiwyg.directive.coffee index d68a0c70..09e369ab 100644 --- a/app/modules/components/wysiwyg/comment-wysiwyg.directive.coffee +++ b/app/modules/components/wysiwyg/comment-wysiwyg.directive.coffee @@ -17,14 +17,18 @@ # File: components/wysiwyg/comment-wysiwyg.directive.coffee ### -CommentWysiwyg = (attachmentsFullService) -> +CommentWysiwyg = ($modelTransform, $rootscope, $confirm, attachmentsFullService) -> link = ($scope, $el, $attrs) -> $scope.editableDescription = false $scope.saveComment = (description, cb) -> $scope.content = '' $scope.vm.type.comment = description - $scope.vm.onAddComment({callback: cb}) + + transform = $modelTransform.save (item) -> return + transform.then -> + $rootscope.$broadcast("object:updated") + transform.finally(cb) types = { epics: "epic", @@ -70,4 +74,8 @@ CommentWysiwyg = (attachmentsFullService) -> } angular.module("taigaComponents") - .directive("tgCommentWysiwyg", ["tgAttachmentsFullService", CommentWysiwyg]) + .directive("tgCommentWysiwyg", [ + "$tgQueueModelTransformation", + "$rootScope", + "tgAttachmentsFullService", + CommentWysiwyg]) diff --git a/app/modules/components/wysiwyg/item-wysiwyg.directive.coffee b/app/modules/components/wysiwyg/item-wysiwyg.directive.coffee index b8d78b42..0d0bcacb 100644 --- a/app/modules/components/wysiwyg/item-wysiwyg.directive.coffee +++ b/app/modules/components/wysiwyg/item-wysiwyg.directive.coffee @@ -21,7 +21,6 @@ ItemWysiwyg = ($modelTransform, $rootscope, $confirm, attachmentsFullService, $translate) -> link = ($scope, $el, $attrs) -> $scope.editableDescription = false - $scope.saveDescription = (description, cb) -> transform = $modelTransform.save (item) -> item.description = description diff --git a/app/modules/history/history.controller.coffee b/app/modules/history/history.controller.coffee index 3e9fc4bf..368c413e 100644 --- a/app/modules/history/history.controller.coffee +++ b/app/modules/history/history.controller.coffee @@ -94,7 +94,7 @@ class HistorySectionController @.editing = null addComment: (cb) -> - @repo.save(@.type).then => + return @repo.save(@.type).then => @._loadHistory() cb() diff --git a/app/modules/projects/create/import-taiga/import-taiga.controller.coffee b/app/modules/projects/create/import-taiga/import-taiga.controller.coffee index 19125b3d..4bc50604 100644 --- a/app/modules/projects/create/import-taiga/import-taiga.controller.coffee +++ b/app/modules/projects/create/import-taiga/import-taiga.controller.coffee @@ -33,13 +33,13 @@ class ImportTaigaController file = files[0] - loader = @confirm.loader(@translate.instant('PROJECT.IMPORT.IN_PROGRESS.TITLE'), @translate.instant('PROJECT.IMPORT.IN_PROGRESS.DESCRIPTION'), true) + loader = @confirm.loader(@translate.instant('PROJECT.IMPORT.IN_PROGRESS.TITLE'), + @translate.instant('PROJECT.IMPORT.IN_PROGRESS.DESCRIPTION'), true) loader.start() promise = @rs.projects.import(file, loader.update) - - @importProjectService.importPromise(promise).finally () => loader.stop() + @importProjectService.importPromise(promise).finally () -> loader.stop() return diff --git a/app/partials/us/us-detail.jade b/app/partials/us/us-detail.jade index 18effa14..9e35222f 100644 --- a/app/partials/us/us-detail.jade +++ b/app/partials/us/us-detail.jade @@ -112,6 +112,7 @@ div.wrapper( div.ticket-watchers( tg-watchers ng-model="us" + item="us" required-perm="modify_us" )