Merge pull request #1002 from taigaio/Issue-4155-Error-when-upload-files-to-wiki-page

Disabling drag and drop of attachments on non existing wiki pages
stable
Juanfran 2016-05-13 07:57:12 +02:00
commit d264c2db2d
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"