changeset 398:3bf5061ffc30

SvgEditor: adds the decoded svg data to div id="svgdata"
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 25 Aug 2009 07:34:47 +0200
parents 0fc829b55df6
children 74b81223475a
files data/plugin/action/SvgEditor.py htdocs/svg-edit/editor/svg-editor.js
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SvgEditor.py	Tue Aug 25 07:27:25 2009 +0200
+++ b/data/plugin/action/SvgEditor.py	Tue Aug 25 07:34:47 2009 +0200
@@ -22,8 +22,7 @@
         fpath = AttachFile.getFilename(request, pagename, target).encode(config.charset)
         filecontent = file(fpath, 'r').readlines()
         filecontent = ''.join(filecontent[1:])
-        filecontent = filecontent.encode('base_64')
-
+        
     do = request.values.get('do', '')
     if do == 'save':
         filecontent = request.values.get('svg_data', '')
--- a/htdocs/svg-edit/editor/svg-editor.js	Tue Aug 25 07:27:25 2009 +0200
+++ b/htdocs/svg-edit/editor/svg-editor.js	Tue Aug 25 07:34:47 2009 +0200
@@ -14,7 +14,7 @@
     var svg = document.getElementById("svgdata");
 	var svgCanvas = new SvgCanvas(document.getElementById("svgcanvas"));
     var filecontent =  svg.innerHTML;
-    // ToDo filecontent needs to be base64 decoded
+    
     if (filecontent != '') {
         if (!svgCanvas.setSvgString(filecontent)) {
             if( !confirm('There were parsing errors in your SVG source.\nRevert back to original SVG source?') ) {