mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Fixed uploading images for articles.
This commit is contained in:
parent
4e8c0b65e2
commit
ec7028af60
2 changed files with 5 additions and 3 deletions
|
@ -38,12 +38,13 @@ class LiveEditingMarkup extends TreemaNode.nodeMap.ace
|
|||
url: InkBlob.url
|
||||
filename: InkBlob.filename
|
||||
mimetype: InkBlob.mimetype
|
||||
description: ''
|
||||
createdFor: []
|
||||
path: @settings.filePath
|
||||
|
||||
@uploadingPath = [@settings.filePath, InkBlob.filename].join('/')
|
||||
$.ajax('/file', { type: 'POST', data: body, success: @onFileUploaded })
|
||||
|
||||
onFileUploaded: (e) =>
|
||||
@editor.insert ""
|
||||
@editor.insert ""
|
||||
|
||||
onEditorChange: =>
|
||||
@saveChanges()
|
||||
|
|
|
@ -35,6 +35,7 @@ module.exports = class ArticleEditView extends View
|
|||
data = $.extend(true, {}, @article.attributes)
|
||||
options =
|
||||
data: data
|
||||
filePath: "db/thang.type/#{@article.get('original')}"
|
||||
schema: Article.schema.attributes
|
||||
callbacks:
|
||||
change: @pushChangesToPreview
|
||||
|
|
Loading…
Reference in a new issue