Commit da46bf93 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-12-29 gabriel

* Fix issue to reload the page and insert the text_content on svg editor

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41853 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5626cc21
......@@ -219,7 +219,7 @@
<key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[
<iframe name="svgframe" id="svgframe" src="jquery/plugin/svg-editor/svg-editor.html" width="750" height="600"/>
<iframe name="svgframe" id="svgframe" src="jquery/plugin/svg-editor/svg-editor.html" width="750" height="600">
]]></string> </value>
</item>
......
......@@ -40,7 +40,6 @@
<key> <string>_text</string> </key>
<value> <unicode>$(document).ready(function(){\n
$("button.save").click(function(event){\n
event.preventDefault();\n
svg_canvas = window.frames["svgframe"].svgCanvas;\n
$.ajax({\n
type: "POST",\n
......@@ -48,12 +47,18 @@
data: "text=" + svg_canvas.getSvgString(),\n
});\n
});\n
svg_canvas = window.frames["svgframe"].svgCanvas;\n
var text_content = $.ajax({\n
url: "getTextContent",\n
async: false\n
}).responseText;\n
window.onload = function() {\n
var svg_canvas = window.frames["svgframe"].svgCanvas;\n
var text_content = $.ajax({\n
url: "getTextContent",\n
async: false\n
}).responseText;\n
svg_canvas.setSvgString(text_content);\n
}\n
$("iframe#svgframe").css("border", "0px");\n
})</unicode> </value>
</item>
......
......@@ -50,8 +50,7 @@
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
......
2010-12-29 gabriel
* Fix issue to reload the page and insert the text_content on svg editor
2010-11-21 gabriel
* Clear the text_content field to use SVG Editor from EditorField
......
21
\ No newline at end of file
22
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment