From 8ce73cd5ca57e2874c6707b019c76819c1d838a0 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Tue, 6 Jul 2010 13:57:05 +0000 Subject: [PATCH] Added file saving/export ability to server_opensave extension, fixing issue 582 git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1625 eee81c28-f429-11dd-99c0-75d572ba1ddd --- ...-server_open.js => ext-server_opensave.js} | 78 +++++++++++++++++-- editor/extensions/fileopen.php | 9 +++ editor/extensions/filesave.php | 44 +++++++++++ 3 files changed, 123 insertions(+), 8 deletions(-) rename editor/extensions/{ext-server_open.js => ext-server_opensave.js} (59%) create mode 100644 editor/extensions/filesave.php diff --git a/editor/extensions/ext-server_open.js b/editor/extensions/ext-server_opensave.js similarity index 59% rename from editor/extensions/ext-server_open.js rename to editor/extensions/ext-server_opensave.js index d0e94236..51236995 100644 --- a/editor/extensions/ext-server_open.js +++ b/editor/extensions/ext-server_opensave.js @@ -1,17 +1,82 @@ /* - * ext-server_open.js + * ext-server_opensave.js * * Licensed under the Apache License, Version 2 * * Copyright(c) 2010 Alexis Deveria * */ - -svgEditor.addExtension("server_open", { + +svgEditor.addExtension("server_opensave", { callback: function() { + + var save_svg_action = 'extensions/filesave.php'; + var save_png_action = 'extensions/filesave.php'; + + // Create upload target (hidden iframe) + var target = $('