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@529 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9d2d89c569
commit
e9bf219b7c
5 changed files with 195 additions and 0 deletions
46
modules/editor/components/multimedia_link/tpl/popup.css
Normal file
46
modules/editor/components/multimedia_link/tpl/popup.css
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
.editor_window {
|
||||
width:400px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.header {
|
||||
float:left;
|
||||
width:100px;
|
||||
clear:left;
|
||||
text-align:left;
|
||||
font-weight:bold;
|
||||
margin:5px;
|
||||
}
|
||||
|
||||
.body {
|
||||
float:left;
|
||||
width:250px;
|
||||
text-align:left;
|
||||
margin:5px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.body label {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.image_align {
|
||||
margin:0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.image_url {
|
||||
width:240px;
|
||||
border:1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
.editor_button_area {
|
||||
clear:both;
|
||||
text-align:center;
|
||||
margin:5px;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
margin-top:4px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #AAAAAA;
|
||||
}
|
||||
47
modules/editor/components/multimedia_link/tpl/popup.html
Normal file
47
modules/editor/components/multimedia_link/tpl/popup.html
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<div class="editor_window">
|
||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
<div class="header">{$lang->image_url}</div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_url" value="" /></div>
|
||||
<div class="header">{$lang->image_alt}</div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_alt" value="" /></div>
|
||||
<div class="header">{$lang->image_align}</div>
|
||||
<div class="body">
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="" id="align_normal" checked="true"/>
|
||||
<label for="align_normal">
|
||||
<img src="./images/align_normal.gif" alt="{$lang->image_align_normal}" />
|
||||
{$lang->image_align_normal}
|
||||
</label>
|
||||
</div>
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="left" id="align_left" />
|
||||
<label for="align_left">
|
||||
<img src="./images/align_left.gif" alt="{$lang->image_align_left}" />
|
||||
{$lang->image_align_left}
|
||||
</label>
|
||||
</div>
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="middle" id="align_middle" />
|
||||
<label for="align_middle">
|
||||
<img src="./images/align_middle.gif" alt="{$lang->image_align_middle}" />
|
||||
{$lang->image_align_middle}
|
||||
</label>
|
||||
</div>
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="right" id="align_right" />
|
||||
<label for="align_right">
|
||||
<img src="./images/align_right.gif" alt="{$lang->image_align_right}" />
|
||||
{$lang->image_align_right}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor_button_area">
|
||||
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertImage()" />
|
||||
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
30
modules/editor/components/multimedia_link/tpl/popup.js
Normal file
30
modules/editor/components/multimedia_link/tpl/popup.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
function insertImage(obj) {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var url = xGetElementById("image_url").value;
|
||||
var alt = xGetElementById("image_alt").value;
|
||||
var align = "";
|
||||
if(xGetElementById("align_normal").checked==true) align = "";
|
||||
else if(xGetElementById("align_left").checked==true) align = "left";
|
||||
else if(xGetElementById("align_middle").checked==true) align = "middle";
|
||||
else if(xGetElementById("align_right").checked==true) align = "right";
|
||||
|
||||
if(!url) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
var text = "<img src=\""+url+"\" border=\"0\"";
|
||||
if(alt) text+= " alt=\""+alt+"\"";
|
||||
if(align) text+= " align=\""+align+"\" ";
|
||||
text+= " />";
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue