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 @@ ...@@ -219,7 +219,7 @@
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[ <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> ]]></string> </value>
</item> </item>
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode>$(document).ready(function(){\n <value> <unicode>$(document).ready(function(){\n
$("button.save").click(function(event){\n $("button.save").click(function(event){\n
event.preventDefault();\n
svg_canvas = window.frames["svgframe"].svgCanvas;\n svg_canvas = window.frames["svgframe"].svgCanvas;\n
$.ajax({\n $.ajax({\n
type: "POST",\n type: "POST",\n
...@@ -48,12 +47,18 @@ ...@@ -48,12 +47,18 @@
data: "text=" + svg_canvas.getSvgString(),\n data: "text=" + svg_canvas.getSvgString(),\n
});\n });\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 var text_content = $.ajax({\n
url: "getTextContent",\n url: "getTextContent",\n
async: false\n async: false\n
}).responseText;\n }).responseText;\n
svg_canvas.setSvgString(text_content);\n svg_canvas.setSvgString(text_content);\n
}\n
$("iframe#svgframe").css("border", "0px");\n $("iframe#svgframe").css("border", "0px");\n
})</unicode> </value> })</unicode> </value>
</item> </item>
......
...@@ -50,8 +50,7 @@ ...@@ -50,8 +50,7 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
2010-12-29 gabriel
* Fix issue to reload the page and insert the text_content on svg editor
2010-11-21 gabriel 2010-11-21 gabriel
* Clear the text_content field to use SVG Editor from EditorField * Clear the text_content field to use SVG Editor from EditorField
......
21 22
\ No newline at end of file \ 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