- Build: Babel 7

- npm: Update qr-manipulation
This commit is contained in:
Brett Zamir
2018-09-26 21:14:12 +08:00
parent 9f7f7b9732
commit ae58be8277
64 changed files with 45118 additions and 31331 deletions

View File

@@ -4,24 +4,27 @@ var svgEditorExtension_php_savefile = (function () {
/* globals jQuery */
// TODO: Might add support for "exportImage" custom
// handler as in "ext-server_opensave.js" (and in savefile.php)
var extPhp_savefile = {
name: 'php_savefile',
init: function init() {
var svgEditor = this;
var $ = jQuery;
var svgCanvas = svgEditor.canvas;
function getFileNameFromTitle() {
var title = svgCanvas.getDocumentTitle();
return title.trim();
}
var saveSvgAction = svgEditor.curConfig.extPath + 'savefile.php';
svgEditor.setCustomHandlers({
save: function save(win, data) {
var svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,
filename = getFileNameFromTitle();
$.post(saveSvgAction, { output_svg: svg, filename: filename });
$.post(saveSvgAction, {
output_svg: svg,
filename: filename
});
}
});
}