From 5250759d502c1f1efb59ffccdc4b15816200ce2e Mon Sep 17 00:00:00 2001 From: Gabriel Monnerat <gabriel@tiolive.com> Date: Wed, 24 Nov 2010 17:38:49 +0000 Subject: [PATCH] change function to save the object and reorganized js git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40618 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml | 2 +- .../portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml index 48f06b7729..7a8ab70432 100644 --- a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml +++ b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml @@ -55,7 +55,7 @@ """\n text_content = context.REQUEST.get("text")\n if text_content is not None:\n - context.edit(text_content=text_content)\n + context.setTextContent(text_content)\n </string> </value> </item> <item> diff --git a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml index ab24ce49f1..7ec0f1bb4d 100644 --- a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml +++ b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml @@ -39,7 +39,6 @@ <item> <key> <string>_text</string> </key> <value> <unicode>$(document).ready(function(){\n - $("iframe#svgframe").css("border", "0px");\n $("button.save").click(function(){\n svg_canvas = window.frames["svgframe"].svgCanvas;\n $.ajax({\n @@ -54,6 +53,7 @@ async: false\n }).responseText;\n svg_canvas.setSvgString(text_content);\n + $("iframe#svgframe").css("border", "0px");\n })</unicode> </value> </item> <item> -- 2.30.9