[Erp5-report] r40146 gabriel - in /erp5/trunk/bt5/erp5_svg_editor: SkinTemplateItem/portal_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Nov 9 23:46:33 CET 2010
Author: gabriel
Date: Tue Nov 9 23:46:32 2010
New Revision: 40146
URL: http://svn.erp5.org?rev=40146&view=rev
Log:
2010-11-09 gabriel
* Initial implementation to SVG Editor to be supported in EditorField
Added:
erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml
erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml
erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml
Modified:
erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml
erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_edit_form_view.xml
erp5/trunk/bt5/erp5_svg_editor/bt/change_log
erp5/trunk/bt5/erp5_svg_editor/bt/revision
Added: erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml?rev=40146&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml (added)
+++ erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_getTextContent.xml [utf8] Tue Nov 9 23:46:32 2010
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>return context.getTextContent()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>_getattr_</string>
+ <string>context</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>WebIllustration_getTextContent</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml?rev=40146&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml (added)
+++ erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/WebIllustration_setTextContent.xml [utf8] Tue Nov 9 23:46:32 2010
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>text_content = context.REQUEST.get("text")\n
+if text_content is not None:\n
+ context.edit(text_content=text_content)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>text_content</string>
+ <string>None</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>WebIllustration_setTextContent</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
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=40146&r1=40145&r2=40146&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] Tue Nov 9 23:46:32 2010
@@ -38,8 +38,25 @@
</item>
<item>
<key> <string>_text</string> </key>
- <value> <unicode>function clickSaveButton(act) {\n
- document.forms[0].action = act;\n
+ <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
+ type: "POST",\n
+ url: "WebIllustration_setTextContent",\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
+ 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>
Modified: erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_edit_form_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_edit_form_view.xml?rev=40146&r1=40145&r2=40146&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_edit_form_view.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_edit_form_view.xml [utf8] Tue Nov 9 23:46:32 2010
@@ -36,11 +36,6 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
-<tal:block tal:replace="nothing">\n
-\n
-\n
-\n
-</tal:block>\n
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
@@ -50,7 +45,7 @@
\'portal_skins/erp5_jquery/plugin/svg-editor/svg-editor.css\',\n
\'portal_skins/erp5_jquery/plugin/spinbtn/JQuerySpinBtn.css\',\n
];\n
- js_list_jquery_template python: [];\n
+ js_list_jquery_template python: [\'svg-editor.erp5.js\'];\n
global css_list css_list | python:[];\n
global js_list js_list | python:[];\n
dummy python:css_list.extend(css_list_jquery_template);\n
Added: erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml?rev=40146&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml (added)
+++ erp5/trunk/bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg_support.xml [utf8] Tue Nov 9 23:46:32 2010
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <unicode encoding="cdata"><![CDATA[
+
+<script type="text/javascript" src="portal_skins/erp5_jquery/core/jquery.js"></script>\n
+<script type="text/javascript" src="svg-editor.erp5.js"></script>\n
+<iframe name="svgframe" \n
+ id="svgframe" \n
+ src="portal_skins/erp5_jquery/plugin/svg-editor/svg-editor.html" \n
+ width="100%" \n
+ height="570"/>\n
+
+
+]]></unicode> </value>
+ </item>
+ <item>
+ <key> <string>content_type</string> </key>
+ <value> <string>text/html</string> </value>
+ </item>
+ <item>
+ <key> <string>expand</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>svg_support</string> </value>
+ </item>
+ <item>
+ <key> <string>output_encoding</string> </key>
+ <value> <string>utf-8</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <unicode></unicode> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_svg_editor/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/bt/change_log?rev=40146&r1=40145&r2=40146&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_svg_editor/bt/change_log [utf8] Tue Nov 9 23:46:32 2010
@@ -1,2 +1,5 @@
+2010-11-09 gabriel
+* Initial implementation to SVG Editor to be supported in EditorField
+
2010-11-08 gabriel
* The initial commit
\ No newline at end of file
Modified: erp5/trunk/bt5/erp5_svg_editor/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_svg_editor/bt/revision?rev=40146&r1=40145&r2=40146&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_svg_editor/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_svg_editor/bt/revision [utf8] Tue Nov 9 23:46:32 2010
@@ -1 +1 @@
-9
\ No newline at end of file
+10
\ No newline at end of file
More information about the Erp5-report
mailing list