diff --git a/app/locales/taiga/locale-en.json b/app/locales/taiga/locale-en.json index b254df6a..2f2b9a65 100644 --- a/app/locales/taiga/locale-en.json +++ b/app/locales/taiga/locale-en.json @@ -1105,7 +1105,7 @@ }, "REMOVE_RELATIONSHIP_WITH_EPIC": { "TITLE": "Remove relationship with Epic", - "MESSAGE": "Are you sure you want to delete the relationship of this User Story with the Epic {{epicSubject}}?" + "MESSAGE": "Are you sure you want to remove the relationship of this User Story with the Epic {{epicSubject}}?" }, "CREATE_MEMBER": { "PLACEHOLDER_INVITATION_TEXT": "(Optional) Add a personalized text to the invitation. Tell something lovely to your new members ;-)", diff --git a/app/modules/components/detail/header/detail-header.controller.coffee b/app/modules/components/detail/header/detail-header.controller.coffee index 11ab7f68..0e88be37 100644 --- a/app/modules/components/detail/header/detail-header.controller.coffee +++ b/app/modules/components/detail/header/detail-header.controller.coffee @@ -58,6 +58,10 @@ class StoryHeaderController canEdit: _.includes(@.project.my_permissions, @.requiredPerm) } + cancelEdit: () -> + @.editMode = false + @.item.subject = @.originalSubject + editSubject: (value) -> selection = @window.getSelection() if selection.type != "Range" diff --git a/app/modules/components/detail/header/detail-header.jade b/app/modules/components/detail/header/detail-header.jade index 40f710cd..2b0d3843 100644 --- a/app/modules/components/detail/header/detail-header.jade +++ b/app/modules/components/detail/header/detail-header.jade @@ -42,7 +42,7 @@ svg-icon="icon-save" ) button.edit-title-button.cancel-title-button.e2e-cancel-title-button( - ng-click="vm.editSubject(false)" + ng-click="vm.cancelEdit(false)" ) tg-svg(svg-icon="icon-close") diff --git a/app/modules/components/wysiwyg/wysiwyg.directive.coffee b/app/modules/components/wysiwyg/wysiwyg.directive.coffee index 4685a954..de8a7f30 100644 --- a/app/modules/components/wysiwyg/wysiwyg.directive.coffee +++ b/app/modules/components/wysiwyg/wysiwyg.directive.coffee @@ -352,7 +352,7 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad discardLocalStorage = () -> $storage.remove($scope.storageKey) - cancelWithConfirmation = () -> + $scope.cancelWithConfirmation = () -> if $scope.content == $scope.markdown $scope.cancel() @@ -509,7 +509,7 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad if $scope.editMode && code == 27 e.stopPropagation() - $scope.$applyAsync(cancelWithConfirmation) + $scope.$applyAsync($scope.cancelWithConfirmation) else if code == 27 editorMedium.blur() diff --git a/app/partials/common/components/wysiwyg-toolbar.jade b/app/partials/common/components/wysiwyg-toolbar.jade index 035267a8..b5ee3cc6 100644 --- a/app/partials/common/components/wysiwyg-toolbar.jade +++ b/app/partials/common/components/wysiwyg-toolbar.jade @@ -44,7 +44,7 @@ tg-svg(svg-icon="icon-save") a.e2e-cancel-editor( href="#", - ng-click="cancel($event)" + ng-click="cancelWithConfirmation($event)" title="{{ 'COMMON.CANCEL' | translate }}" ) tg-svg(svg-icon="icon-close")