Commit 1b8bd13f authored by Gabriel Monnerat's avatar Gabriel Monnerat

clean up js

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40135 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f6617de4
......@@ -38,27 +38,11 @@
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode>// This function will be called when the user click the save button. As\n
// submitAction function may have changed the action before, it\'s better to\n
// reset the form action to it\'s original behaviour. This is actually\n
// usefull when the user click the back button.\n
function clickSaveButton(act) {\n
changed = false;\n
<value> <unicode>function clickSaveButton(act) {\n
document.forms[0].action = act;\n
// Here we should use an even based approach - and logic in field class\n
svg_canvas = window.frames["svgframe"].svgCanvas;\n
svg_canvas.bind("saved", saveToField);\n
svg_canvas.save();\n
document.forms[0].elements[\'field_my_text_content\'].value = $.sheet.instance[0].getSource(true);\n
} \n
\n
function saveToField(window, svg) {\n
document.forms[0].elements[\'field_my_text_content\'].value = svg;\n
}\n
\n
\n
\n
</unicode> </value>
document.forms[0].elements[\'field_my_text_content\'].value = svg_canvas.getSvgString();\n
}</unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
7
\ No newline at end of file
9
\ 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