initial commit

This commit is contained in:
jfh
2020-10-03 19:04:20 +02:00
parent 381c3bae99
commit e2493664ed
4 changed files with 34 additions and 15 deletions

View File

@@ -6,7 +6,6 @@ export default {
init ({$}) {
const svgEditor = this;
const {
curConfig: {extPath},
canvas: svgCanvas
} = svgEditor;
/**
@@ -17,7 +16,7 @@ export default {
const title = svgCanvas.getDocumentTitle();
return title.trim();
}
const saveSvgAction = extPath + 'savefile.php';
const saveSvgAction = './savefile.php';
svgEditor.setCustomHandlers({
save (win, data) {
const svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,

View File

@@ -27,7 +27,6 @@ export default {
const strings = await loadExtensionTranslation(svgEditor.curPrefs.lang);
const {
curConfig: {
extPath,
avoidClientSide, // Deprecated
avoidClientSideDownload, avoidClientSideOpen
},
@@ -76,8 +75,8 @@ export default {
return false;
}
const
saveSvgAction = extPath + 'filesave.php',
saveImgAction = extPath + 'filesave.php';
saveSvgAction = './filesave.php',
saveImgAction = './filesave.php';
// Create upload target (hidden iframe)
let cancelled = false;
@@ -174,9 +173,9 @@ export default {
if (window.FileReader && !avoidClientSideOpen) { return; }
// Change these to appropriate script file
const openSvgAction = extPath + 'fileopen.php?type=load_svg';
const importSvgAction = extPath + 'fileopen.php?type=import_svg';
const importImgAction = extPath + 'fileopen.php?type=import_img';
const openSvgAction = './fileopen.php?type=load_svg';
const importSvgAction = './fileopen.php?type=import_svg';
const importImgAction = './fileopen.php?type=import_img';
// Set up function for PHP uploader to use
svgEditor.processFile = function (str64, type) {