Spruced up docprops to fix Issue 315, made Image Title appear in browser title when available
git-svn-id: http://svg-edit.googlecode.com/svn/branches/transformlist@926 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
a5ae9e78de
commit
e40619cc67
|
@ -564,6 +564,7 @@ span.zoom_tool {
|
||||||
background-color: #B0B0B0;
|
background-color: #B0B0B0;
|
||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
border: 1px outset #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -573,22 +574,52 @@ span.zoom_tool {
|
||||||
bottom: 100px;
|
bottom: 100px;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#svg_docprops #svg_docprops_container {
|
#svg_docprops #svg_docprops_container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50px;
|
top: 50px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #B0B0B0;
|
background-color: #B0B0B0;
|
||||||
|
border: 1px outset #777;
|
||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
|
/* width: 450px;*/
|
||||||
|
font-family: Verdana, Helvetica, sans-serif;
|
||||||
|
font-size: .8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tool_docprops_back {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#svg_docprops_container #svg_docprops_docprops,
|
||||||
|
#svg_docprops_container #svg_docprops_prefs {
|
||||||
|
float: left;
|
||||||
|
width: 200px;
|
||||||
|
margin: 5px .7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#svg_docprops_docprops > legend, #svg_docprops_prefs > legend {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#svg_docprops_container fieldset {
|
#svg_docprops_container fieldset {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
border: 1px solid #DDD;
|
||||||
}
|
}
|
||||||
|
|
||||||
#svg_docprops_container label {
|
#svg_docprops_container label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: .2em;
|
margin: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#svginfo_bg_note {
|
||||||
|
font-size: .9em;
|
||||||
|
font-style: italic;
|
||||||
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
#canvas_title {
|
#canvas_title {
|
||||||
|
|
|
@ -362,15 +362,16 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
|
||||||
<button id="tool_docprops_save">OK</button>
|
<button id="tool_docprops_save">OK</button>
|
||||||
<button id="tool_docprops_cancel">Cancel</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">
|
<fieldset id="svg_docprops_docprops">
|
||||||
<legend id="svginfo_change_background">Editor Background</legend>
|
<legend id="svginfo_image_props">Image Properties</legend>
|
||||||
<div id="bg_blocks"></div>
|
<label>
|
||||||
<label><span id="svginfo_bg_url">URL:</span> <input type="text" id="canvas_bg_url" size="17"></label>
|
<span id="svginfo_title">Title:</span>
|
||||||
</fieldset>
|
<input type="text" id="canvas_title" size="24">
|
||||||
|
</label>
|
||||||
|
|
||||||
<fieldset id="change_resolution">
|
<fieldset id="change_resolution">
|
||||||
<legend id="svginfo_dim">Canvas Dimensions</legend>
|
<legend id="svginfo_dim">Canvas Dimensions</legend>
|
||||||
|
|
||||||
|
@ -390,17 +391,30 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="change_iconsize">
|
</fieldset>
|
||||||
<legend id="svginfo_icons">Icon size</legend>
|
|
||||||
<select id="iconsize">
|
<fieldset id="svg_docprops_prefs">
|
||||||
<option id="icon_small" value="s">Small</option>
|
<legend id="svginfo_editor_profs">Editor Preferences</legend>
|
||||||
<option id="icon_medium" value="m" selected="selected">Medium</option>
|
|
||||||
<option id="icon_large" value="l">Large</option>
|
<label><span id="svginfo_icons">Icon size:</span>
|
||||||
<option id="icon_xlarge" value="xl">Extra Large</option>
|
<select id="iconsize">
|
||||||
</select>
|
<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>
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -861,6 +861,8 @@ function svg_edit_setup() {
|
||||||
$('#svg_source_textarea').focus();
|
$('#svg_source_textarea').focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$('#svg_docprops_container').draggable({cancel:'button,fieldset'});
|
||||||
|
|
||||||
var showDocProperties = function(){
|
var showDocProperties = function(){
|
||||||
if (docprops) return;
|
if (docprops) return;
|
||||||
docprops = true;
|
docprops = true;
|
||||||
|
@ -909,12 +911,21 @@ function svg_edit_setup() {
|
||||||
}
|
}
|
||||||
svgCanvas.clearSelection();
|
svgCanvas.clearSelection();
|
||||||
hideSourceEditor();
|
hideSourceEditor();
|
||||||
populateLayers();
|
populateLayers();
|
||||||
|
setTitle(svgCanvas.getImageTitle());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var setTitle = function(title) {
|
||||||
|
var editor_title = $('title:first').text().split(':')[0];
|
||||||
|
var new_title = editor_title + (title?': ' + title:'');
|
||||||
|
$('title:first').text(new_title);
|
||||||
|
}
|
||||||
|
|
||||||
var saveDocProperties = function(){
|
var saveDocProperties = function(){
|
||||||
// set title
|
// set title
|
||||||
svgCanvas.setImageTitle($('#canvas_title').val());
|
var new_title = $('#canvas_title').val();
|
||||||
|
setTitle(new_title);
|
||||||
|
svgCanvas.setImageTitle(new_title);
|
||||||
|
|
||||||
// update resolution
|
// update resolution
|
||||||
var x = parseInt($('#canvas_width').val());
|
var x = parseInt($('#canvas_width').val());
|
||||||
|
|
Loading…
Reference in New Issue