mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@537 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc0b017bcc
commit
5d59f2b8f9
13 changed files with 197 additions and 153 deletions
|
|
@ -5,7 +5,15 @@
|
|||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
<div class="editor_window">
|
||||
<div class="header">{$lang->image_url}</div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_url" value="" /></div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_url" value="" onblur="getImageScale();" /></div>
|
||||
|
||||
<div class="header">{$lang->image_scale}</div>
|
||||
<div class="body">
|
||||
<input type="text" class="editor_input" id="width" value="0" />px
|
||||
<input type="text" class="editor_input" id="height" value="0" />px
|
||||
<input type="button" value="{$lang->cmd_get_scale}" class="editor_button" onclick="getImageScale();return false;" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="header">{$lang->image_alt}</div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_alt" value="" /></div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
function getImageScale() {
|
||||
var url = xGetElementById("image_url").value;
|
||||
if(!url) return;
|
||||
|
||||
var img = new Image();
|
||||
img.src = url;
|
||||
|
||||
xGetElementById("width").value = img.width;
|
||||
xGetElementById("height").value = img.height;
|
||||
|
||||
}
|
||||
function insertImage(obj) {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
|
|
@ -10,14 +21,19 @@ function insertImage(obj) {
|
|||
else if(xGetElementById("align_right").checked==true) align = "right";
|
||||
var border = parseInt(xGetElementById("image_border").value,10);
|
||||
|
||||
var width = xGetElementById("width").value;
|
||||
var height = xGetElementById("height").value;
|
||||
|
||||
if(!url) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
var text = "<img src=\""+url+"\" border=\""+border+"\" plugin=\"image_link\" ";
|
||||
var text = "<img editor_component=\"image_link\" src=\""+url+"\" border=\""+border+"\" ";
|
||||
if(alt) text+= " alt=\""+alt+"\"";
|
||||
if(align) text+= " align=\""+align+"\" ";
|
||||
if(width) text+= " width=\""+width+"\" ";
|
||||
if(height) text+= " height=\""+height+"\" ";
|
||||
text+= " />";
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue