[Erp5-report] r41926 gabriel - in /erp5/trunk/bt5/erp5_svg_editor: SkinTemplateItem/portal_...

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Jan 2 16:31:02 CET 2011


Author: gabriel
Date: Sun Jan  2 16:31:01 2011
New Revision: 41926

URL: http://svn.erp5.org?rev=41926&view=rev
Log:
move code. Is not necessary to put all the code inside a jquery function.

Modified:
    erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml
    erp5/trunk/bt5/erp5_svg_editor/bt/revision

Modified: erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml?rev=41926&r1=41925&r2=41926&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml [utf8] Sun Jan  2 16:31:01 2011
@@ -38,7 +38,16 @@
         </item>
         <item>
             <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
     svg_canvas = window.frames["svgframe"].svgCanvas;\n
     $.ajax({\n
@@ -51,14 +60,6 @@
                              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>

Modified: erp5/trunk/bt5/erp5_svg_editor/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/bt/revision?rev=41926&r1=41925&r2=41926&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_svg_editor/bt/revision [utf8] Sun Jan  2 16:31:01 2011
@@ -1 +1 @@
-22
\ No newline at end of file
+23
\ No newline at end of file



More information about the Erp5-report mailing list