changeset 454:739789bdac90

SvgEditor: svg-edit adapted
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 31 Oct 2009 19:30:46 +0100
parents 433b3e6a7911
children 6c316e0e3dce
files data/plugin/action/SvgEditor.py htdocs/svg-edit/editor/svg-editor.css htdocs/svg-edit/editor/svg-editor.js
diffstat 3 files changed, 353 insertions(+), 309 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SvgEditor.py	Sat Oct 31 18:31:40 2009 +0100
+++ b/data/plugin/action/SvgEditor.py	Sat Oct 31 19:30:46 2009 +0100
@@ -117,22 +117,24 @@
 <link rel="stylesheet" href="%(htdocs)s/svg-editor.css" type="text/css"/>
 <link rel="stylesheet" href="%(htdocs)s/spinbtn/JQuerySpinBtn.css" type="text/css"/>
 <script type="text/javascript" src="%(htdocs)s/jquery.js"></script>
-<!--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.min.js"></script>
-<!--script type="text/javascript" src="%(htdocs)s/js-hotkeys/jquery.hotkeys-0.7.9.js"></script-->
-<script type="text/javascript" src="j%(htdocs)s/query-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>
+ <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/jgraduate/jquery.jgraduate.min.js"></script-->
 <script type="text/javascript" src="%(htdocs)s/spinbtn/JQuerySpinBtn.js"></script>
-<!--script type="text/javascript" src="%(htdocs)s/spinbtn/JQuerySpinBtn.min.js"></script-->
 <script type="text/javascript" src="%(htdocs)s/svgcanvas.js"></script>
-<!--script type="text/javascript" src="%(htdocs)s/svgcanvas.min.js"></script-->
 <script type="text/javascript" src="%(htdocs)s/svg-editor.js"></script>
-<!--script type="text/javascript" src="%(htdocs)s/svg-editor.min.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>
+<script type="text/javascript" src="%(htdocs)s/jgraduate/jquery.jgraduate.min.js"></script>
+<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-->
+<!-- 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>
 
-        
 """ % {"htdocs": htdocs}
         
         html = """<h2> %(editdrawing)s </h2>
@@ -144,336 +146,350 @@
 <div id="svgdata">%(filecontent)s</div>
 </div>
 <div id="sidepanels">
-	<div id="layerpanel">
-		<h3>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"/>
-		</fieldset>
-		
-		<select id="layerlist" size="20" multiple="multiple">
-			<option value="Layer 1" selected="selected">Layer 1</option>
-			<option value="Layer 2">Layer 2</option>
-			<option value="Layer 3">Layer 3</option>
-		</select>
-	</div>
+    <div id="layerpanel">
+        <h3 id="layersLable">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"/>
+        </fieldset>
+        
+        <table id="layerlist">
+            <tr class="layer">
+                <td class="layervis"></td>
+                <td class="layername">Layer 1</td>
+            </tr>
+        </table>
+        <span id="selLayerLabel">Move elements to:</span>
+        <select id="selLayerNames" title="Move selected elements to a different layer" disabled="disabled">
+            <option selected="selected" value="layer1">Layer 1</option>
+        </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 id="logo">
-	<a href="http://svg-edit.googlecode.com/" target="_blank" title="SVG-edit Home Page">
-		<img src="%(htdocs)s/images/logo.png" alt="logo" />
-	</a>
+    <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="tool_button" id="tool_clear" src="%(htdocs)s/images/clear.png" title="New Image [N]" alt="Clear" />
-		<img style="display:none" class="tool_button" id="tool_open" src="%(htdocs)s/images/open.png" title="Open Image [O]" alt="Open"/>
-		<img class="tool_button" id="tool_save" src="%(htdocs)s/images/save.png" title="Save Image [S]" alt="Save"/>
-		<img class="tool_button" id="tool_docprops" src="%(htdocs)s/images/document-properties.png" title="Document Properties [I]"/>
-		<img class="tool_button" id="tool_source" src="%(htdocs)s/images/source.png" title="Edit Source [U]" alt="Source"/>
-	</div>
+    
+    <!-- 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>
 
     <!-- History buttons -->
-	<div id="history_panel">
-		<div class="tool_sep"></div>
-		<div class="tool_button tool_button_disabled" id="tool_undo" title="Undo [Z]"></div>
-		<div class="tool_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="tool_button" id="tool_clone" src="%(htdocs)s/images/clone.png" title="Clone Element [C]" alt="Copy"/>
-		<img class="tool_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="tool_button" id="tool_move_top" src="%(htdocs)s/images/move_top.png" title="Move to Top [Shift+Up]" alt="Top"/>
-		<img class="tool_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="|"/>
-		<select id="group_opacity" class="selected_tool" title="Change selected item opacity">
-			<option selected="selected" value="1">100 %%</option>
-			<option value="0.9">90 %%</option>
-			<option value="0.8">80 %%</option>
-			<option value="0.7">70 %%</option>
-			<option value="0.6">60 %%</option>
-			<option value="0.5">50 %%</option>
-			<option value="0.4">40 %%</option>
-			<option value="0.3">30 %%</option>
-			<option value="0.2">20 %%</option>
-			<option value="0.1">10 %%</option>
-			<option value="0">0 %%</option>
-		</select>
-		<span class="selected_tool">angle:</span>
-		<input id="angle" class="selected_tool" title="Change rotation angle" size="2" value="0" type="text"/>
-	</div>
+    <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>
+    
+    <!-- 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="|"/>
 
-	<!-- Buttons when multiple elements are selected -->
-	<div id="multiselected_panel">
-		<img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-		<img class="tool_button" id="tool_clone_multi" src="%(htdocs)s/images/clone.png" title="Clone Elements [C]" alt="Clone"/>
-		<img class="tool_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="|"/>
-		<div class="tool_button" id="tool_alignleft" title="Align Left"></div>
-		<div class="tool_button" id="tool_aligncenter" title="Align Center"></div>
-		<div class="tool_button" id="tool_alignright" title="Align Right"></div>
-		<div class="tool_button" id="tool_aligntop" title="Align Top"></div>
-		<div class="tool_button" id="tool_alignmiddle" title="Align Middle"></div>
-		<div class="tool_button" id="tool_alignbottom" title="Align Bottom"></div>
-		<span class="selected_tool">relative to:</span>
-		<select id="align_relative_to" class="selected_tool" title="Align relative to ...">
-		<option value="selected">selected objects</option>
-		<option value="largest">largest object</option>
-		<option value="smallest">smallest object</option>
-		<option value="page">page</option>
-		</select>
-		<img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-		<img class="tool_button" id="tool_group" src="%(htdocs)s/images/shape_group.png" title="Group Elements [G]" alt="Group"/>
-	</div>
+        <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 id="g_panel">
-		<img class="tool_sep" src="%(htdocs)s/images/sep.png" alt="|"/>
-		<img class="tool_button" id="tool_ungroup" src="%(htdocs)s/images/shape_ungroup.png" title="Ungroup Elements [G]" alt="Ungroup"/>
-	</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>
 
-	<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"/>
-		<label class="rect_tool">y:</label>
-		<input id="rect_y" class="rect_tool attr_changer" title="Change rectangle Y coordinate" size="3"/>
-		<label class="rect_tool">width:</label>
-		<input id="rect_width" class="rect_tool attr_changer" title="Change rectangle width" size="3"/>
-		<label class="rect_tool">height:</label>
-		<input id="rect_height" class="rect_tool attr_changer" title="Change rectangle height" size="3"/>
-		<label class="rect_tool">Corner Radius:</label>
-		<input id="rect_rx" size="3" value="0" class="rect_tool" type="text" title="Change Rectangle Corner Radius"/>
-	</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="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>
+        <div class="push_button" id="tool_aligntop" title="Align Top"></div>
+        <div class="push_button" id="tool_alignmiddle" title="Align Middle"></div>
+        <div class="push_button" id="tool_alignbottom" title="Align Bottom"></div>
+        <span id="relativeToLabel" class="selected_tool">relative to:</span>
+        <select id="align_relative_to" class="selected_tool" title="Align relative to ...">
+        <option id="selected_objects" value="selected">selected objects</option>
+        <option id="largest_object" value="largest">largest object</option>
+        <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 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"/>
-		<label class="image_tool">y:</label>
-		<input id="image_y" class="image_tool attr_changer" title="Change image Y coordinate" size="3"/>
-		<label class="image_tool">width:</label>
-		<input id="image_width" class="image_tool attr_changer" title="Change image width" size="3"/>
-		<label class="image_tool">height:</label>
-		<input id="image_height" class="image_tool attr_changer" title="Change image height" size="3"/>
+    </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>
+
+    <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>
+
+    <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"/>
+        <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 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"/>
-		<label class="circle_tool">cy:</label>
-		<input id="circle_cy" class="circle_tool attr_changer" title="Change circle's cy coordinate" size="3"/>
-		<label class="circle_tool">r:</label>
-		<input id="circle_r" class="circle_tool attr_changer" title="Change circle's radius" size="3"/>
-	</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"/>
-		<label class="ellipse_tool">cy:</label>
-		<input id="ellipse_cy" class="ellipse_tool attr_changer" title="Change ellipse's cy coordinate" size="3"/>
-		<label class="ellipse_tool">rx:</label>
-		<input id="ellipse_rx" class="ellipse_tool attr_changer" title="Change ellipse's x radius" size="3"/>
-		<label class="ellipse_tool">ry:</label>
-		<input id="ellipse_ry" class="ellipse_tool attr_changer" title="Change ellipse's y radius" size="3"/>
-	</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>
 
-	<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"/>
-		<label class="line_tool">y1:</label>
-		<input id="line_y1" class="line_tool attr_changer" title="Change line's starting y coordinate" size="3"/>
-		<label class="line_tool">x2:</label>
-		<input id="line_x2" class="line_tool attr_changer" title="Change line's ending x coordinate" size="3"/>
-		<label class="line_tool">y2:</label>
-		<input id="line_y2" class="line_tool attr_changer" title="Change line's ending y coordinate" size="3"/>
-	</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>
 
-	<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"/>
-		<label class="text_tool">y:</label>
-		<input id="text_y" class="text_tool attr_changer" title="Change text Y coordinate" size="3"/>
-		<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>
-		<select id="font_size" class="text_tool" title="Change Font Size">
-			<option value="6pt">6pt</option>
-			<option value="8pt">8pt</option>
-			<option value="10pt">10pt</option>
-			<option selected="selected" value="12pt">12pt</option>
-			<option value="14pt">14pt</option>
-			<option value="16pt">16pt</option>
-			<option value="20pt">20pt</option>
-			<option value="24pt">24pt</option>
-			<option value="32pt">32pt</option>
-			<option value="48pt">48pt</option>
-			<option value="64pt">64pt</option>
-			<option value="72pt">72pt</option>
-			<option value="80pt">80pt</option>
-			<option value="96pt">96pt</option>
-			<option value="120pt">120pt</option>
-		</select>
-		<input id="text" class="text_tool" type="text" title="Change text contents" size="35"/>
-	</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>
+
+    <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"/>
+        <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="|"/>
+        <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>
+        <input id="path_node_y" class="path_node_tool attr_changer" title="Change node's y coordinate" size="3" data-attr="y"/>
+        <select id="seg_type" class="path_node_tool" title="Change Segment type">
+            <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>
+    
 </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_path" src="%(htdocs)s/images/path.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_text" src="%(htdocs)s/images/text.png" title="Text Tool [6]" alt="Text"/>
-	<img class="tool_button" id="tool_poly" src="%(htdocs)s/images/polygon.png" title="Poly Tool [7]" alt="Poly"/>
-	<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"/>
+    <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> <!-- tools_left -->
 
 <div id="tools_bottom" class="tools_panel">
 
     <!-- Zoom buttons -->
-	<div id="zoom_panel">
-		<span class="zoom_tool">zoom:</span>
-		<input id="zoom" class="zoom_tool" title="Change zoom level" size="3" value="100" type="text"/>
-		<div id="zoom_dropdown">
-			<button></button>
-			<ul>
-				<li>100%%</li>
-				<li data-val="content">Fit to all content</li>
-				<li data-val="layer">Fit to layer content</li>
-				<li data-val="selection">Fit to selection</li>
-				<li data-val="canvas">Fit to canvas</li>
-				<li>25%%</li>
-				<li>50%%</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>
+    <div id="zoom_panel" class="magic_field">
+        <span id="zoomLabel" class="zoom_tool">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>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 id="fit_to_canvas" data-val="canvas">Fit to canvas</li>
+                <li>25%%</li>
+                <li>50%%</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>
 
-	<div id="tools_bottom_2">
-		<table>
-		<tr>
-			<td>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>
-		</tr><tr>
-			<td>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>
-				<input id="stroke_width" title="Change stroke width" size="2" value="5" type="text"/>
-			</td>
-			<td>
-				<select id="stroke_style" title="Change stroke dash style">
-					<option selected="selected" value="none">---</option>
-					<option value="2,2">...</option>
-					<option value="5,5">- -</option>
-					<option value="5,2,2,2">- .</option>
-					<option value="5,2,2,2,2,2">- ..</option>
-				</select>
-			</td>
-		</tr>
-		</table>
-	</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>
+        </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>
+                <input id="stroke_width" title="Change stroke width" size="2" value="5" type="text" data-attr="Stroke Width"/>
+            </td>
+            <td>
+                <select id="stroke_style" title="Change stroke dash style">
+                    <option selected="selected" value="none">---</option>
+                    <option value="2,2">...</option>
+                    <option value="5,5">- -</option>
+                    <option value="5,2,2,2">- .</option>
+                    <option value="5,2,2,2,2,2">- ..</option>
+                </select>
+            </td>
+        </tr>
+        </table>
+    </div>
 
-	<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 id="copyright">Powered by <a href="http://svg-edit.googlecode.com/" target="_blank">SVG-edit v2.4-unstable</a></div>
-	</div>
+    <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>
 
 <!-- hidden divs -->
 <div id="color_picker"></div>
 
 <div id="tools_rect" class="tools_flyout">
-	<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 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_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 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>
 
 </div> <!-- svg_editor -->
 
 <div id="svg_source_editor">
-	<div id="svg_source_overlay"></div>
-	<div id="svg_source_container">
-		<div id="tool_source_back" class="toolbar_button">
-			<button id="tool_source_save">Save</button>
-			<button id="tool_source_cancel">Cancel</button>
-		</div>
-		<form>
-			<textarea id="svg_source_textarea"></textarea>
-		</form>
-	</div>
+    <div id="svg_source_overlay"></div>
+    <div id="svg_source_container">
+        <div id="tool_source_back" class="toolbar_button">
+            <button id="tool_source_save">Apply Changes</button>
+            <button id="tool_source_cancel">Cancel</button>
+        </div>
+        <form>
+            <textarea id="svg_source_textarea" spellcheck="false"></textarea>
+        </form>
+    </div>
 </div>
 
 <div id="svg_docprops">
-	<div id="svg_docprops_overlay"></div>
-	<div id="svg_docprops_container">
-		<div id="tool_docprops_back" class="toolbar_button">
-			<button id="tool_docprops_save">Save</button>
-			<button id="tool_docprops_cancel">Cancel</button>
-
-			<fieldset id="change_background">
-				<legend>Canvas Background</legend>
-					<div id="bkgnd_color" class="color_block"  title="Change background color/opacity"></div>
-			</fieldset>
-			
-			<fieldset id="change_resolution">
-				<legend>Canvas Dimensions</legend>
+    <div id="svg_docprops_overlay"></div>
+    <div id="svg_docprops_container">
+        <div id="tool_docprops_back" class="toolbar_button">
+            <button id="tool_docprops_save">OK</button>
+            <button id="tool_docprops_cancel">Cancel</button>
 
-				<label>Width: <input type="text" id="canvas_width" size="6"></label>
-					
-				<label>Height: <input type="text" id="canvas_height" size="6"></label>
-					
-				<label>
-					<select id="resolution">
-						<option selected="selected">Select predefined:</option>
-						<option>640x480</option>
-						<option>800x600</option>
-						<option>1024x768</option>
-						<option>1280x960</option>
-						<option>1600x1200</option>
-						<option value="content">Fit to Content</option>
-					</select>
-				</label>
-				
-			</fieldset>
-		</div>
-	</div>
+            <label><span id="svginfo_title">Image title:</span> <input type="text" id="canvas_title" size="24"></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="17"></label>
+            </fieldset>
+            
+            <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>
+                        <option>640x480</option>
+                        <option>800x600</option>
+                        <option>1024x768</option>
+                        <option>1280x960</option>
+                        <option>1600x1200</option>
+                        <option id="fitToContent" value="content">Fit to Content</option>
+                    </select>
+                </label>
+                
+            </fieldset>
+        </div>
+    </div>
 </div>
 
 """ % {"htdocs": htdocs,
--- a/htdocs/svg-edit/editor/svg-editor.css	Sat Oct 31 18:31:40 2009 +0100
+++ b/htdocs/svg-edit/editor/svg-editor.css	Sat Oct 31 19:30:46 2009 +0100
@@ -4,6 +4,8 @@
 
 #svg_editor {
 	font-size: 8pt;
+	width: 660px;
+	height: 640px;
 	font-family: Verdana, Helvetica, Arial;
 	color: #000000;
 }
@@ -62,8 +64,9 @@
 
 #svg_editor div#workarea {
 	display: inline-block;
-	position:absolute;
-	top: 75px;
+	position: absolute;
+	top: 280px;
+
 	left: 40px;
 	bottom: 60px;
 	right: 14px;
@@ -90,7 +93,7 @@
 	display: inline-block;
 	background-color: #E8E8E8;
 	position:absolute;
-	top: 1px;
+	top: 200px;
 	bottom: 0px;
 	right: 0px;
 	width: 0px;
@@ -216,6 +219,7 @@
 }
 
 #svg_editor #logo {
+	display: none;
 	position: absolute;
 	top: 4px;
 	left: 4px;
@@ -229,7 +233,7 @@
 }
 
 #svg_editor #tools_top {
-	position: absolute;
+	position: relative;
 	left: 38px;
 	right: 2px;
 	top: 2px;
@@ -245,7 +249,7 @@
 	position: absolute;
 	border-right: none;
 	width: 36px;
-	top: 75px;
+	top: 300px;
 	left: 2px;
 }
 
--- a/htdocs/svg-edit/editor/svg-editor.js	Sat Oct 31 18:31:40 2009 +0100
+++ b/htdocs/svg-edit/editor/svg-editor.js	Sat Oct 31 19:30:46 2009 +0100
@@ -12,7 +12,19 @@
 
 	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 setSelectMode = function() {
 		$('.tool_button_current').removeClass('tool_button_current').addClass('tool_button');
@@ -39,7 +51,19 @@
 	// 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));
+		//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 = titlename.split(':')[0];
+	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;
+
 	};
 
 	// called when we've selected a different element
@@ -69,9 +93,9 @@
 		if(is_node) {
 			// Change select icon
 			$('.tool_button').removeClass('tool_button_current');
-			$('#tool_select').attr('src','images/select_node.png').addClass('tool_button_current');
+			$('#tool_select').attr('src', htdocs + 'images/select_node.png').addClass('tool_button_current');
 		} else {
-			$('#tool_select').attr('src','images/select.png');
+			$('#tool_select').attr('src', htdocs + 'images/select.png');
 
 		}
 
@@ -640,14 +664,14 @@
 			flyoutspeed = 'normal';
 			svgCanvas.setMode('square');
 		}
-		$('#tools_rect_show').attr('src', 'images/square.png');
+		$('#tools_rect_show').attr('src', htdocs + 'images/square.png');
 	};
 
 	var clickRect = function(){
 		if (toolButtonClick('#tools_rect_show')) {
 			svgCanvas.setMode('rect');
 		}
-		$('#tools_rect_show').attr('src', 'images/rect.png');
+		$('#tools_rect_show').attr('src',htdocs +  'images/rect.png');
 	};
 
 	var clickImage = function(){
@@ -677,7 +701,7 @@
 		if (toolButtonClick('#tools_rect_show')) {
 			svgCanvas.setMode('fhrect');
 		}
-		$('#tools_rect_show').attr('src', 'images/freehand-square.png');
+		$('#tools_rect_show').attr('src', htdocs + 'images/freehand-square.png');
 	};
 
 	var clickCircle = function(){
@@ -685,21 +709,21 @@
 			flyoutspeed = 'normal';
 			svgCanvas.setMode('circle');
 		}
-		$('#tools_ellipse_show').attr('src', 'images/circle.png');
+		$('#tools_ellipse_show').attr('src', htdocs + 'images/circle.png');
 	};
 
 	var clickEllipse = function(){
 		if (toolButtonClick('#tools_ellipse_show')) {
 			svgCanvas.setMode('ellipse');
 		}
-		$('#tools_ellipse_show').attr('src', 'images/ellipse.png');
+		$('#tools_ellipse_show').attr('src', htdocs + 'images/ellipse.png');
 	};
 
 	var clickFHEllipse = function(){
 		if (toolButtonClick('#tools_ellipse_show')) {
 			svgCanvas.setMode('fhellipse');
 		}
-		$('#tools_ellipse_show').attr('src', 'images/freehand-circle.png');
+		$('#tools_ellipse_show').attr('src', htdocs + 'images/freehand-circle.png');
 	};
 
 	var clickText = function(){