git-svn-id: http://xe-core.googlecode.com/svn/trunk@548 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-19 12:43:05 +00:00
parent a4f427a228
commit 4a46e67a18
7 changed files with 218 additions and 226 deletions

View file

@ -0,0 +1,52 @@
.editor_window {
width:400px;
text-align:center;
}
.header {
float:left;
width:100px;
clear:left;
text-align:left;
font-weight:bold;
margin:5px;
font-size:9pt;
font-size:9pt;
}
.body {
float:left;
width:250px;
text-align:left;
margin:5px;
font-size:9pt;
}
.body label {
cursor:pointer;
font-size:9pt;
}
.multimedia_url {
width:240px;
border:1px solid #AAAAAA;
}
.multimedia_size {
width:60px;
border:1px solid #AAAAAA;
}
.editor_button_area {
clear:both;
text-align:center;
height:25px;
padding-top:3px;
background-color:#EEEEEE;
}
.editor_button {
margin-top:4px;
background-color:#FFFFFF;
border:1px solid #AAAAAA;
}

View file

@ -0,0 +1,27 @@
<!--%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->multimedia_url}</div>
<div class="body"><input type="text" class="multimedia_url" id="multimedia_url" value="" /></div>
<div class="header">{$lang->multimedia_caption}</div>
<div class="body"><input type="text" class="multimedia_url" id="multimedia_caption" value="" /></div>
<div class="header">{$lang->multimedia_width}</div>
<div class="body"><input type="text" class="multimedia_size" id="multimedia_width" value="640" />px</div>
<div class="header">{$lang->multimedia_height}</div>
<div class="body"><input type="text" class="multimedia_size" id="multimedia_height" value="480" />px</div>
<div class="header">{$lang->multimedia_auto_start}</div>
<div class="body"><input type="checkbox" id="multimedia_auto_start" value="Y" /></div>
<div class="editor_button_area">
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertMultimedia()" />
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
</div>
</form>
</div>

View file

@ -0,0 +1,59 @@
/**
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
* 있으면 가져와서 원하는 곳에 삽입
**/
function getMultimedia() {
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
if(typeof(opener)=="undefined") return;
var node = opener.editorPrevNode;
if(!node || node.nodeName != "DIV") return;
var url = node.getAttribute("src");
var caption = xInnerHtml(node);
var width = node.getAttribute("width");
var height = node.getAttribute("height");
var auto_start = node.getAttribute("auto_start");
xGetElementById("multimedia_url").value = url;
xGetElementById("multimedia_caption").value = caption;
xGetElementById("multimedia_width").value = width;
xGetElementById("multimedia_height").value = height;
if(auto_start=="true") xGetElementById("multimedia_auto_start").checked = true;
}
function insertMultimedia(obj) {
if(typeof(opener)=="undefined") return;
var url = xGetElementById("multimedia_url").value;
var caption = xGetElementById("multimedia_caption").value;
var width = xGetElementById("multimedia_width").value;
if(!width) width = 640;
var height = xGetElementById("multimedia_height").value;
if(!height) height= 480;
var auto_start = "false";
if(xGetElementById("multimedia_auto_start").checked) auto_start = "true";
if(!url) {
window.close();
return;
}
var text = "<div editor_component=\"multimedia_link\" class=\"editor_multimedia\" src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;\" auto_start=\""+auto_start+"\">"+caption+"</div>";
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
opener.editorFocus(opener.editorPrevSrl);
window.close();
}
xAddEventListener(window, "load", getMultimedia);