Commit 60736030 authored by Gabriel Monnerat's avatar Gabriel Monnerat

move code. Is not necessary to put all the code inside a jquery function.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41926 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aada0618
...@@ -38,7 +38,16 @@ ...@@ -38,7 +38,16 @@
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode>$(document).ready(function(){\n <value> <unicode>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
\n
$(document).ready(function(){\n
$("button.save").click(function(event){\n $("button.save").click(function(event){\n
svg_canvas = window.frames["svgframe"].svgCanvas;\n svg_canvas = window.frames["svgframe"].svgCanvas;\n
$.ajax({\n $.ajax({\n
...@@ -51,14 +60,6 @@ ...@@ -51,14 +60,6 @@
url: "getTextContent",\n url: "getTextContent",\n
async: false\n async: false\n
}).responseText;\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 $("iframe#svgframe").css("border", "0px");\n
})</unicode> </value> })</unicode> </value>
</item> </item>
......
22 23
\ 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