-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Aufreiter
committed
Nov 16, 2016
1 parent
792d0f3
commit bda645f
Showing
14 changed files
with
81 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import FileProxy from '../../model/FileProxy' | ||
|
||
/* | ||
Generic implementation of a file proxy that works with | ||
any file type | ||
*/ | ||
class DefaultFileProxy extends FileProxy { | ||
|
||
constructor(fileNode, context) { | ||
super(fileNode, context) | ||
|
||
// used locally e.g. after drop or file dialog | ||
this.file = fileNode.data | ||
if (this.file) { | ||
this._fileUrl = URL.createObjectURL(this.file) | ||
} | ||
this.url = fileNode.url | ||
} | ||
|
||
getUrl() { | ||
// if we have fetched the url already, just serve it here | ||
if (this.url) { | ||
return this.url | ||
} | ||
// if we have a local file, use it's data URL | ||
if (this._fileUrl) { | ||
return this._fileUrl | ||
} | ||
// no URL available | ||
return "" | ||
} | ||
|
||
sync(cb) { | ||
this.context.fileService.uploadFile(this.file, cb) | ||
} | ||
} | ||
|
||
export default DefaultFileProxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1 @@ | ||
/* | ||
* XML converter for Images. | ||
*/ | ||
export default { | ||
|
||
type: 'image', | ||
tagName: 'image', | ||
|
||
import: function(el, node) { | ||
node.src = el.attr('src') | ||
node.previewSrc = el.attr('preview-src') | ||
}, | ||
|
||
export: function(node, el) { | ||
el.attr('src', node.src) | ||
if (node.previewSrc) el.attr('preview-src', node.previewSrc) | ||
} | ||
} | ||
export { default } from './ImageHTMLConverter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.sc-insert-image-tool > input { | ||
position: fixed; | ||
top: -1000px; | ||
left: -1000px; | ||
display: none; | ||
} |
File renamed without changes.