#313 별도 저장소로 분리

- https://github.com/xpressengine/xe-editor-component-multimedia_link
This commit is contained in:
bnu 2014-01-13 21:03:50 +09:00
parent b6dbfc3edf
commit 9b7b76d21a
11 changed files with 0 additions and 333 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component version="0.2">
<title xml:lang="ko">멀티미디어 링크</title>
<title xml:lang="jp">マルチメディア管理</title>
<title xml:lang="zh-CN">多媒体</title>
<title xml:lang="en">Multimedia Link</title>
<title xml:lang="es">Administrar datos multimedia </title>
<title xml:lang="ru">Управление мультимедиа данными</title>
<title xml:lang="zh-TW">多媒體管理</title>
<title xml:lang="vi">Chèn Media vào bài viết</title>
<title xml:lang="tr">Çoklu Ortam Verisi Yönetme</title>
<description xml:lang="ko">에디터에 wmv,avi,flv등의 멀티미디어 자료를 추가하거나 속성을 수정할 수 있습니다.</description>
<description xml:lang="jp">エディターに拡張子が「wmv,avi,flv」などのマルチメディアコンテンツを追加、または属性の修正ができます。</description>
<description xml:lang="zh-CN">插入wmv,avi,flv等多媒体文件或修改其相应属性 。</description>
<description xml:lang="en">It can add multimedia data like wmv, avi, flv to editor or change the its attributes.</description>
<description xml:lang="es">Se pueden agregar datos multimedia como wmv, avi, flv al editor o cambiar la atribución de datos multimedia.</description>
<description xml:lang="ru">Это может добавить мультимедиа данные как wmv,avi,flv в редактор или изменить параметры данных мультимедиа.</description>
<description xml:lang="zh-TW">可新增 wmv、avi、flv 等多媒體檔案或修改其相關屬性。</description>
<description xml:lang="vi">Chèn Media dạng '.wmv,.avi,.flv,.mp3,.wma' vào bài viết.</description>
<description xml:lang="tr">wmv, avi, flv gibi çoklu ortam dosyalarını editöre ekleyebilir veya çoklu ortam dosyasının niteliğini değiştirebilir.</description>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="tr">NAVER</name>
</author>
</component>

View file

@ -1,80 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<lang>
<item name="multimedia_url">
<value xml:lang="ko"><![CDATA[멀티미디어 경로]]></value>
<value xml:lang="en"><![CDATA[Multimedia Path]]></value>
<value xml:lang="jp"><![CDATA[マルチメディアのパス]]></value>
<value xml:lang="zh-CN"><![CDATA[媒体路径]]></value>
<value xml:lang="zh-TW"><![CDATA[多媒體路徑]]></value>
<value xml:lang="ru"><![CDATA[Путь мультимедиа]]></value>
<value xml:lang="es"><![CDATA[Sendero Multimedia]]></value>
<value xml:lang="tr"><![CDATA[Çoklu Ortam Yolu]]></value>
<value xml:lang="vi"><![CDATA[Đường dẫn Media]]></value>
</item>
<item name="multimedia_caption">
<value xml:lang="ko"><![CDATA[설명 입력]]></value>
<value xml:lang="en"><![CDATA[Enter Description]]></value>
<value xml:lang="jp"><![CDATA[説明入力]]></value>
<value xml:lang="zh-CN"><![CDATA[输入说明]]></value>
<value xml:lang="zh-TW"><![CDATA[輸入說明]]></value>
<value xml:lang="ru"><![CDATA[Введите описание]]></value>
<value xml:lang="es"><![CDATA[Descripcion de Entrada]]></value>
<value xml:lang="tr"><![CDATA[Açıklama Girin]]></value>
<value xml:lang="vi"><![CDATA[Mô tả Media]]></value>
</item>
<item name="multimedia_width">
<value xml:lang="ko"><![CDATA[가로]]></value>
<value xml:lang="en"><![CDATA[Width]]></value>
<value xml:lang="jp"><![CDATA[横幅サイズ]]></value>
<value xml:lang="zh-CN"><![CDATA[宽度]]></value>
<value xml:lang="zh-TW"><![CDATA[寬度]]></value>
<value xml:lang="ru"><![CDATA[Ширина]]></value>
<value xml:lang="es"><![CDATA[Ancho]]></value>
<value xml:lang="tr"><![CDATA[Genişlik]]></value>
<value xml:lang="vi"><![CDATA[Chiều rộng]]></value>
</item>
<item name="multimedia_height">
<value xml:lang="ko"><![CDATA[세로]]></value>
<value xml:lang="en"><![CDATA[Height]]></value>
<value xml:lang="jp"><![CDATA[縦幅サイズ]]></value>
<value xml:lang="zh-CN"><![CDATA[高度]]></value>
<value xml:lang="zh-TW"><![CDATA[高度]]></value>
<value xml:lang="ru"><![CDATA[Высота]]></value>
<value xml:lang="es"><![CDATA[Altura]]></value>
<value xml:lang="tr"><![CDATA[Yükseklik]]></value>
<value xml:lang="vi"><![CDATA[Chiều cao]]></value>
</item>
<item name="multimedia_auto_start">
<value xml:lang="ko"><![CDATA[자동 시작]]></value>
<value xml:lang="en"><![CDATA[Auto Start]]></value>
<value xml:lang="jp"><![CDATA[自動再生]]></value>
<value xml:lang="zh-CN"><![CDATA[自动播放]]></value>
<value xml:lang="zh-TW"><![CDATA[自動播放]]></value>
<value xml:lang="ru"><![CDATA[Автозапуск]]></value>
<value xml:lang="tr"><![CDATA[Otomatik Başlangıç]]></value>
<value xml:lang="vi"><![CDATA[Tự động Play]]></value>
</item>
<item name="multimedia_wmode">
<value xml:lang="ko"><![CDATA[위치]]></value>
<value xml:lang="en"><![CDATA[Position]]></value>
<value xml:lang="jp"><![CDATA[位置]]></value>
</item>
<item name="multimedia_wmode_window">
<value xml:lang="ko"><![CDATA[항상 위]]></value>
<value xml:lang="en"><![CDATA[Always on Top]]></value>
<value xml:lang="jp"><![CDATA[常に上へ]]></value>
<value xml:lang="zh-TW"><![CDATA[總是在上]]></value>
</item>
<item name="multimedia_wmode_opaque">
<value xml:lang="ko"><![CDATA[배경 불투명]]></value>
<value xml:lang="en"><![CDATA[Background opaque]]></value>
<value xml:lang="jp"><![CDATA[不透明背景]]></value>
<value xml:lang="zh-TW"><![CDATA[背景不透明]]></value>
</item>
<item name="multimedia_wmode_transparent">
<value xml:lang="ko"><![CDATA[배경 투명]]></value>
<value xml:lang="en"><![CDATA[Background transparent]]></value>
<value xml:lang="jp"><![CDATA[透明背景]]></value>
<value xml:lang="zh-TW"><![CDATA[透明背景]]></value>
</item>
</lang>

View file

@ -1,75 +0,0 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @class multimedia_link
* @author NAVER (developers@xpressengine.com)
* @brief The components connected to the body of multimedia data
*/
class multimedia_link extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
/**
* @brief editor_sequence and components out of the path
*/
function multimedia_link($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief popup window to display in popup window request is to add content
*/
function getPopupContent()
{
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
Context::set("tpl_path", $tpl_path);
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
/**
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
*
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
*/
function transHTML($xml_obj)
{
$src = $xml_obj->attrs->multimedia_src;
$style = $xml_obj->attrs->style;
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
$width = trim($matches[3][0]);
$height = trim($matches[3][1]);
if(!$width) $width = 400;
if(!$height) $height = 400;
$auto_start = $xml_obj->attrs->auto_start;
if($auto_start!="true") $auto_start = "false";
else $auto_start = "true";
$wmode = $xml_obj->attrs->wmode;
if($wmode == 'window') $wmode = 'window';
else if($wmode == 'opaque') $wmode = 'opaque';
else $wmode = 'transparent';
$caption = $xml_obj->body;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
}
}
/* End of file multimedia_link.class.php */
/* Location: ./modules/editor/components/multimedia_link/multimedia_link.class.php */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,4 +0,0 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
@import url(../../../../../common/css/bootstrap.min.css);

View file

@ -1,60 +0,0 @@
<!--%import("../lang")-->
<!--@if(__DEBUG__)-->
<load target="popup.css" />
<load target="popup.js" />
<!--@else-->
<load target="popup.min.css" />
<load target="popup.min.js" />
<!--@end-->
<section class="section">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onsubmit="return false" id="fo" class="x_form-horizontal">
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_url}</label>
<div class="x_controls">
<input type="text" id="multimedia_url" value="{$manual_url}" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_caption}</label>
<div class="x_controls">
<input type="text" id="multimedia_caption" value="" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_width}</label>
<div class="x_controls">
<input type="text" size="3" id="multimedia_width" value="400" /> px
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_height}</label>
<div class="x_controls">
<input type="text" size="3" id="multimedia_height" value="400" /> px
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_auto_start}</label>
<div class="x_controls">
<input type="checkbox" id="multimedia_auto_start" value="Y" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_wmode}</label>
<div class="x_controls">
<select id="multimedia_wmode">
<option value="window">{$lang->multimedia_wmode_window}</option>
<option value="opaque">{$lang->multimedia_wmode_opaque}</option>
<option value="transparent" selected="selected">{$lang->multimedia_wmode_transparent}</option>
</select>
<p>{$lang->about_ccl_allow_modification}</p>
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="button" id="btn_insert" class="x_btn x_btn-primary">{$lang->cmd_insert}</button>
<a class="x_btn" href="{getUrl('','module','editor','act','dispEditorComponentInfo','component_name',$component_info->component_name)}" target="_blank" onclick="window.open(this.href,'ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a>
</div>
</div>
</form>
</section>

View file

@ -1,77 +0,0 @@
/**
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
* 있으면 가져와서 원하는 곳에 삽입
**/
jQuery(function($){
(function(){
if(!is_def(opener)) return;
var $node = $(opener.editorPrevNode).filter('img'), attrs;
if(!$node.length) return;
attrs = {
url : $node.attr('multimedia_src') || null,
caption : $node.attr('alt') || null,
width : $node.width() || 400,
height : $node.height() || 400,
wmode : $node.attr('wmode') || null
};
$.each(attrs, function(key, val) {
get_by_id('multimedia_'+key).value = val;
});
// auto start?
get_by_id('multimedia_auto_start').checked = ($node.attr('auto_start') == 'true');
})();
$('.btnArea button').click(function(){
if(!is_def(opener)) return;
var el_wmode = get_by_id('fo').elements['multimedia_wmode'];
var attrs = {
alt : encodeURIComponent(get_by_id('multimedia_caption').value),
width : get_by_id('multimedia_width').value || 400,
height : get_by_id('multimedia_height').value || 400,
wmode : el_wmode.value || el_wmode.options[0].value,
auto_start : get_by_id('multimedia_auto_start').checked?'true':'false',
multimedia_src : get_by_id('multimedia_url').value.replace(request_uri, '')
};
if(!attrs['multimedia_src']) {
window.close();
return;
}
var $selected_node = $(opener.editorPrevNode);
if($selected_node.is('img') && $selected_node.attr('editor_component') == 'multimedia_link'){
$selected_node
.attr('multimedia_src', attrs.multimedia_src)
.attr('width', attrs.width)
.attr('height', attrs.height)
.attr('wmode', attrs.wmode)
.attr('auto_start', attrs.auto_start)
.attr('alt', attrs.alt)
.css('width', attrs.width + 'px')
.css('height', attrs.height + 'px')
}else{
var html = '<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';
html = html.replace(/(\w+)=""/g, function(m0,m1) {
return attrs[m1] ? (m1+'="'+attrs[m1]+'"') : '';
});
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, html);
}
opener.editorFocus(opener.editorPrevSrl);
window.close();
});
});

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
jQuery(function(a){!function(){if(is_def(opener)){var b,c=a(opener.editorPrevNode).filter("img");c.length&&(b={url:c.attr("multimedia_src")||null,caption:c.attr("alt")||null,width:c.width()||400,height:c.height()||400,wmode:c.attr("wmode")||null},a.each(b,function(a,b){get_by_id("multimedia_"+a).value=b}),get_by_id("multimedia_auto_start").checked="true"==c.attr("auto_start"))}}(),a(".btnArea button").click(function(){if(is_def(opener)){var b=get_by_id("fo").elements.multimedia_wmode,c={alt:encodeURIComponent(get_by_id("multimedia_caption").value),width:get_by_id("multimedia_width").value||400,height:get_by_id("multimedia_height").value||400,wmode:b.value||b.options[0].value,auto_start:get_by_id("multimedia_auto_start").checked?"true":"false",multimedia_src:get_by_id("multimedia_url").value.replace(request_uri,"")};if(!c.multimedia_src)return window.close(),void 0;var d=a(opener.editorPrevNode);if(d.is("img")&&"multimedia_link"==d.attr("editor_component"))d.attr("multimedia_src",c.multimedia_src).attr("width",c.width).attr("height",c.height).attr("wmode",c.wmode).attr("auto_start",c.auto_start).attr("alt",c.alt).css("width",c.width+"px").css("height",c.height+"px");else{var e='<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+c.width+"px;height:"+c.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';e=e.replace(/(\w+)=""/g,function(a,b){return c[b]?b+'="'+c[b]+'"':""}),opener.editorFocus(opener.editorPrevSrl);var f=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(f,e)}opener.editorFocus(opener.editorPrevSrl),window.close()}})});