|
|
@ -20,6 +20,7 @@ export default class PostEditor {
|
|
|
|
this.processing = false;
|
|
|
|
this.processing = false;
|
|
|
|
let self = this;
|
|
|
|
let self = this;
|
|
|
|
this.admin = new FipamoAdminAPI(null);
|
|
|
|
this.admin = new FipamoAdminAPI(null);
|
|
|
|
|
|
|
|
this.mm = new Maintenance();
|
|
|
|
this.urlPieces = document.URL.split("/");
|
|
|
|
this.urlPieces = document.URL.split("/");
|
|
|
|
this.post = [];
|
|
|
|
this.post = [];
|
|
|
|
this.postID = null;
|
|
|
|
this.postID = null;
|
|
|
@ -250,12 +251,16 @@ export default class PostEditor {
|
|
|
|
handleImageUpload(type, files) {
|
|
|
|
handleImageUpload(type, files) {
|
|
|
|
let self = this;
|
|
|
|
let self = this;
|
|
|
|
notify.alert("Uploading Image", null);
|
|
|
|
notify.alert("Uploading Image", null);
|
|
|
|
let mm = new Maintenance();
|
|
|
|
|
|
|
|
mm.imageUpload(type, files)
|
|
|
|
self.mm
|
|
|
|
|
|
|
|
.imageUpload(type, files)
|
|
|
|
.then((r) => {
|
|
|
|
.then((r) => {
|
|
|
|
if (r.type == DataEvent.POST_IMAGE_ADDED)
|
|
|
|
if (r.type == DataEvent.POST_IMAGE_ADDED) {
|
|
|
|
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
|
|
|
|
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
|
|
|
|
notify.alert("Image Added to Entry", true);
|
|
|
|
notify.alert("Image Added to Entry", true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notify.alert("Uh oh. Image not added", false);
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
notify.alert("Uh oh. Image not added", false);
|
|
|
|
notify.alert("Uh oh. Image not added", false);
|
|
|
|