Somewhat undo r692 and r693 but replace alt attribute with HTML5-compliant data-attr to fix Issue 222
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@700 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -139,72 +139,71 @@
|
||||
<div id="rect_panel">
|
||||
<img class="tool_sep" src="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"/>
|
||||
<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"/>
|
||||
<input id="rect_y" class="rect_tool attr_changer" title="Change rectangle Y coordinate" size="3" data-attr="y"/>
|
||||
<label class="rect_tool">width:</label>
|
||||
<input id="rect_width" class="rect_tool attr_changer" title="Change rectangle width" size="3"/>
|
||||
<input id="rect_width" class="rect_tool attr_changer" title="Change rectangle width" size="3" data-attr="width"/>
|
||||
<label class="rect_tool">height:</label>
|
||||
<input id="rect_height" class="rect_tool attr_changer" title="Change rectangle height" size="3"/>
|
||||
<input id="rect_height" class="rect_tool attr_changer" title="Change rectangle height" size="3" data-attr="height"/>
|
||||
<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"/>
|
||||
<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="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"/>
|
||||
<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"/>
|
||||
<input id="image_y" class="image_tool attr_changer" title="Change image Y coordinate" size="3" data-attr="y"/>
|
||||
<label class="image_tool">width:</label>
|
||||
<input id="image_width" class="image_tool attr_changer" title="Change image width" size="3"/>
|
||||
<input id="image_width" class="image_tool attr_changer" title="Change image width" size="3" data-attr="width"/>
|
||||
<label class="image_tool">height:</label>
|
||||
<input id="image_height" class="image_tool attr_changer" title="Change image height" size="3"/>
|
||||
<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="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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<input id="circle_r" class="circle_tool attr_changer" title="Change circle's radius" size="3" data-attr="r"/>
|
||||
</div>
|
||||
|
||||
<div id="ellipse_panel">
|
||||
<img class="tool_sep" src="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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<input id="ellipse_ry" class="ellipse_tool attr_changer" title="Change ellipse's y radius" size="3" data-attr="ry"/>
|
||||
</div>
|
||||
|
||||
<div id="line_panel">
|
||||
<img class="tool_sep" src="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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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="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"/>
|
||||
<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"/>
|
||||
<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="images/bold.png" title="Bold Text [B]" alt="Bold"/>
|
||||
<img class="tool_button" id="tool_italic" src="images/italic.png" title="Italic Text [I]" alt="Italic"/>
|
||||
<select id="font_family" class="text_tool" title="Change Font Family">
|
||||
@@ -254,7 +253,7 @@
|
||||
<!-- 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"/>
|
||||
<input id="zoom" class="zoom_tool" title="Change zoom level" size="3" value="100" type="text" />
|
||||
<div id="zoom_dropdown">
|
||||
<button></button>
|
||||
<ul>
|
||||
@@ -285,7 +284,7 @@
|
||||
<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"/>
|
||||
<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">
|
||||
|
||||
@@ -347,7 +347,7 @@ function svg_edit_setup() {
|
||||
});
|
||||
|
||||
$('.attr_changer').change(function() {
|
||||
var attr = this.getAttribute("alt");
|
||||
var attr = this.getAttribute("data-attr");
|
||||
var val = this.value;
|
||||
var valid = false;
|
||||
if($.inArray(attr, length_attrs) != -1) {
|
||||
|
||||
Reference in New Issue
Block a user