|
|
|
@ -140,9 +140,9 @@
|
|
|
|
|
this[globalName] = mainExports;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})({"fQadY":[function(require,module,exports) {
|
|
|
|
|
})({"jRsG2":[function(require,module,exports) {
|
|
|
|
|
var HMR_HOST = null;
|
|
|
|
|
var HMR_PORT = 59457;
|
|
|
|
|
var HMR_PORT = 1234;
|
|
|
|
|
var HMR_SECURE = false;
|
|
|
|
|
var HMR_ENV_HASH = "4a236f9275d0a351";
|
|
|
|
|
module.bundle.HMR_BUNDLE_ID = "770375bf412ba982";
|
|
|
|
@ -1639,7 +1639,7 @@ class PostEditor {
|
|
|
|
|
//--------------------------
|
|
|
|
|
constructor(){
|
|
|
|
|
this.processing = false;
|
|
|
|
|
let self = this;
|
|
|
|
|
let self = "this";
|
|
|
|
|
this.admin = new _fipamoAdminAPIDefault.default(null, document.getElementById('notify-progress'));
|
|
|
|
|
this.mm = new _maintenanceManagerDefault.default(null, null, document.getElementById('notify-progress'));
|
|
|
|
|
this.urlPieces = document.URL.split('/');
|
|
|
|
@ -1789,34 +1789,34 @@ class PostActions {
|
|
|
|
|
collectInfo(files) {
|
|
|
|
|
return new Promise((resolve, reject)=>{
|
|
|
|
|
let pageInfo = new FormData();
|
|
|
|
|
let txt = document.createElement("textarea");
|
|
|
|
|
txt.innerHTML = document.getElementById("highlight-content").innerHTML;
|
|
|
|
|
let txt = document.createElement('textarea');
|
|
|
|
|
txt.innerHTML = document.getElementById('highlight-content').innerHTML;
|
|
|
|
|
let html = txt.value;
|
|
|
|
|
html = html.replace(/<\/?span[^>]*>/g, ""); //removes prism styling
|
|
|
|
|
html = html.replace(/<\/?br[^>]*>/g, "\n"); //convert back to encoded line break for storage
|
|
|
|
|
pageInfo.append("id", document.getElementById("post-edit-index").getAttribute("data-index"));
|
|
|
|
|
pageInfo.append("uuid", document.getElementById("post-edit-index").getAttribute("data-uuid"));
|
|
|
|
|
pageInfo.append("layout", document.getElementById("post-edit-index").getAttribute("data-layout"));
|
|
|
|
|
pageInfo.append("current_title", document.getElementById("post-edit-index").getAttribute("data-slug"));
|
|
|
|
|
pageInfo.append("content", html);
|
|
|
|
|
pageInfo.append("title", document.getElementById("post_title").value);
|
|
|
|
|
pageInfo.append("created", document.getElementById("post-date").getAttribute("data-raw"));
|
|
|
|
|
pageInfo.append("slug", new _stringUtilsDefault.default().cleanString(document.getElementById("post_title").value));
|
|
|
|
|
pageInfo.append("tags", document.getElementById("post_tags").value);
|
|
|
|
|
pageInfo.append("menu", document.getElementById("option-menu-pin").getAttribute("data-active"));
|
|
|
|
|
pageInfo.append("featured", document.getElementById("option-feature").getAttribute("data-active"));
|
|
|
|
|
pageInfo.append("published", document.getElementById("option-published").getAttribute("data-active"));
|
|
|
|
|
pageInfo.append("layout", document.getElementById("page-templates").value);
|
|
|
|
|
pageInfo.append("form_token", document.getElementById("form_token").value);
|
|
|
|
|
html = html.replace(/<\/?span[^>]*>/g, ''); //removes prism styling
|
|
|
|
|
html = html.replace(/<\/?br[^>]*>/g, '\n'); //convert back to encoded line break for storage
|
|
|
|
|
pageInfo.append('id', document.getElementById('post-edit-index').getAttribute('data-index'));
|
|
|
|
|
pageInfo.append('uuid', document.getElementById('post-edit-index').getAttribute('data-uuid'));
|
|
|
|
|
pageInfo.append('layout', document.getElementById('post-edit-index').getAttribute('data-layout'));
|
|
|
|
|
pageInfo.append('current_title', document.getElementById('post-edit-index').getAttribute('data-slug'));
|
|
|
|
|
pageInfo.append('content', html);
|
|
|
|
|
pageInfo.append('title', document.getElementById('post_title').value);
|
|
|
|
|
pageInfo.append('created', document.getElementById('post-date').getAttribute('data-raw'));
|
|
|
|
|
pageInfo.append('slug', new _stringUtilsDefault.default().cleanString(document.getElementById('post_title').value));
|
|
|
|
|
pageInfo.append('tags', document.getElementById('post_tags').value);
|
|
|
|
|
pageInfo.append('menu', document.getElementById('option-menu-pin').getAttribute('data-active'));
|
|
|
|
|
pageInfo.append('featured', document.getElementById('option-feature').getAttribute('data-active'));
|
|
|
|
|
pageInfo.append('published', document.getElementById('option-published').getAttribute('data-active'));
|
|
|
|
|
pageInfo.append('layout', document.getElementById('page-templates').value);
|
|
|
|
|
pageInfo.append('form_token', document.getElementById('form_token').value);
|
|
|
|
|
if (files.length > 0 && files != null) for(var i = 0; i < files.length; i++){
|
|
|
|
|
var file = files[i];
|
|
|
|
|
if (file.type.match("image.*")) pageInfo.append("page_files[]", file, file.name);
|
|
|
|
|
else reject("Not an image file");
|
|
|
|
|
if (file.type.match('image.*') || file.type.match('video.mp4')) pageInfo.append('page_files[]', file, file.name);
|
|
|
|
|
else reject('Not an image file');
|
|
|
|
|
}
|
|
|
|
|
else //check to see if image exists
|
|
|
|
|
if (document.getElementById("featured-image")) {
|
|
|
|
|
var imageURL = document.getElementById("featured-image").src;
|
|
|
|
|
imageURL != null || imageURL != undefined ? pageInfo.append("feature_image", imageURL) : pageInfo.append("feature_image", null);
|
|
|
|
|
if (document.getElementById('featured-image')) {
|
|
|
|
|
var imageURL = document.getElementById('featured-image').src;
|
|
|
|
|
imageURL != null || imageURL != undefined ? pageInfo.append('feature_image', imageURL) : pageInfo.append('feature_image', null);
|
|
|
|
|
}
|
|
|
|
|
//console.log("FILES", files);
|
|
|
|
|
resolve(pageInfo);
|
|
|
|
@ -5399,6 +5399,9 @@ var _sortablejs = require("sortablejs");
|
|
|
|
|
var _sortablejsDefault = parcelHelpers.interopDefault(_sortablejs);
|
|
|
|
|
var _dataUtils = require("../utils/DataUtils");
|
|
|
|
|
var _dataUtilsDefault = parcelHelpers.interopDefault(_dataUtils);
|
|
|
|
|
var _notificationsJs = require("./Notifications.js");
|
|
|
|
|
var _notificationsJsDefault = parcelHelpers.interopDefault(_notificationsJs);
|
|
|
|
|
const notify = new _notificationsJsDefault.default();
|
|
|
|
|
class FileManager {
|
|
|
|
|
//--------------------------
|
|
|
|
|
// constructor
|
|
|
|
@ -5412,7 +5415,9 @@ class FileManager {
|
|
|
|
|
'image/jpeg',
|
|
|
|
|
'image/gif',
|
|
|
|
|
'image/png',
|
|
|
|
|
'image/svg'
|
|
|
|
|
'image/svg',
|
|
|
|
|
'audio/mpeg',
|
|
|
|
|
'video/mp4'
|
|
|
|
|
];
|
|
|
|
|
this.files = [];
|
|
|
|
|
this.sortedFiles = [];
|
|
|
|
@ -5430,13 +5435,17 @@ class FileManager {
|
|
|
|
|
, false);
|
|
|
|
|
_sortablejsDefault.default.create(this.imageList, {
|
|
|
|
|
onUpdate: (e)=>{
|
|
|
|
|
notify.alert('REINDEXING FILES', null);
|
|
|
|
|
let currentFiles = []; //store current list
|
|
|
|
|
let items = e.target.children;
|
|
|
|
|
for(let index = 0; index < items.length; index++){
|
|
|
|
|
var item = items[index];
|
|
|
|
|
let url = '';
|
|
|
|
|
if (item.className == 'img-item') url = item.style.backgroundImage.slice(4, -1).replace(/"/g, '');
|
|
|
|
|
else url = item.getAttribute('data-source');
|
|
|
|
|
currentFiles.push({
|
|
|
|
|
id: item.getAttribute('id'),
|
|
|
|
|
earl: item.style.backgroundImage.slice(4, -1).replace(/"/g, '')
|
|
|
|
|
earl: url
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.reindexFiles(currentFiles, 0);
|
|
|
|
@ -5457,8 +5466,10 @@ class FileManager {
|
|
|
|
|
], path[6], {
|
|
|
|
|
type: blob.type
|
|
|
|
|
});
|
|
|
|
|
console.log('FRESH FILE', fresh);
|
|
|
|
|
this.files.push(fresh);
|
|
|
|
|
if (this.files.length <= count - 1) this.reindexFiles(sortOrder, ++step);
|
|
|
|
|
else notify.alert('FILES READY TO UPLOAD', true);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
sortFiles(files) {
|
|
|
|
@ -5482,7 +5493,7 @@ class FileManager {
|
|
|
|
|
image.title = escape(theFile.name);
|
|
|
|
|
var span = document.createElement('div');
|
|
|
|
|
span.style.background = 'url(' + f.target.result + ') no-repeat center center / cover';
|
|
|
|
|
span.className = 'img-item';
|
|
|
|
|
span.className = 'img-item'; //span.setAttribute('data-source', theFile.name);
|
|
|
|
|
image.setAttribute('id', i);
|
|
|
|
|
self.storage.push([
|
|
|
|
|
{
|
|
|
|
@ -5495,6 +5506,18 @@ class FileManager {
|
|
|
|
|
self.imageList.appendChild(span); //add to files list
|
|
|
|
|
self.files.push(theFile);
|
|
|
|
|
break;
|
|
|
|
|
case 'video/mp4':
|
|
|
|
|
var video = document.createElement('div');
|
|
|
|
|
video.className = 'video-item';
|
|
|
|
|
video.setAttribute('data-source', f.target.result);
|
|
|
|
|
self.imageList.appendChild(video);
|
|
|
|
|
self.files.push(theFile);
|
|
|
|
|
break;
|
|
|
|
|
case 'audio/mpeg':
|
|
|
|
|
var sound = document.createElement('div');
|
|
|
|
|
sound.className = 'audio-item';
|
|
|
|
|
self.fileList.appendChild(sound);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
})(file); // Read in the image file as a data URL.
|
|
|
|
@ -5517,10 +5540,12 @@ class FileManager {
|
|
|
|
|
case 'change':
|
|
|
|
|
case 'drop':
|
|
|
|
|
e.type == 'drop' ? rawList = e.dataTransfer.files : rawList = e.target.files; //this.sortFiles(freshList);
|
|
|
|
|
for(var i = 0, f; f = rawList[i]; i++)// check witch files are cool to upload
|
|
|
|
|
for(var i = 0, f; f = rawList[i]; i++){
|
|
|
|
|
// check witch files are cool to upload
|
|
|
|
|
console.log('TYPE', f.type);
|
|
|
|
|
if (this.accetableFiles.includes(f.type)) sortedList.push(f);
|
|
|
|
|
else notOnTheList.push(f);
|
|
|
|
|
//send for sorting
|
|
|
|
|
} //send for sorting
|
|
|
|
|
self.sortFiles(sortedList);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -5528,7 +5553,7 @@ class FileManager {
|
|
|
|
|
}
|
|
|
|
|
exports.default = FileManager;
|
|
|
|
|
|
|
|
|
|
},{"sortablejs":"fLJM6","../utils/DataUtils":"lpIyf","@parcel/transformer-js/src/esmodule-helpers.js":"ciiiV"}],"fLJM6":[function(require,module,exports) {
|
|
|
|
|
},{"sortablejs":"fLJM6","../utils/DataUtils":"lpIyf","@parcel/transformer-js/src/esmodule-helpers.js":"ciiiV","./Notifications.js":"fmUxI"}],"fLJM6":[function(require,module,exports) {
|
|
|
|
|
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
|
|
|
parcelHelpers.defineInteropFlag(exports);
|
|
|
|
|
parcelHelpers.export(exports, "MultiDrag", ()=>MultiDragPlugin
|
|
|
|
@ -8475,6 +8500,6 @@ class NavActions {
|
|
|
|
|
}
|
|
|
|
|
exports.default = NavActions;
|
|
|
|
|
|
|
|
|
|
},{"@parcel/transformer-js/src/esmodule-helpers.js":"ciiiV"}]},["fQadY","bEyX8"], "bEyX8", "parcelRequiredac0")
|
|
|
|
|
},{"@parcel/transformer-js/src/esmodule-helpers.js":"ciiiV"}]},["jRsG2","bEyX8"], "bEyX8", "parcelRequiredac0")
|
|
|
|
|
|
|
|
|
|
//# sourceMappingURL=Start.js.map
|
|
|
|
|