From 2c3c583f3318d97543ae95793bd401392ce36a4b Mon Sep 17 00:00:00 2001 From: Gabriel Monnerat <gabriel@tiolive.com> Date: Wed, 10 Nov 2010 00:47:28 +0000 Subject: [PATCH] rename files and added comments git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40149 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...TextContent.xml => Base_getTextContentWrapper.xml} | 8 ++++++-- ...TextContent.xml => Base_setTextContentWrapper.xml} | 7 +++++-- .../erp5_svg_editor/svg-editor.erp5.js.xml | 11 +++-------- .../{svg_support.xml => svg_editor_support.xml} | 2 +- bt5/erp5_svg_editor/bt/revision | 2 +- 5 files changed, 16 insertions(+), 14 deletions(-) rename bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/{WebIllustration_getTextContent.xml => Base_getTextContentWrapper.xml} (93%) rename bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/{WebIllustration_setTextContent.xml => Base_setTextContentWrapper.xml} (94%) rename bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/{svg_support.xml => svg_editor_support.xml} (97%) diff --git a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_getTextContentWrapper.xml similarity index 93% rename from bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml rename to bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_getTextContentWrapper.xml index aa79ede84f..b81bb5312d 100644 --- a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml +++ b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_getTextContentWrapper.xml @@ -50,7 +50,11 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>return context.getTextContent()\n + <value> <string>"""\n + Script used by JavaScript to get the text of document.\n + This way is used to the JavaScript insert the data in SVG Editor.\n +"""\n +return context.getTextContent()\n </string> </value> </item> <item> @@ -105,7 +109,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>WebIllustration_getTextContent</string> </value> + <value> <string>Base_getTextContentWrapper</string> </value> </item> <item> <key> <string>warnings</string> </key> diff --git a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml similarity index 94% rename from bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml rename to bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml index 597be19253..48f06b7729 100644 --- a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml +++ b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/Base_setTextContentWrapper.xml @@ -50,7 +50,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>text_content = context.REQUEST.get("text")\n + <value> <string>"""\n + wrapper to JQuery insert the data in the current document\n +"""\n +text_content = context.REQUEST.get("text")\n if text_content is not None:\n context.edit(text_content=text_content)\n </string> </value> @@ -109,7 +112,7 @@ if text_content is not None:\n </item> <item> <key> <string>id</string> </key> - <value> <string>WebIllustration_setTextContent</string> </value> + <value> <string>Base_setTextContentWrapper</string> </value> </item> <item> <key> <string>warnings</string> </key> 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 9fcc8b0436..3dbc2fe565 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 @@ -44,22 +44,17 @@ svg_canvas = window.frames["svgframe"].svgCanvas;\n $.ajax({\n type: "POST",\n - url: "WebIllustration_setTextContent",\n + url: "Base_setTextContentWrapper",\n data: "text=" + svg_canvas.getSvgString(),\n });\n });\n svg_canvas = window.frames["svgframe"].svgCanvas;\n var text_content = $.ajax({\n - url: "WebIllustration_getTextContent",\n + url: "Base_getTextContentWrapper",\n async: false\n }).responseText;\n svg_canvas.setSvgString(text_content);\n -})\n -\n -function clickSaveButton() {\n - svg_canvas = window.frames["svgframe"].svgCanvas;\n - document.forms[0].elements[\'field_my_text_content\'].value = svg_canvas.getSvgString();\n -}</unicode> </value> +})</unicode> </value> </item> <item> <key> <string>content_type</string> </key> diff --git a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_editor_support.xml similarity index 97% rename from bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml rename to bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_editor_support.xml index 7ce823b93a..c29576feea 100644 --- a/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml +++ b/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_editor_support.xml @@ -57,7 +57,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>svg_support</string> </value> + <value> <string>svg_editor_support</string> </value> </item> <item> <key> <string>output_encoding</string> </key> diff --git a/bt5/erp5_svg_editor/bt/revision b/bt5/erp5_svg_editor/bt/revision index 9d607966b7..ca7bf83ac5 100644 --- a/bt5/erp5_svg_editor/bt/revision +++ b/bt5/erp5_svg_editor/bt/revision @@ -1 +1 @@ -11 \ No newline at end of file +13 \ No newline at end of file -- 2.30.9