mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 21:29:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@842 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
30278672bc
commit
4ea882e869
143 changed files with 0 additions and 0 deletions
BIN
modules/editor/components/multimedia_link/icon.gif
Normal file
BIN
modules/editor/components/multimedia_link/icon.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
8
modules/editor/components/multimedia_link/info.xml
Normal file
8
modules/editor/components/multimedia_link/info.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component version="0.1">
|
||||
<title xml:lang="ko">멀티미디어 자료 관리</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<description xml:lang="ko">에디터에 wmv,avi,flv등의 멀티미디어 자료를 추가하거나 속성을 수정할 수 있습니다.</description>
|
||||
</author>
|
||||
</component>
|
||||
13
modules/editor/components/multimedia_link/lang/ko.lang.php
Normal file
13
modules/editor/components/multimedia_link/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/multimedia_link/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 멀티미디어 링크 (multimedia_link) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->multimedia_url = "멀티미디어 경로";
|
||||
$lang->multimedia_caption = "설명 입력";
|
||||
$lang->multimedia_width = "가로크기";
|
||||
$lang->multimedia_height = "세로크기";
|
||||
$lang->multimedia_auto_start = "자동시작";
|
||||
?>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
/**
|
||||
* @class multimedia_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 본문에 멀티미디어 자료를 연결하는 컴포넌트
|
||||
**/
|
||||
|
||||
class multimedia_link extends EditorHandler {
|
||||
|
||||
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $upload_target_srl = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief upload_target_srl과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function multimedia_link($upload_target_srl, $component_path) {
|
||||
$this->upload_target_srl = $upload_target_srl;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
require_once("./classes/template/TemplateHandler.class.php");
|
||||
$oTemplate = new TemplateHandler();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
|
||||
$width = $xml_obj->attrs->width;
|
||||
if(!$width) $width = 640;
|
||||
|
||||
$height = $xml_obj->attrs->height;
|
||||
if(!$height) $height = 480;
|
||||
|
||||
$auto_start = $xml_obj->attrs->auto_start;
|
||||
if($auto_start!="true") $auto_start = "false";
|
||||
else $auto_start = "true";
|
||||
|
||||
$caption = $xml_obj->body;
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
|
||||
return sprintf("<div><script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\",%s);</script></div>", $src, $width, $height, $auto_start);
|
||||
}
|
||||
}
|
||||
?>
|
||||
73
modules/editor/components/multimedia_link/tpl/popup.css
Normal file
73
modules/editor/components/multimedia_link/tpl/popup.css
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:400px;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.editor_title {
|
||||
font-size:10pt;
|
||||
font-weight:bold;
|
||||
clear:both;
|
||||
height:20px;
|
||||
background-color:#555555;
|
||||
color:#EFEFEF;
|
||||
vertical-align:middle;
|
||||
padding-top:5px;
|
||||
border-bottom:1px solid #000000;
|
||||
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;
|
||||
height:13px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.multimedia_size {
|
||||
width:40px;
|
||||
height:13px;
|
||||
font-size:9pt;
|
||||
border:1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
.editor_button_area {
|
||||
border-top:1px solid #AAAAAA;
|
||||
text-align:center;
|
||||
background-color:#EEEEEE;
|
||||
padding:0px 0px 2px 0px;
|
||||
clear:both;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
margin-top:4px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #AAAAAA;
|
||||
height:18px;
|
||||
font-size:9pt;
|
||||
}
|
||||
29
modules/editor/components/multimedia_link/tpl/popup.html
Normal file
29
modules/editor/components/multimedia_link/tpl/popup.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
<div class="editor_window">
|
||||
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&act=viewComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
|
||||
|
||||
<div class="header">{$lang->multimedia_url}</div>
|
||||
<div class="body"><input type="text" class="multimedia_url" id="multimedia_url" value="{$manual_url}" /></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>
|
||||
</div>
|
||||
</form>
|
||||
61
modules/editor/components/multimedia_link/tpl/popup.js
Normal file
61
modules/editor/components/multimedia_link/tpl/popup.js
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* 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");
|
||||
if(width!=xWidth(node)) width = xWidth(node);
|
||||
var height = node.getAttribute("height");
|
||||
if(height!=xHeight(node)) height = xHeight(node);
|
||||
var auto_start = node.getAttribute("auto_start");
|
||||
|
||||
xGetElementById("multimedia_url").value = url;
|
||||
xGetElementById("multimedia_caption").value = caption;
|
||||
xGetElementById("multimedia_width").value = width-6;
|
||||
xGetElementById("multimedia_height").value = height-6;
|
||||
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_component_output\" 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue