diff --git a/app/coffee/modules/common/components.coffee b/app/coffee/modules/common/components.coffee index cde71cb0..6f769312 100644 --- a/app/coffee/modules/common/components.coffee +++ b/app/coffee/modules/common/components.coffee @@ -656,7 +656,7 @@ EditableWysiwyg = (attachmentsService, attachmentsFullService) -> link = ($scope, $el, $attrs, $model) -> isInEditMode = -> - return $el.find('textarea').is(':visible') + return $el.find('textarea').is(':visible') and $model.$modelValue.id uploadFile = (file, type) -> diff --git a/app/locales/taiga/locale-en.json b/app/locales/taiga/locale-en.json index c727005f..379c312b 100644 --- a/app/locales/taiga/locale-en.json +++ b/app/locales/taiga/locale-en.json @@ -228,6 +228,7 @@ "PREVIEW_BUTTON": "Preview", "EDIT_BUTTON": "Edit", "ATTACH_FILE_HELP": "Attach files by dragging & dropping on the textarea above.", + "ATTACH_FILE_HELP_SAVE_FIRST": "Save first before if you want to attach files by dragging & dropping on the textarea above.", "MARKDOWN_HELP": "Markdown syntax help" }, "PERMISIONS_CATEGORIES": { diff --git a/app/partials/common/components/wysiwyg.jade b/app/partials/common/components/wysiwyg.jade index 3ed85550..97a62681 100644 --- a/app/partials/common/components/wysiwyg.jade +++ b/app/partials/common/components/wysiwyg.jade @@ -1,6 +1,7 @@ mixin wysihelp div.wysiwyg-help - span.drag-drop-help(translate="COMMON.WYSIWYG.ATTACH_FILE_HELP") + span.drag-drop-help(ng-if="wiki.id", translate="COMMON.WYSIWYG.ATTACH_FILE_HELP") + span.drag-drop-help(ng-if="!wiki.id", translate="COMMON.WYSIWYG.ATTACH_FILE_HELP_SAVE_FIRST") a.help-markdown( href="https://tree.taiga.io/support/misc/taiga-markdown-syntax/" target="_blank"