changeset 472:8c4c99da678d

SvgEditor: svg-edit adapted to moin-1.9.0
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 17 Jan 2010 13:55:09 +0100
parents 992cfded6a60
children 525cab5cef17
files data/plugin/action/SvgEditor.py htdocs/svg-edit/CHANGES.current htdocs/svg-edit/editor/locale/locale.js htdocs/svg-edit/editor/svg-editor.css htdocs/svg-edit/editor/svg-editor.js
diffstat 5 files changed, 333 insertions(+), 192 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SvgEditor.py	Tue Jan 12 20:48:13 2010 +0100
+++ b/data/plugin/action/SvgEditor.py	Sun Jan 17 13:55:09 2010 +0100
@@ -1,13 +1,13 @@
-# -*- coding: iso-8859-2 -*-
+# -*- coding: utf-8 -*-
 """
     MoinMoin - SvgEditor
 
     This action is used to call svg-edit, (http://code.google.com/p/svg-edit/) 
     
-    svg-edit pre alpha is called 
+    svg-edit pre alpha 2.5 is called 
     this action needs moin-1.9 and is currently a mockup for an implementation in moin-2.0
 
-    @copyright: 2009 by MoinMoin:ReimarBauer
+    @copyright: 2009-2010 by MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
 from MoinMoin import config, wikiutil
@@ -83,7 +83,7 @@
             return _('You are not allowed to save a drawing on this page.')
 
         filecontent = request.values.get('svg_data', '')
-        target = request.values.get('target', 'example.svg')
+        target = request.values.get('target', 'example.svg').strip()
         if filecontent:
             AttachFile._addLogEntry(request, 'ATTDRW', pagename, target)
             # get directory, and possibly create it
@@ -109,20 +109,24 @@
              # svg data is saved as xml. at least firefox changes the data by adding closing tags e.g. </rect></circle></circle></circle></rect></svg>
              # this renders then only the first element
              filecontent = "<script>%s</script>" % filecontent
-        meta = """<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
+        meta = """
+<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
 <meta http-equiv="X-UA-Compatible" content="chrome=1"/>
 <link rel="icon" type="image/png" href="%(htdocs)s/images/logo.png">
 <link rel="stylesheet" href="%(htdocs)s/jgraduate/css/jPicker-1.0.9.css" type="text/css"/>
 <link rel="stylesheet" href="%(htdocs)s/jgraduate/css/jGraduate-0.2.0.css" type="text/css"/>
 <link rel="stylesheet" href="%(htdocs)s/svg-editor.css" type="text/css"/>
 <link rel="stylesheet" href="%(htdocs)s/spinbtn/JQuerySpinBtn.css" type="text/css"/>
+<!-- Development version of script tags: -->
 <script type="text/javascript" src="%(htdocs)s/jquery.js"></script>
- <script type="text/javascript" src="%(htdocs)s/js-hotkeys/jquery.hotkeys.min.js"></script>
+<script type="text/javascript" src="%(htdocs)s/js-hotkeys/jquery.hotkeys.min.js"></script>
 <script type="text/javascript" src="%(htdocs)s/jgraduate/jquery.jgraduate.js"></script>
+<script type="text/javascript" src="%(htdocs)s/svgicons/jquery.svgicons.js"></script>
 <script type="text/javascript" src="%(htdocs)s/spinbtn/JQuerySpinBtn.js"></script>
+<script type="text/javascript" src="%(htdocs)s/locale/locale.js"></script>
 <script type="text/javascript" src="%(htdocs)s/svgcanvas.js"></script>
 <script type="text/javascript" src="%(htdocs)s/svg-editor.js"></script>
-<script type="text/javascript" src="%(htdocs)s/locale/locale.js"></script>      
+
 <!-- Release version of script tags: >
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
 <script type="text/javascript" src="%(htdocs)s/js-hotkeys/jquery.hotkeys-0.7.9.js"></script>
@@ -130,30 +134,38 @@
 <script type="text/javascript" src="%(htdocs)s/spinbtn/JQuerySpinBtn.min.js"></script>
 <script type="text/javascript" src="%(htdocs)s/svgcanvas.min.js"></script>
 <script type="text/javascript" src="%(htdocs)s/svg-editor.min.js"></script>
-<script type="text/javascript" src="%(htdocs)s/locale/locale.min.js"></script-->
+script type="text/javascript" src="%(htdocs)s/locale/locale.min.js"></script-->
+
+
 <!-- always minified scripts -->
 <script type="text/javascript" src="%(htdocs)s/jquery-ui/jquery-ui-1.7.2.custom.min.js"></script>
 <script type="text/javascript" src="%(htdocs)s/jgraduate/jpicker-1.0.9.min.js"></script>
 
+<!-- feeds -->
+<link rel="alternate" type="application/atom+xml" title="SVG-edit General Discussion" href="http://groups.google.com/group/svg-edit/feed/atom_v1_0_msgs.xml" />
+<link rel="alternate" type="application/atom+xml" title="SVG-edit Updates (Issues/Fixes/Commits)" href="http://code.google.com/feeds/p/svg-edit/updates/basic" />
 """ % {"htdocs": htdocs}
-        
-        html = """<h2> %(editdrawing)s </h2>
+
+        html = """
+<!-- Add script with custom handlers here -->
+<body>
 <div id="htdocs"><!-- %(htdocs)s/ --></div>
 <div id="svg_editor">
 <div id="workarea">
-<style id="styleoverrides" type="text/css"></style>
+<style id="styleoverrides" type="text/css" media="screen" scoped="scoped"></style>
 <div id="svgcanvas"></div>
 <div id="svgdata">%(filecontent)s</div>
 </div>
+
 <div id="sidepanels">
     <div id="layerpanel">
-        <h3 id="layersLable">Layers</h3>
+        <h3 id="layersLabel">Layers</h3>
         <fieldset id="layerbuttons">
-            <img id="layer_new" class="layer_button" src="%(htdocs)s/images/clear.png" alt="New Layer" title="New Layer"/>
-            <img id="layer_delete" class="layer_button" src="%(htdocs)s/images/delete.png" alt="Delete Layer" title="Delete Layer"/>
-            <img id="layer_rename" class="layer_button" src="%(htdocs)s/images/view-refresh.png" alt="Rename Layer" title="Rename Layer"/>
-            <img id="layer_up" class="layer_button" src="%(htdocs)s/images/go-up.png" alt="Move Layer up" title="Move Layer Up"/>
-            <img id="layer_down" class="layer_button" src="%(htdocs)s/images/go-down.png" alt="Move Layer Down" title="Move Layer Down"/>
+            <div id="layer_new" class="layer_button"  title="New Layer"></div>
+            <div id="layer_delete" class="layer_button"  title="Delete Layer"></div>
+            <div id="layer_rename" class="layer_button"  title="Rename Layer"></div>
+            <div id="layer_up" class="layer_button"  title="Move Layer Up"></div>
+            <div id="layer_down" class="layer_button"  title="Move Layer Down"></div>
         </fieldset>
         
         <table id="layerlist">
@@ -168,69 +180,82 @@
         </select>
     </div>
     <div id="sidepanel_handle" onselectstart="return false;" title="Drag left/right to resize side panel [X]">L a y e r s</div>
-</div>
-
+</div> 
 <div id="logo">
     <a href="http://svg-edit.googlecode.com/" target="_blank" title="SVG-edit Home Page">
-        <img src="images/logo.png" alt="logo" />
     </a>
 </div>
-
 <div id="tools_top" class="tools_panel">
     
     <!-- File-like buttons: New, Save, Source -->
     <div id="file_panel">
-        <img class="push_button" id="tool_clear" src="%(htdocs)s/images/clear.png" title="New Image [N]" alt="Clear" />
-        <img style="display:none" class="push_button" id="tool_open" src="%(htdocs)s/images/open.png" title="Open Image [O]" alt="Open"/>
-        <img class="push_button" id="tool_save" src="%(htdocs)s/images/save.png" title="Save Image [S]" alt="Save"/>
-        <img class="push_button" id="tool_docprops" src="%(htdocs)s/images/document-properties.png" title="Document Properties [I]"/>
-        <img class="push_button" id="tool_source" src="%(htdocs)s/images/source.png" title="Edit Source [U]" alt="Source"/>
-        <img class="tool_button" id="tool_wireframe" src="%(htdocs)s/images/wireframe.png" title="Wireframe Mode [F]" alt="Wireframe"/>
+        <div class="push_button" id="tool_clear" title="New Image [N]"></div>
+        
+        <div id="fileinputs" class="push_button">
+            <div id="tool_open" title="Open Image [O]" ></div>
+        </div>
+      
+        <div class="push_button" id="tool_save" title="Save Image [S]"></div>
+        <div class="push_button" id="tool_docprops" title="Document Properties [I]"></div>
+        <div class="push_button" id="tool_source" title="Edit Source [U]"></div>
+        <div class="tool_button" id="tool_wireframe" title="Wireframe Mode [F]"></div>
     </div>
 
     <!-- History buttons -->
     <div id="history_panel">
         <div class="tool_sep"></div>
-        <img class="push_button tool_button_disabled" id="tool_undo" src="%(htdocs)s/images/undo.png" title="Undo [Z]"/>
-        <img class="push_button tool_button_disabled" id="tool_redo" src="%(htdocs)s/images/redo.png" title="Redo [Y]"/>
+        <div class="push_button tool_button_disabled" id="tool_undo" title="Undo [Z]"></div>
+        <div class="push_button tool_button_disabled" id="tool_redo" title="Redo [Y]"></div>
     </div>
     
     <!-- Buttons when a single element is selected -->
     <div id="selected_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <img class="push_button" id="tool_clone" src="%(htdocs)s/images/clone.png" title="Clone Element [C]" alt="Copy"/>
-        <img class="push_button" id="tool_delete" src="%(htdocs)s/images/delete.png" title="Delete Element [Delete/Backspace]" alt="Delete"/>
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <img class="push_button" id="tool_move_top" src="%(htdocs)s/images/move_top.png" title="Move to Top [Shift+Up]" alt="Top"/>
-        <img class="push_button" id="tool_move_bottom" src="%(htdocs)s/images/move_bottom.png" title="Move to Bottom [Shift+Down]" alt="Bottom"/>
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-
-        <label id="group_opacityLabel" class="selected_tool" for="group_opacity">opac:</label>
-        <input id="group_opacity" class="selected_tool" title="Change selected item opacity" size="3" value="100" type="text"/>
-        <div id="opacity_dropdown" class="dropdown">
-            <button></button>
-            <ul>
-                <li class="special"><div id="opac_slider"></div></li>
-                <li>100%% (no transparency)</li>
-                <li>0%%</li>
-                <li>25%%</li>
-                <li>50%%</li>
-                <li>75%%</li>
-                <li>100%%</li>
-            </ul>
+        <div class="toolset">
+            <div class="tool_sep"></div>
+            <div class="push_button" id="tool_clone" title="Clone Element [C]"></div>
+            <div class="push_button" id="tool_delete" title="Delete Element [Delete/Backspace]"></div>
+            <div class="tool_sep"></div>
+            <div class="push_button" id="tool_move_top" title="Move to Top [Shift+Up]"></div>
+            <div class="push_button" id="tool_move_bottom" title="Move to Bottom [Shift+Down]"></div>
+            <div class="push_button" id="tool_topath" title="Convert to Path"></div>
+            <div class="push_button" id="tool_reorient" title="Reorient path"></div>
+            <div class="tool_sep"></div>
         </div>
-
-        <label id="angleLabel" class="selected_tool">angle:</label>
-        <input id="angle" class="selected_tool" title="Change rotation angle" size="2" value="0" type="text"/>
+        <div class="toolset">
+            <label id="group_opacityLabel" class="selected_tool" for="group_opacity">opac:</label>
+            <input id="group_opacity" class="selected_tool" title="Change selected item opacity" size="3" value="100" type="text"/>
+            <div id="opacity_dropdown" class="dropdown">
+                <button></button>
+                <ul>
+                    <li class="special"><div id="opac_slider"></div></li>
+                    <li>100%% (no transparency)</li>
+                    <li>0%%</li>
+                    <li>25%%</li>
+                    <li>50%%</li>
+                    <li>75%%</li>
+                    <li>100%%</li>
+                </ul>
+            </div>
+        </div>
+        <div class="toolset">
+            <label id="angleLabel" class="selected_tool">angle:</label>
+            <input id="angle" class="selected_tool" title="Change rotation angle" size="2" value="0" type="text"/>
+        </div>
+        <div id="xy_panel" class="toolset">
+            <label class="selected_tool">x:</label>
+            <input id="selected_x" class="selected_tool attr_changer" title="Change X coordinate" size="3" data-attr="x"/>
+            <label class="selected_tool">y:</label>
+            <input id="selected_y" class="selected_tool attr_changer" title="Change Y coordinate" size="3" data-attr="y"/>
+        </div>
     </div>
 
     <!-- Buttons when multiple elements are selected -->
     <div id="multiselected_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <img class="push_button" id="tool_clone_multi" src="%(htdocs)s/images/clone.png" title="Clone Elements [C]" alt="Clone"/>
-        <img class="push_button" id="tool_delete_multi" src="%(htdocs)s/images/delete.png" title="Delete Selected Elements [Delete/Backspace]" alt="Delete"/>
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <img class="push_button" id="tool_group" src="%(htdocs)s/images/shape_group.png" title="Group Elements [G]" alt="Group"/>
+        <div class="tool_sep"></div>
+        <div class="push_button" id="tool_clone_multi" title="Clone Elements [C]"></div>
+        <div class="push_button" id="tool_delete_multi" title="Delete Selected Elements [Delete/Backspace]"></div>
+        <div class="tool_sep"></div>
+        <div class="push_button" id="tool_group" title="Group Elements [G]"></div>
         <div class="push_button" id="tool_alignleft" title="Align Left"></div>
         <div class="push_button" id="tool_aligncenter" title="Align Center"></div>
         <div class="push_button" id="tool_alignright" title="Align Right"></div>
@@ -244,99 +269,117 @@
         <option id="smallest_object" value="smallest">smallest object</option>
         <option id="page" value="page">page</option>
         </select>
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
+        <div class="tool_sep"></div>
 
     </div>
 
     <div id="g_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <img class="push_button" id="tool_ungroup" src="%(htdocs)s/images/shape_ungroup.png" title="Ungroup Elements [G]" alt="Ungroup"/>
+        <div class="tool_sep"></div>
+        <div class="push_button" id="tool_ungroup" title="Ungroup Elements [G]"></div>
     </div>
 
     <div id="rect_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <label class="rect_tool">x:</label>
-        <input id="rect_x" class="rect_tool attr_changer" title="Change rectangle X coordinate" size="3" data-attr="x"/>
-        <label class="rect_tool">y:</label>
-        <input id="rect_y" class="rect_tool attr_changer" title="Change rectangle Y coordinate" size="3" data-attr="y"/>
-        <label id="rwidthLabel" class="rect_tool">width:</label>
-        <input id="rect_width" class="rect_tool attr_changer" title="Change rectangle width" size="3" data-attr="width"/>
-        <label id="rheightLabel" class="rect_tool">height:</label>
-        <input id="rect_height" class="rect_tool attr_changer" title="Change rectangle height" size="3" data-attr="height"/>
-        <label id="cornerRadiusLabel" class="rect_tool">Corner Radius:</label>
-        <input id="rect_rx" size="3" value="0" class="rect_tool" type="text" title="Change Rectangle Corner Radius" data-attr="Corner Radius"/>
+        <div class="toolset">
+            <label id="rwidthLabel" class="rect_tool">width:</label>
+            <input id="rect_width" class="rect_tool attr_changer" title="Change rectangle width" size="3" data-attr="width"/>
+            <label id="rheightLabel" class="rect_tool">height:</label>
+            <input id="rect_height" class="rect_tool attr_changer" title="Change rectangle height" size="3" data-attr="height"/>
+        </div>
+        <div class="toolset">
+            <label id="cornerRadiusLabel" class="rect_tool">Corner Radius:</label>
+            <input id="rect_rx" size="3" value="0" class="rect_tool" type="text" title="Change Rectangle Corner Radius" data-attr="Corner Radius"/>
+        </div>    
     </div>
 
     <div id="image_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <label class="image_tool">x:</label>
-        <input id="image_x" class="image_tool attr_changer" title="Change image X coordinate" size="3" data-attr="x"/>
-        <label class="image_tool">y:</label>
-        <input id="image_y" class="image_tool attr_changer" title="Change image Y coordinate" size="3" data-attr="y"/>
+    <div class="toolset">
         <label id="iwidthLabel" class="image_tool">width:</label>
         <input id="image_width" class="image_tool attr_changer" title="Change image width" size="3" data-attr="width"/>
         <label id="iheightLabel" class="image_tool">height:</label>
         <input id="image_height" class="image_tool attr_changer" title="Change image height" size="3" data-attr="height"/>
-    <label class="image_tool">url:</label>
-    <input id="image_url" class="image_tool" type="text" title="Change URL" size="35"/>
+    </div>
+    <div class="toolset">
+        <label class="image_tool">url:</label>
+        <input id="image_url" class="image_tool" type="text" title="Change URL" size="35"/>
+        <button id="change_image_url" style="display:none;">Change Image</button>
+        <div id="url_notice" title="NOTE: This image cannot be embedded. It will depend on this path to be displayed"></div>
+    </div>
   </div>
 
     <div id="circle_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <label class="circle_tool">cx:</label>
-        <input id="circle_cx" class="circle_tool attr_changer" title="Change circle's cx coordinate" size="3" data-attr="cx"/>
-        <label class="circle_tool">cy:</label>
-        <input id="circle_cy" class="circle_tool attr_changer" title="Change circle's cy coordinate" size="3" data-attr="cy"/>
-        <label class="circle_tool">r:</label>
-        <input id="circle_r" class="circle_tool attr_changer" title="Change circle's radius" size="3" data-attr="r"/>
+        <div class="toolset">
+            <label class="circle_tool">cx:</label>
+            <input id="circle_cx" class="circle_tool attr_changer" title="Change circle's cx coordinate" size="3" data-attr="cx"/>
+            <label class="circle_tool">cy:</label>
+            <input id="circle_cy" class="circle_tool attr_changer" title="Change circle's cy coordinate" size="3" data-attr="cy"/>
+        </div>
+        <div class="toolset">
+            <label class="circle_tool">r:</label>
+            <input id="circle_r" class="circle_tool attr_changer" title="Change circle's radius" size="3" data-attr="r"/>
+        </div>
     </div>
 
     <div id="ellipse_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <label class="ellipse_tool">cx:</label>
-        <input id="ellipse_cx" class="ellipse_tool attr_changer" title="Change ellipse's cx coordinate" size="3" data-attr="cx"/>
-        <label class="ellipse_tool">cy:</label>
-        <input id="ellipse_cy" class="ellipse_tool attr_changer" title="Change ellipse's cy coordinate" size="3" data-attr="cy"/>
-        <label class="ellipse_tool">rx:</label>
-        <input id="ellipse_rx" class="ellipse_tool attr_changer" title="Change ellipse's x radius" size="3" data-attr="rx"/>
-        <label class="ellipse_tool">ry:</label>
-        <input id="ellipse_ry" class="ellipse_tool attr_changer" title="Change ellipse's y radius" size="3" data-attr="ry"/>
+        <div class="toolset">
+            <label class="ellipse_tool">cx:</label>
+            <input id="ellipse_cx" class="ellipse_tool attr_changer" title="Change ellipse's cx coordinate" size="3" data-attr="cx"/>
+            <label class="ellipse_tool">cy:</label>
+            <input id="ellipse_cy" class="ellipse_tool attr_changer" title="Change ellipse's cy coordinate" size="3" data-attr="cy"/>
+            </div>
+        <div class="toolset">
+            <label class="ellipse_tool">rx:</label>
+            <input id="ellipse_rx" class="ellipse_tool attr_changer" title="Change ellipse's x radius" size="3" data-attr="rx"/>
+            <label class="ellipse_tool">ry:</label>
+            <input id="ellipse_ry" class="ellipse_tool attr_changer" title="Change ellipse's y radius" size="3" data-attr="ry"/>
+        </div>
     </div>
 
     <div id="line_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <label class="line_tool">x1:</label>
-        <input id="line_x1" class="line_tool attr_changer" title="Change line's starting x coordinate" size="3" data-attr="x1"/>
-        <label class="line_tool">y1:</label>
-        <input id="line_y1" class="line_tool attr_changer" title="Change line's starting y coordinate" size="3" data-attr="y1"/>
-        <label class="line_tool">x2:</label>
-        <input id="line_x2" class="line_tool attr_changer" title="Change line's ending x coordinate" size="3" data-attr="x2"/>
-        <label class="line_tool">y2:</label>
-        <input id="line_y2" class="line_tool attr_changer" title="Change line's ending y coordinate" size="3" data-attr="y2"/>
+        <div class="toolset">
+            <label class="line_tool">x1:</label>
+            <input id="line_x1" class="line_tool attr_changer" title="Change line's starting x coordinate" size="3" data-attr="x1"/>
+            <label class="line_tool">y1:</label>
+            <input id="line_y1" class="line_tool attr_changer" title="Change line's starting y coordinate" size="3" data-attr="y1"/>
+        </div>
+        <div class="toolset">
+            <label class="line_tool">x2:</label>
+            <input id="line_x2" class="line_tool attr_changer" title="Change line's ending x coordinate" size="3" data-attr="x2"/>
+            <label class="line_tool">y2:</label>
+            <input id="line_y2" class="line_tool attr_changer" title="Change line's ending y coordinate" size="3" data-attr="y2"/>
+        </div>
     </div>
 
     <div id="text_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-        <label class="text_tool">x:</label>
-        <input id="text_x" class="text_tool attr_changer" title="Change text X coordinate" size="3" data-attr="x"/>
-        <label class="text_tool">y:</label>
-        <input id="text_y" class="text_tool attr_changer" title="Change text Y coordinate" size="3" data-attr="y"/>
-        <img class="tool_button" id="tool_bold" src="%(htdocs)s/images/bold.png" title="Bold Text [B]" alt="Bold"/>
-        <img class="tool_button" id="tool_italic" src="%(htdocs)s/images/italic.png" title="Italic Text [I]" alt="Italic"/>
-        <select id="font_family" class="text_tool" title="Change Font Family">
-            <option selected="selected" value="serif">serif</option>
-            <option value="sans-serif">sans-serif</option>
-            <option value="cursive">cursive</option>
-            <option value="fantasy">fantasy</option>
-            <option value="monospace">monospace</option>
-        </select>
-        <label id="font_sizeLabel" class="text_tool" for="font_size">size:</label>
-        <input id="font_size" class="text_tool" title="Change Font Size" size="3" value="0" type="text"/>
+        <div class="toolset">
+            <div class="tool_button" id="tool_bold" title="Bold Text [B]"><span></span>B</div>
+            <div class="tool_button" id="tool_italic" title="Italic Text [I]"><span></span>i</div>
+        </div>
+        
+        <div class="toolset">
+            <input id="font_family" class="text_tool" type="text" title="Change Font Family" size="12"/>
+            <div id="font_family_dropdown" class="dropdown">
+                <button></button>
+                <ul>
+                    <li style="font-family:serif">Serif</li>
+                    <li style="font-family:sans-serif">Sans-serif</li>
+                    <li style="font-family:cursive">Cursive</li>
+                    <li style="font-family:fantasy">Fantasy</li>
+                    <li style="font-family:monospace">Monospace</li>
+                </ul>
+            </div>
+        </div>
+
+        <div class="toolset">
+            <label id="font_sizeLabel" class="text_tool" for="font_size">size:</label>
+            <input id="font_size" class="text_tool" title="Change Font Size" size="3" value="0" type="text"/>
+        </div>
         <input id="text" class="text_tool" type="text" title="Change text contents" size="35"/>
     </div>
     
     <div id="path_node_panel">
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
+        <div class="tool_sep"></div>
+        <div class="tool_button" id="tool_node_link" title="Link Control Points"></div>
+        <div class="tool_sep"></div>
         <label class="path_node_tool">x:</label>
         <input id="path_node_x" class="path_node_tool attr_changer" title="Change node's x coordinate" size="3" data-attr="x"/>
         <label class="path_node_tool">y:</label>
@@ -345,63 +388,63 @@
             <option id="straight_segments" selected="selected" value="4">Straight</option>
             <option id="curve_segments" value="6">Curve</option>
         </select>
-        <img class="tool_button" id="tool_node_clone" src="%(htdocs)s/images/clone.png" title="Clone Node" alt="Clone"/>
-        <img class="tool_button" id="tool_node_delete" src="%(htdocs)s/images/delete.png" title="Delete Node" alt="Delete"/>
+        <div class="tool_button" id="tool_node_clone" title="Clone Node"></div>
+        <div class="tool_button" id="tool_node_delete" title="Delete Node"></div>
     </div>
     
 </div> <!-- tools_top -->
 
 <div id="tools_left" class="tools_panel">
-    <img class="tool_button_current" id="tool_select" src="%(htdocs)s/images/select.png" title="Select Tool [1]" alt="Select"/><br/>
-    <img class="tool_button" id="tool_fhpath" src="%(htdocs)s/images/fhpath.png" title="Pencil Tool [2]" alt="Pencil"/><br/>
-    <img class="tool_button" id="tool_line" src="%(htdocs)s/images/line.png" title="Line Tool [3]" alt="Line"/><br/>
-    <img class="tool_button" id="tools_rect_show" src="%(htdocs)s/images/square.png" title="Square/Rect Tool [4/Shift+4]" alt="Square"/>
-    <img class="flyout_arrow_horiz" src="%(htdocs)s/images/flyouth.png"/>
-    <img class="tool_button" id="tools_ellipse_show" src="%(htdocs)s/images/circle.png" title="Ellipse/Circle Tool [5/Shift+5]" alt="Circle"/><br/>
-    <img class="flyout_arrow_horiz" src="%(htdocs)s/images/flyouth.png"/>
-    <img class="tool_button" id="tool_path" src="%(htdocs)s/images/path.png" title="Path Tool [6]" alt="Path"/>
-    <img class="tool_button" id="tool_text" src="%(htdocs)s/images/text.png" title="Text Tool [7]" alt="Text"/>
-    <img class="tool_button" id="tool_image" src="%(htdocs)s/images/image.png" title="Image Tool [8]" alt="Image"/>
-    <img class="tool_button" id="tool_zoom" src="%(htdocs)s/images/zoom.png" title="Zoom Tool [Ctrl+Up/Down]" alt="Zoom"/>
+    <div class="tool_button_current" id="tool_select" title="Select Tool [1]"></div>
+    <div class="tool_button" id="tool_fhpath" title="Pencil Tool [2]"></div>
+    <div class="tool_button" id="tool_line" title="Line Tool [3]"></div>
+    <div class="tool_button" id="tools_rect_show" title="Square/Rect Tool [4/Shift+4]"></div>
+    <div class="flyout_arrow_horiz"></div>
+    <div class="tool_button" id="tools_ellipse_show" title="Ellipse/Circle Tool [5/Shift+5]"></div>
+    <div class="flyout_arrow_horiz"></div>
+    <div class="tool_button" id="tool_path" title="Path Tool [7]"></div>
+    <div class="tool_button" id="tool_text" title="Text Tool [6]"></div>
+    <div class="tool_button" id="tool_image" title="Image Tool [8]"></div>
+    <div class="tool_button" id="tool_zoom" title="Zoom Tool [Ctrl+Up/Down]"></div>
 </div> <!-- tools_left -->
 
 <div id="tools_bottom" class="tools_panel">
 
     <!-- Zoom buttons -->
     <div id="zoom_panel" class="magic_field">
-        <span id="zoomLabel" class="zoom_tool">zoom:</span>
+        <span id="zoomLabel" class="zoom_tool label">zoom:</span>
         <input id="zoom" class="zoom_tool" title="Change zoom level" size="3" value="100" type="text" />
         <div id="zoom_dropdown" class="dropdown">
             <button></button>
             <ul>
+                <li>1000%%</li>
+                <li>400%%</li>
+                <li>200%%</li>
                 <li>100%%</li>
-                <li id="fit_to_all" data-val="content">Fit to all content</li>
-                <li id="fit_to_layer_content" data-val="layer">Fit to layer content</li>
-                <li id="fit_to_sel" data-val="selection">Fit to selection</li>
+                <li>50%%</li>
+                <li>25%%</li>
                 <li id="fit_to_canvas" data-val="canvas">Fit to canvas</li>
-                <li>25%%</li>
-                <li>50%%</li>
+                <li id="fit_to_sel" data-val="selection">Fit to selection</li>
+                <li id="fit_to_layer_content" data-val="layer">Fit to layer content</li>
+                <li id="fit_to_all" data-val="content">Fit to all content</li>
                 <li>100%%</li>
-                <li>200%%</li>
-                <li>400%%</li>
-                <li>1000%%</li>
             </ul>
         </div>
-        <img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
+        <div class="tool_sep"></div>
     </div>
 
     <div id="tools_bottom_2">
         <table>
         <tr>
-            <td id="fill_tool_bottom">fill:</td>
-            <td><div id="fill_color" class="color_block"  title="Change fill color"></div></td>
-            <td colspan="3"><div id="fill_opacity">100%%</div></td>
+            <td id="fill_tool_bottom" class="label">fill:</td>
+            <td><div id="fill_bg"></div><div id="fill_color" class="color_block"  title="Change fill color"></div></td>
+            <td colspan="3"><div id="fill_opacity" class="label">100%%</div></td>
         </tr><tr>
-            <td id="stroke_tool_bottom">stroke:</td>
-            <td><div id="stroke_color" class="color_block" title="Change stroke color"></div></td>
-            <td><div id="stroke_opacity">100 %%</div></td>
+            <td id="stroke_tool_bottom" class="label">stroke:</td>
+            <td><div id="stroke_bg"></div><div id="stroke_color" class="color_block" title="Change stroke color"></div></td>
+            <td><div id="stroke_opacity" class="label">100 %%</div></td>
             <td>
-                <input id="stroke_width" title="Change stroke width" size="2" value="5" type="text" data-attr="Stroke Width"/>
+                <input id="stroke_width" title="Change stroke width by 1, shift-click to change by 0.1" size="2" value="5" type="text" data-attr="Stroke Width"/>
             </td>
             <td>
                 <select id="stroke_style" title="Change stroke dash style">
@@ -419,21 +462,21 @@
     <div id="tools_bottom_3">
         <div id="palette_holder"><div id="palette" title="Click to change fill color, shift-click to change stroke color"></div></div>
     </div>
-    <div id="copyright">Powered by <a href="http://svg-edit.googlecode.com/" target="_blank">SVG-edit v2.4-alpha</a></div>
+    <div id="copyright">Powered by <a href="http://svg-edit.googlecode.com/" target="_blank">SVG-edit v2.5-preAlpha</a></div>
 </div>
 
 <!-- hidden divs -->
 <div id="color_picker"></div>
 
 <div id="tools_rect" class="tools_flyout">
+    <div id="tool_rect" class="tool_flyout_button" title="Rectangle"></div>
     <div id="tool_square" class="tool_flyout_button" title="Square"></div>
-    <div id="tool_rect" class="tool_flyout_button" title="Rectangle"></div>
     <div id="tool_fhrect" class="tool_flyout_button" title="Free-Hand Rectangle"></div>
 </div>
 
 <div id="tools_ellipse" class="tools_flyout">
+    <div id="tool_ellipse" class="tool_flyout_button" title="Ellipse"></div>
     <div id="tool_circle" class="tool_flyout_button" title="Circle"></div>
-    <div id="tool_ellipse" class="tool_flyout_button" title="Ellipse"></div>
     <div id="tool_fhellipse" class="tool_flyout_button" title="Free-Hand Ellipse"></div>
 </div>
 
@@ -458,23 +501,23 @@
         <div id="tool_docprops_back" class="toolbar_button">
             <button id="tool_docprops_save">OK</button>
             <button id="tool_docprops_cancel">Cancel</button>
-
-            <label><span id="svginfo_title">Image title:</span> <input type="text" id="canvas_title" size="24"></label>
+        </div>
 
 
-            <fieldset id="change_background">
-                <legend id="svginfo_change_background">Editor Background</legend>
-                <div id="bg_blocks"></div>
-                <label><span id="svginfo_bg_url">URL:</span> <input type="text" id="canvas_bg_url" size="17"></label>
-            </fieldset>
-            
+        <fieldset id="svg_docprops_docprops">
+            <legend id="svginfo_image_props">Image Properties</legend>
+            <label>
+                <span id="svginfo_title">Title:</span>
+                <input type="text" id="canvas_title" size="24">
+            </label>            
+    
             <fieldset id="change_resolution">
                 <legend id="svginfo_dim">Canvas Dimensions</legend>
 
                 <label><span id="svginfo_width">Width:</span> <input type="text" id="canvas_width" size="6"></label>
                     
                 <label><span id="svginfo_height">Height:</span> <input type="text" id="canvas_height" size="6"></label>
-                    
+                
                 <label>
                     <select id="resolution">
                         <option id="selectedPredefined" selected="selected">Select predefined:</option>
@@ -486,18 +529,69 @@
                         <option id="fitToContent" value="content">Fit to Content</option>
                     </select>
                 </label>
-                
             </fieldset>
-        </div>
+
+            <fieldset id="image_save_opts">
+                <legend id="includedImages">Included Images</legend>
+                <label><input type="radio" name="image_opt" value="embed" checked="checked"/> <span id="image_opt_embed">Embed data (local files)</span> </label>
+                <label><input type="radio" name="image_opt" value="ref"/> <span id="image_opt_ref">Use file reference</span> </label>
+            </fieldset>            
+
+
+        </fieldset>
+
+        <fieldset id="svg_docprops_prefs">
+            <legend id="svginfo_editor_prefs">Editor Preferences</legend>
+
+            <label><span id="svginfo_lang">Language:</span>
+                <!-- Source: http://en.wikipedia.org/wiki/Language_names -->
+                <select id="lang_select">
+                    <option id="lang_cs" value="cs">Čeština</option>
+                    <option id="lang_de" value="de">Deutsch</option>
+                    <option id="lang_en" value="en" selected="selected">English</option>
+                    <option id="lang_es" value="es">Español</option>
+                    <option id="lang_fa" value="fa">فارسی</option>
+                    <option id="lang_fr" value="fr">Français</option>
+                    <option id="lang_nl" value="nl">Nederlands</option>
+                    <option id="lang_ro" value="ro">Româneşte</option>
+                    <option id="lang_sk" value="sk">Slovenčina</option>
+                </select>
+            </label>
+
+            <label><span id="svginfo_icons">Icon size:</span>
+                <select id="iconsize">
+                    <option id="icon_small" value="s">Small</option>
+                    <option id="icon_medium" value="m" selected="selected">Medium</option>
+                    <option id="icon_large" value="l">Large</option>
+                    <option id="icon_xlarge" value="xl">Extra Large</option>
+                </select>
+            </label>
+
+            <fieldset id="change_background">
+                <legend id="svginfo_change_background">Editor Background</legend>
+                <div id="bg_blocks"></div>
+                <label><span id="svginfo_bg_url">URL:</span> <input type="text" id="canvas_bg_url" size="21"></label>
+                <p id="svginfo_bg_note">Note: Background will not be saved with image.</p>
+            </fieldset>
+            
+        </fieldset>
+
     </div>
 </div>
 
+<div id="dialog_box">
+    <div id="dialog_box_overlay"></div>
+    <div id="dialog_container">
+        <div id="dialog_content">
+            Test message
+        </div>
+        <div id="dialog_buttons"></div>
+    </div>
+</div>       
 """ % {"htdocs": htdocs,
        "filecontent": filecontent,
-       "editdrawing": _("Edit drawing"),
        }
-
-        title = "%s:%s" % (pagename, target)
+        title = '%s %s:%s' % (_('Edit drawing'), pagename, target)
         request.theme.send_title(title, page=request.page, pagename=pagename)
         request.write(request.formatter.startContent("content"))
         request.write(request.formatter.rawHTML(meta))
--- a/htdocs/svg-edit/CHANGES.current	Tue Jan 12 20:48:13 2010 +0100
+++ b/htdocs/svg-edit/CHANGES.current	Sun Jan 17 13:55:09 2010 +0100
@@ -5,13 +5,19 @@
    This action can currenly save to the page where it is called
  * target parameter addded
    by adding the target name a file could be saved to this name
-   e.g. http://localhost:8080/Test?action=SVG-editor&target=example.svg
-   or <<Action(SVG-editor,target=test.svg)>>{{attachment:test.svg}}
+   e.g. http://localhost:8080/Test?action=SvgEditor&target=example.svg
+   or <<Action(SvgEditor,target=test.svg)>>{{attachment:test.svg}}
    and go to the page after saving
 
 ToDo
+ * url_prefix paramter needs to be used in some more js functions 
+   of locale.js and svg-edit.js instead of hardcoding it.
+   (search for '/moin_static190/svg-edit/editor')
+ * after changing locale in svg-edit properties a mysterious word 
+   translated from "page" appears on the upper and bottom left corner.
+ * missing different cursor mode dependent from toolset, e.g. rotate
  * Link Syntax for attachments
 
-SVG-edit is a lightweight, web-based, Javascript-driven SVG editor that works in any modern browser: version of svg-edit Revision r891 (http://code.google.com/p/svg-edit/) for moin-1.9
+SVG-edit is a lightweight, web-based, Javascript-driven SVG editor that works in any modern browser: version of svg-edit Revision r1200, 2.5alpha (http://code.google.com/p/svg-edit/) for moin-1.9
 
 htdocs/svg-edit must be linked into MoinMoin/web/static/htdocs
--- a/htdocs/svg-edit/editor/locale/locale.js	Tue Jan 12 20:48:13 2010 +0100
+++ b/htdocs/svg-edit/editor/locale/locale.js	Sun Jan 17 13:55:09 2010 +0100
@@ -33,10 +33,10 @@
 		if(lang_param.indexOf("en") == 0) return;
 	}
 	
-	var url = "locale/lang." + lang_param + ".js";
+	var url = "/moin_static190/svg-edit/editor/locale/lang." + lang_param + ".js";
 	
 	var processFile = function(data){
-		var LangData = eval(data), js_strings;
+		var LangData = eval(data);
 		$.each(LangData, function(i, data) {
 			if(data.id) {
 				var elem = $('#'+data.id)[0];
--- a/htdocs/svg-edit/editor/svg-editor.css	Tue Jan 12 20:48:13 2010 +0100
+++ b/htdocs/svg-edit/editor/svg-editor.css	Sun Jan 17 13:55:09 2010 +0100
@@ -3,6 +3,8 @@
 }
 
 #svg_editor {
+	width: 660px;
+	height: 640px;
 	font-size: 8pt;
 	font-family: Verdana, Helvetica, Arial;
 	color: #000000;
@@ -39,8 +41,10 @@
 }
 
 #svg_editor div#palette_holder {
+	position: relative;
 	overflow-x: scroll;
 	overflow-y: hidden;
+	left: 20px;
 	height: 31px;
 	border: 1px solid #808080;
 	border-top: none;
@@ -71,11 +75,11 @@
 
 #svg_editor div#workarea {
 	display: inline-block;
-	position:absolute;
-	top: 75px;
+	position: absolute;
+	top: 210px;
 	left: 40px;
 	bottom: 60px;
-	right: 14px;
+	right: 30px;
 	background-color: #A0A0A0;
 	border: 1px solid #808080;
 	overflow: auto;
@@ -84,7 +88,7 @@
 #svg_editor #sidepanels {
 	display: inline-block;
 	position:absolute;
-	top: 75px;
+	top: 65px;
 	bottom: 60px;
 	right: 0px;
 	width: 2px;
@@ -97,9 +101,9 @@
 
 #svg_editor #layerpanel {
 	display: inline-block;
-	background-color: #E8E8E8;
+	background-coolr: #E8E8E8;
 	position:absolute;
-	top: 1px;
+	top: 135px;
 	bottom: 0px;
 	right: 0px;
 	width: 0px;
@@ -117,7 +121,7 @@
 	position: absolute;
 	background-color: #E8E8E8;
 	left: 0px;
-	top: 40%;
+	top: 145px;
 	width: 1em;
 	padding: 5px 1px 5px 5px;
 	margin-left: 3px;
@@ -233,20 +237,22 @@
 }
 
 #svg_editor #logo {
-	position: absolute;
+	display: none;
+	position: r;
 	top: 4px;
 	left: 4px;
 	padding: 0px;
 }
 
 #svg_editor #logo a img {
-	border: 0;
+	display: none;
+	border: 5;
 	width: 32px;
 	height: 32px;
 }
 
 #svg_editor #tools_top {
-	position: absolute;
+	position: relative;
 	left: 38px;
 	right: 2px;
 	top: 2px;
@@ -261,7 +267,7 @@
 	position: absolute;
 	border-right: none;
 	width: 36px;
-	top: 75px;
+	top: 210px;
 	left: 2px;
 }
 
@@ -431,6 +437,7 @@
 #svg_editor .push_button,
 #svg_editor .tool_button_current, 
 #svg_editor .tool_button_disabled {
+	position: relative;
 	height: 24px;
 	width: 24px;
 	margin: 2px;
@@ -506,6 +513,7 @@
 }
 
 #svg_editor .tool_sep {
+	position: relative;
 	width: 1px;
 	background: #888;
 	border-left: 1px outset #EEE;
@@ -564,6 +572,7 @@
 /* TODO: figure out what more-specific selector causes me to write this atrocity and not
          simply .tool_flyout_button */
 #svg_editor #tools_rect .tool_flyout_button, #svg_editor #tools_ellipse .tool_flyout_button {
+	position: relative;
 	float: left;
 	background-color: #E8E8E8;
 	border-left: 1px solid #FFFFFF;
@@ -580,6 +589,7 @@
 }
 
 #svg_editor #tools_rect .tool_flyout_button_current, #svg_editor #tools_ellipse .tool_flyout_button_current {
+	position: relative;
 	border-left: 1px solid #808080;
 	border-top: 1px solid #808080;
 	border-right: 1px solid #FFFFFF;
@@ -596,6 +606,7 @@
 }
 
 #svg_editor #tools_bottom_1 {
+	display: none;
 	width: 115px;
 	float: left;
 }
@@ -606,6 +617,10 @@
 }
 
 #svg_editor #tools_bottom_3 {
+	top: 80px;
+	left: 40px;
+	right: 2px;
+	bottom: 2px;
 }
 
 #svg_editor #copyright {
@@ -671,7 +686,7 @@
 #svg_docprops_container #svg_docprops_docprops, 
 #svg_docprops_container #svg_docprops_prefs {
 	float: left;
-	width: 221px;
+	width: 400px;
 	margin: 5px .7em; 
 	overflow: hidden;
 }
--- a/htdocs/svg-edit/editor/svg-editor.js	Tue Jan 12 20:48:13 2010 +0100
+++ b/htdocs/svg-edit/editor/svg-editor.js	Sun Jan 17 13:55:09 2010 +0100
@@ -37,9 +37,23 @@
 
 	var isMac = false; //(navigator.platform.indexOf("Mac") != -1);
 	var modKey = ""; //(isMac ? "meta+" : "ctrl+");
+	var htdocs = document.getElementById("htdocs").innerHTML.replace('<!-- ', '').replace(' -->', '');
 	var svgCanvas = new SvgCanvas(document.getElementById("svgcanvas"));
+	// because moin uses currently HTML 4.0.1 we send the data as a comment in the HTML code
+	var svgdata = document.getElementById("svgdata").innerHTML;
+	var filecontent = svgdata.slice(8, svgdata.length - 9);
+	if (filecontent != '') {
+	    if (!svgCanvas.setSvgString(filecontent)) {
+	        if(!confirm('There were parsing errors in your SVG source.\nRevert back to original SVG source?') ) {
+	           return false;
+	        }
+	    }
+	    svgCanvas.clearSelection();
+	}
+
+
 	var path = svgCanvas.pathActions;
-	var default_img_url = "images/logo.png";
+	var default_img_url = htdocs + "images/logo.png";
 
 	// Store and retrieve preferences
 	$.pref = function(key, val) {
@@ -157,7 +171,18 @@
 	// with a gradient will appear black in Firefox, etc.  See bug 308590
 	// https://bugzilla.mozilla.org/show_bug.cgi?id=308590
 	var saveHandler = function(window,svg) {
-		window.open("data:image/svg+xml;base64," + Utils.encode64(svg));
+	var titlename = window.content.parent.document.title.split('-')[0];
+	titlename = titlename.replace(' ', '');
+	var svg_data = Utils.encode64(svg);
+	var pagename = location.pathname;
+	var svg_target = titlename.split(':')[1];
+	$.post(
+	        pagename,
+	        {'action': "SvgEditor", 'do': "save", 'target': svg_target, 'svg_data': svg_data}
+	      );
+	// redirects to the page
+	window.location = location.pathname;
+	//window.open("data:image/svg+xml;base64," + Utils.encode64(svg));
 	};
 	
 	// called when we've selected a different element
@@ -1220,7 +1245,7 @@
 		
 		$.resizeSvgIcons({
 			'.flyout_arrow_horiz svg, .flyout_arrow_horiz img': size_num / 3,
-			'#logo a > svg, #logo a > img': size_num * 1.3
+			//'#logo a > svg, #logo a > img': size_num * 1.3
 		});
 		if(size != 's') {
 			$.resizeSvgIcons({'#layerbuttons svg, #layerbuttons img': size_num * .6});
@@ -1313,7 +1338,7 @@
 				'top': {s: '-13px', l: '-13px', xl: '-20px'}
 			},
 			"input.spin-button": {
-				'background-image': {l: "url('images/spinbtn_updn_big.png')", xl: "url('images/spinbtn_updn_big.png')"},
+				'background-image': {l: "url(" + htdocs + "'images/spinbtn_updn_big.png')", xl: "url('images/spinbtn_updn_big.png')"},
 				'background-position': {l: '100% -5px', xl: '100% -2px'},
 				'padding-right': {l: '24px', xl: '24px' }
 			},
@@ -1626,7 +1651,7 @@
 	
 	// Test for embedImage support (use timeout to not interfere with page load)
 	setTimeout(function() {
-		svgCanvas.embedImage('images/logo.png', function(datauri) {
+		svgCanvas.embedImage(htdocs + 'images/logo.png', function(datauri) {
 			if(!datauri) {
 				// Disable option
 				$('#image_save_opts [value=embed]').attr('disabled','disabled');
@@ -2245,11 +2270,12 @@
 
 // This process starts before document.ready so the icons appear ASAP
 (function() {
-	$.svgIcons('images/svg_edit_icons.svg', {
+
+	$.svgIcons('/moin_static190/svg-edit/editor/images/svg_edit_icons.svg', {
 		w:24, h:24,
 		id_match: false,
 		no_img: true,
-		fallback_path:'images/',
+		fallback_path:'/moin_static190/svg-edit/editor/images/',
 		fallback:{
 			'new_image':'clear.png',
 			'save':'save.png',