Disabling drag and drop of attachments on non existing wiki pages

stable
Alejandro Alonso 2016-05-10 08:32:32 +02:00 committed by Juanfran
parent f19cf18537
commit 78782fd51f
3 changed files with 4 additions and 2 deletions

View File

@ -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) ->

View File

@ -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": {

View File

@ -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"