mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@564 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6e6856e1eb
commit
ca67eeea6e
19 changed files with 113 additions and 376 deletions
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class colorpicker_bg
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 글자 배경색을 지정하는 컴포넌트
|
||||
**/
|
||||
|
||||
class colorpicker_bg extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=colorpicker_bg', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class colorpicker_text
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 글자색 변경하는 컴포넌트
|
||||
**/
|
||||
|
||||
class colorpicker_text extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=colorpicker_text', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class emoticon
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 이모티콘 이미지 연결 컴포넌트
|
||||
**/
|
||||
|
||||
class emoticon extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=emoticon', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class html_editor
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 직접 html code를 수정할 수 있는 컴포넌트
|
||||
**/
|
||||
|
||||
class html_editor extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=html_editor', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class image_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 이미지를 추가하거나 속성을 수정하는 컴포넌트
|
||||
**/
|
||||
|
||||
class image_link extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=image_link', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="editor_title">{$lang->imagelink}</div>
|
||||
|
||||
<div class="header">{$lang->image_url}</div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_url" value="" onblur="getImageScale();" /></div>
|
||||
<div class="body"><input type="text" class="image_url" id="image_url" value="{$manual_url}" onblur="getImageScale();" /></div>
|
||||
|
||||
<div class="header">{$lang->image_scale}</div>
|
||||
<div class="body">
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ function getImage() {
|
|||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var node = opener.editorPrevNode;
|
||||
if(!node || node.nodeName != "IMG") return;
|
||||
if(!node || node.nodeName != "IMG") {
|
||||
getImageScale();
|
||||
return;
|
||||
}
|
||||
var src = node.getAttribute("src");
|
||||
var border = node.getAttribute("border");
|
||||
var align = node.getAttribute("align");
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class multimedia_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 본문에 멀티미디어 자료를 연결하는 컴포넌트
|
||||
**/
|
||||
|
||||
class multimedia_link extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=multimedia_link', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="editor_title">{$lang->multimedia}</div>
|
||||
|
||||
<div class="header">{$lang->multimedia_url}</div>
|
||||
<div class="body"><input type="text" class="multimedia_url" id="multimedia_url" value="" /></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>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class quotation
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 인용문 기능 제공. 단순 팝업.
|
||||
* @brief 에디터에서 인용문 기능 제공.
|
||||
**/
|
||||
|
||||
class quotation extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=quotation', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div class="body"><textarea name="text" class="editor_textarea"></textarea></div>
|
||||
|
||||
<div class="header">{$lang->urllink_url}</div>
|
||||
<div class="body"><input type="text" name="url" class="editor_input" value=""/></div>
|
||||
<div class="body"><input type="text" name="url" class="editor_input" value="{$manual_url}"/></div>
|
||||
|
||||
<div class="header">{$lang->urllink_open_window}</div>
|
||||
<div class="body"><input type="checkbox" name="open_window" value="Y" id="editor_open_window" /> <label for="editor_open_window">{$lang->about_url_link_open_window}</label></div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class url_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
|
||||
* @brief 에디터에서 url링크하는 기능 제공.
|
||||
**/
|
||||
|
||||
class url_link extends EditorHandler {
|
||||
|
|
@ -20,22 +20,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다.
|
||||
* execute의 경우 2가지 경우가 생긴다.
|
||||
* 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데
|
||||
* popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다
|
||||
**/
|
||||
function execute() {
|
||||
|
||||
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=url_link', $this->upload_target_srl);
|
||||
|
||||
$this->add('tpl', '');
|
||||
$this->add('open_window', 'Y');
|
||||
$this->add('popup_url', $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispComponent" type="view" standalone="true" />
|
||||
<action name="dispPopup" type="view" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -40,35 +40,14 @@
|
|||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트 실행하여 결과 return
|
||||
**/
|
||||
function dispComponent() {
|
||||
// 변수 정리
|
||||
$component = Context::get('component');
|
||||
$upload_target_srl = Context::get('upload_target_srl');
|
||||
|
||||
// component 객체를 받음
|
||||
$oComponent = &$this->getComponentObject($component, $upload_target_srl);
|
||||
if(!$oComponent->toBool()) return $oComponent;
|
||||
|
||||
// 컴포넌트 실행
|
||||
$oComponent->execute();
|
||||
|
||||
$this->add('component', $component);
|
||||
$this->add('upload_target_srl', $upload_target_srl);
|
||||
$this->add('tpl', $oComponent->get('tpl'));
|
||||
$this->add('open_window', $oComponent->get('open_window'));
|
||||
$this->add('popup_url', $oComponent->get('popup_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 팝업 출력을 요청을 받는 action
|
||||
**/
|
||||
function dispPopup() {
|
||||
// 변수 정리
|
||||
$component = Context::get('component');
|
||||
$upload_target_srl = Context::get('upload_target_srl');
|
||||
$component = Context::get('component');
|
||||
$manual_url = Context::get('manual_url');
|
||||
|
||||
// component 객체를 받음
|
||||
$oComponent = &$this->getComponentObject($component, $upload_target_srl);
|
||||
|
|
|
|||
|
|
@ -68,125 +68,58 @@ div.editor_drag_down_area {
|
|||
margin-top:10px;
|
||||
}
|
||||
|
||||
.editor_pop_body {
|
||||
padding:4px 4px 4px 4px;
|
||||
margin:0px;
|
||||
border:0px;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
.editor_window {
|
||||
background-color : #EFEFEF;
|
||||
}
|
||||
|
||||
textarea.editor_small_textarea {
|
||||
font-family:tahoma;
|
||||
border : 1px solid #CCCCCC;
|
||||
background-color : #FFFFFF;
|
||||
font-size : 8pt;
|
||||
width:99%;
|
||||
height:100px;
|
||||
}
|
||||
|
||||
textarea.editor_textarea {
|
||||
font-family:tahoma;
|
||||
border : 1px solid #CCCCCC;
|
||||
background-color : #FFFFFF;
|
||||
font-size : 8pt;
|
||||
width:100%;
|
||||
height:450px;
|
||||
}
|
||||
|
||||
input.editor_submit {
|
||||
border : 1px solid #555555;
|
||||
background-color : #AAAAAA;
|
||||
color : #000000;
|
||||
font-weight:bold;
|
||||
font-family:verdana;
|
||||
width : 100%;
|
||||
height : 20px;
|
||||
font-size : 8pt;
|
||||
}
|
||||
|
||||
div.quotation_box {
|
||||
font-size:8pt;
|
||||
font-family:tahoma;
|
||||
margin-bottom:8px;
|
||||
padding-bottom:5px;
|
||||
border-bottom:1px dotted #AAAAAA;
|
||||
}
|
||||
|
||||
#quotation th { width:80px; font-size:8pt; font-family:tahoma; }
|
||||
|
||||
img.color_icon {
|
||||
width:15px;
|
||||
height:15px;
|
||||
border:1px solid #FFFFFF;
|
||||
}
|
||||
|
||||
img.color_icon_over {
|
||||
width:15px;
|
||||
height:15px;
|
||||
border:1px solid #000000;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
td.editor_field {
|
||||
font-family:tahoma;
|
||||
font-size:8pt;
|
||||
font-weight:bold;
|
||||
background-color : #CCCCCC;
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
input.editor_input {
|
||||
font-family:tahoma;
|
||||
border : 1px solid #CCCCCC;
|
||||
background-color : #FFFFFF;
|
||||
width : 330px;
|
||||
height : 18px;
|
||||
padding : 1px;
|
||||
font-size : 8pt;
|
||||
}
|
||||
|
||||
.editor_uploader_box {
|
||||
margin:10px 0px 0px 0px;
|
||||
border:0px;
|
||||
margin:10px 0px 0px 5px;
|
||||
border:0;
|
||||
padding:0px;
|
||||
clear:both;
|
||||
height:130px;
|
||||
}
|
||||
|
||||
.editor_preview_uploaded {
|
||||
float:left;
|
||||
width:110px;
|
||||
height:110px;
|
||||
padding:5px;
|
||||
border:1px solid #AAAAAA;
|
||||
margin-right:10px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.editor_uploader {
|
||||
margin-right:10px;
|
||||
padding-right:5px;
|
||||
border-right:1px dotted #AAAAAA;
|
||||
width:255px;
|
||||
float:left;
|
||||
width:300px;
|
||||
height:120px;
|
||||
margin-right:10px;
|
||||
padding-right:10px;
|
||||
border-right:1px dotted #AAAAAA;
|
||||
}
|
||||
|
||||
.uploaded_file_list {
|
||||
width:250px;
|
||||
height:120px;
|
||||
width:100%;
|
||||
height:122px;
|
||||
border:1px solid #AAAAAA;
|
||||
}
|
||||
|
||||
.editor_component {
|
||||
.editor_uploader_input_area {
|
||||
width:150px;
|
||||
float:left;
|
||||
clear:right;
|
||||
}
|
||||
|
||||
.uploaded_file_preview_box {
|
||||
border:1px solid #EEEEEE;
|
||||
width:120px;
|
||||
height:120px;
|
||||
float:left;
|
||||
margin-right:10px;
|
||||
.editor_uploader_file_input {
|
||||
display:none;
|
||||
height:18px;
|
||||
border:1px solid #AAAAAA;
|
||||
background-color:#FFFFFF;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.editor_align_icon {
|
||||
margin:0px 0px 6px 5px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.editor_align_icon img {
|
||||
vertical-align:middle;
|
||||
cursor:pointer;
|
||||
.editor_uploader_input {
|
||||
display:block;
|
||||
width:90px;
|
||||
height:18px;
|
||||
border:1px solid #AAAAAA;
|
||||
background-color:#FFFFFF;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,40 +83,23 @@
|
|||
editor_upload_init("{$upload_target_srl}");
|
||||
</script>
|
||||
|
||||
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
|
||||
<input type="hidden" name="act" value="procUploadFile" />
|
||||
|
||||
<div class="editor_uploader_box">
|
||||
|
||||
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
|
||||
<input type="hidden" name="act" value="procUploadFile" />
|
||||
|
||||
<!-- 미리보기 -->
|
||||
<div class="editor_preview_uploaded" id="preview_uploaded_{$upload_target_srl}"><img src="./images/blank.gif" width="100" height="100" alt="preview" /></div>
|
||||
|
||||
<!-- 파일 업로드 영역 -->
|
||||
<div class="editor_uploader">
|
||||
<select id='uploaded_file_list_{$upload_target_srl}' size='9' class="uploaded_file_list" onclick="editor_preview(this, '{$upload_target_srl}')"></select><br />
|
||||
<input type="file" name="file" onchange="editor_file_upload(this, '{$upload_target_srl}')" value="{$lang->edit->upload}" /><br />
|
||||
<input type="button" value="{$lang->edit->delete_selected}" onclick="editor_remove_file('{$upload_target_srl}');return false;" />
|
||||
<input type="button" value="{$lang->edit->link_selected}" onclick="editor_insert_file('{$upload_target_srl}');return false;" />
|
||||
<select id='uploaded_file_list_{$upload_target_srl}' size='9' class="uploaded_file_list" onclick="editor_preview(this, '{$upload_target_srl}')"></select>
|
||||
</div>
|
||||
|
||||
<!-- 컴포넌트 노출 영역 -->
|
||||
<div id="editor_component_area_{$upload_target_srl}" class="editor_component">
|
||||
<div id="uploaded_file_preview_box_{$upload_target_srl}" class="uploaded_file_preview_box"></div>
|
||||
<div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_article.gif" border="0" onclick="editor_insert_file('{$upload_target_srl}', '');" alt="{$lang->edit->icon_align_article}"/>
|
||||
{$lang->edit->icon_align_article}
|
||||
</div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_left.gif" border="0" onclick="editor_insert_file('{$upload_target_srl}', 'left');" alt="{$lang->edit->icon_align_left}"/>
|
||||
{$lang->edit->icon_align_left}
|
||||
</div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_middle.gif" border="0" onclick="editor_insert_file('{$upload_target_srl}', 'middle');" alt="{$lang->edit->icon_align_middle}"/>
|
||||
{$lang->edit->icon_align_middle}
|
||||
</div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_right.gif" border="0" onclick="editor_insert_file('{$upload_target_srl}', 'right');" alt="{$lang->edit->icon_align_right}"/>
|
||||
{$lang->edit->icon_align_right}
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor_uploader_input_area">
|
||||
<input type="button" value="{$lang->edit->upload_file}" class="editor_uploader_input" onclick="editor_remove_file('{$upload_target_srl}');return false;" />
|
||||
<input type="button" value="{$lang->edit->delete_selected}" class="editor_uploader_input" onclick="editor_remove_file('{$upload_target_srl}');return false;" />
|
||||
<input type="button" value="{$lang->edit->link_file}" class="editor_uploader_input" onclick="editor_insert_file('{$upload_target_srl}');return false;" />
|
||||
<input type="file" size="1" name="file" id="file_uploader_{$upload_target_srl}" class="editor_uploader_file_input" onchange="editor_file_upload(this, '{$upload_target_srl}')" value="{$lang->edit->upload}" />
|
||||
</div>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -262,38 +262,20 @@ function editorEventCheck(evt) {
|
|||
|
||||
// 추가 컴포넌트의 경우 서버에 요청을 시도
|
||||
default :
|
||||
editorPrevSrl = upload_target_srl;
|
||||
|
||||
var params = new Array();
|
||||
params['component'] = component_name;
|
||||
params['upload_target_srl'] = upload_target_srl;
|
||||
|
||||
var response_tags = new Array('error', 'message', 'component', 'upload_target_srl', 'tpl', 'open_window', 'popup_url');
|
||||
exec_xml('editor', 'dispComponent', params, editorProcComponent, response_tags, editor_form_list[upload_target_srl]);
|
||||
openComponent(component_name, upload_target_srl);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// 컴포넌트 요청 후 결과를 처리할 함수
|
||||
function editorProcComponent(ret_obj, response_tags) {
|
||||
var upload_target_srl = ret_obj['upload_target_srl'];
|
||||
var tpl = ret_obj['tpl'];
|
||||
var open_window = ret_obj['open_window'];
|
||||
var popup_url = ret_obj['popup_url'];
|
||||
// 컴포넌트 팝업 열기
|
||||
function openComponent(component_name, upload_target_srl, manual_url) {
|
||||
editorPrevSrl = upload_target_srl;
|
||||
var popup_url = "./?module=editor&act=dispPopup&upload_target_srl="+upload_target_srl+"&component="+component_name;
|
||||
if(typeof(manual_url)!="undefined" && manual_url) popup_url += "&manual_url="+escape(manual_url);
|
||||
|
||||
// 컴포넌트의 동작이 새창 열기 일 경우
|
||||
if(open_window == 'Y') {
|
||||
var win_left = 10;
|
||||
var win_top = 10;
|
||||
winopen(popup_url, 'editorComponent', 'left='+win_left+',top='+win_top+',width=10,height=10,toolbars=no,scrollbars=no');
|
||||
|
||||
// 새창 열기가 아니면 정해진 영역에 innerHTML로 tpl 입력
|
||||
} else {
|
||||
var zone = xGetElementById("editor_component_area_"+upload_target_srl);
|
||||
xInnerHtml(zone, tpl);
|
||||
}
|
||||
winopen(popup_url, 'editorComponent', 'left=10,top=10,width=10,height=10,toolbars=no,scrollbars=no');
|
||||
}
|
||||
|
||||
// 본문내에 포함된 컴포넌트를 찾는 함수 (더블클릭시)
|
||||
|
|
@ -348,14 +330,7 @@ function editorSearchComponent(evt) {
|
|||
var upload_target_srl = tobj.getAttribute("upload_target_srl");
|
||||
|
||||
// 해당 컴포넌트를 찾아서 실행
|
||||
editorPrevSrl = upload_target_srl;
|
||||
|
||||
var params = new Array();
|
||||
params['component'] = editor_component;
|
||||
params['upload_target_srl'] = upload_target_srl;
|
||||
|
||||
var response_tags = new Array('error', 'message', 'component', 'upload_target_srl', 'tpl', 'open_window', 'popup_url');
|
||||
exec_xml('editor', 'dispComponent', params, editorProcComponent, response_tags, editor_form_list[upload_target_srl]);
|
||||
openComponent(editor_component, upload_target_srl);
|
||||
}
|
||||
|
||||
// focus
|
||||
|
|
|
|||
|
|
@ -13,6 +13,20 @@ function editor_upload_init(upload_target_srl) {
|
|||
|
||||
// upload_target_srl에 해당하는 form의 action을 iframe으로 변경
|
||||
function editor_upload_form_set(upload_target_srl) {
|
||||
// input type=file의 위치 및 설정 변경
|
||||
var uploader = xGetElementById("file_uploader_"+upload_target_srl);
|
||||
|
||||
if(xIE4Up) {
|
||||
xLeft(uploader, -40);
|
||||
xTop(uploader, -85);
|
||||
uploader.style.filter = "alpha(opacity=0)";
|
||||
} else {
|
||||
xLeft(uploader, -15);
|
||||
xTop(uploader, -85);
|
||||
uploader.style.opacity = 0;
|
||||
}
|
||||
uploader.style.display = "block";
|
||||
|
||||
// 업로드용 iframe을 생성
|
||||
if(!xGetElementById('tmp_upload_iframe')) {
|
||||
if(xIE4Up) {
|
||||
|
|
@ -104,7 +118,7 @@ function editor_preview(sel_obj, upload_target_srl) {
|
|||
var obj = uploaded_files[file_srl];
|
||||
if(typeof(obj)=='undefined'||!obj) return;
|
||||
var uploaded_filename = obj.uploaded_filename;
|
||||
var preview_obj = xGetElementById('uploaded_file_preview_box_'+upload_target_srl);
|
||||
var preview_obj = xGetElementById('preview_uploaded_'+upload_target_srl);
|
||||
|
||||
if(!uploaded_filename) {
|
||||
xInnerHtml(preview_obj, '');
|
||||
|
|
@ -115,16 +129,16 @@ function editor_preview(sel_obj, upload_target_srl) {
|
|||
|
||||
// 플래쉬 동영상의 경우
|
||||
if(/\.flv$/i.test(uploaded_filename)) {
|
||||
html = "<EMBED src=\""+editor_path+"component/flvplayer/flvplayer.swf?autoStart=true&file="+uploaded_filename+"\" width=\"120\" height=\"120\" type=\"application/x-shockwave-flash\"></EMBED>";
|
||||
html = "<EMBED src=\"./common/tpl/images/flvplayer.swf?autoStart=false&file="+uploaded_filename+"\" width=\"110\" height=\"110\" type=\"application/x-shockwave-flash\"></EMBED>";
|
||||
// 플래쉬 파일의 경우
|
||||
} else if(/\.swf$/i.test(uploaded_filename)) {
|
||||
html = "<EMBED src=\""+uploaded_filename+"\" width=\"120\" height=\"120\" type=\"application/x-shockwave-flash\"></EMBED>";
|
||||
html = "<EMBED src=\""+uploaded_filename+"\" width=\"110\" height=\"110\" type=\"application/x-shockwave-flash\"></EMBED>";
|
||||
// wmv, avi, mpg, mpeg등의 동영상 파일의 경우
|
||||
} else if(/\.(wmv|avi|mpg|mpeg|asx|asf|mp3)$/i.test(uploaded_filename)) {
|
||||
html = "<EMBED src=\""+uploaded_filename+"\" width=\"120\" height=\"120\" autostart=\"true\" Showcontrols=\"0\"></EMBED>";
|
||||
html = "<EMBED src=\""+uploaded_filename+"\" width=\"110\" height=\"110\" autostart=\"true\" Showcontrols=\"0\"></EMBED>";
|
||||
// 이미지 파일의 경우
|
||||
} else if(/\.(jpg|jpeg|png|gif)$/i.test(uploaded_filename)) {
|
||||
html = "<img src=\""+uploaded_filename+"\" border=\"0\" width=\"120\" height=\"120\" />";
|
||||
html = "<img src=\""+uploaded_filename+"\" border=\"0\" width=\"110\" height=\"110\" />";
|
||||
}
|
||||
xInnerHtml(preview_obj, html);
|
||||
}
|
||||
|
|
@ -151,7 +165,7 @@ function editor_remove_file(upload_target_srl) {
|
|||
}
|
||||
|
||||
// 업로드 목록의 선택된 파일을 내용에 추가
|
||||
function editor_insert_file(upload_target_srl, align) {
|
||||
function editor_insert_file(upload_target_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+upload_target_srl);
|
||||
if(obj.options.length<1) return;
|
||||
var file_srl = obj.options[obj.selectedIndex].value;
|
||||
|
|
@ -160,58 +174,28 @@ function editor_insert_file(upload_target_srl, align) {
|
|||
var filename = file_obj.filename;
|
||||
var sid = file_obj.sid;
|
||||
var uploaded_filename = file_obj.uploaded_filename;
|
||||
editorPrevSrl = upload_target_srl;
|
||||
|
||||
// 바로 링크 가능한 파일의 경우 (이미지, 플래쉬, 동영상 등..)
|
||||
if(uploaded_filename && typeof(align)!='undefined') {
|
||||
if(uploaded_filename) {
|
||||
|
||||
var type = "";
|
||||
|
||||
// 이미지 파일의 경우
|
||||
// 이미지 파일의 경우 image_link 컴포넌트 열결
|
||||
if(/\.(jpg|jpeg|png|gif)$/i.test(uploaded_filename)) {
|
||||
openComponent("image_link", upload_target_srl, uploaded_filename);
|
||||
|
||||
editorFocus(editorPrevSrl);
|
||||
|
||||
var html = "<img src=\""+uploaded_filename+"\" border=\"0\" alt=\""+filename+"\" ";
|
||||
if(typeof(align)!='undefined'&&align) html += " align=\""+align+"\"";
|
||||
html += " />"
|
||||
var obj = editorGetIFrame(editorPrevSrl);
|
||||
editorReplaceHTML(obj, html);
|
||||
|
||||
// 이미지외의 경우는 대체 이미지를 넣음
|
||||
// 이미지외의 경우는 multimedia_link 컴포넌트 연결
|
||||
} else {
|
||||
// 플래쉬 동영상의 경우
|
||||
if(/\.flv$/i.test(uploaded_filename)) {
|
||||
type = "flv";
|
||||
uploaded_filename = editor_path+"component/flvplayer/flvplayer.swf?autoStart=true&file="+uploaded_filename;
|
||||
// 플래쉬 파일의 경우
|
||||
} else if(/\.swf$/i.test(uploaded_filename)) {
|
||||
type = "swf";
|
||||
// wmv, avi, mpg, mpeg등의 동영상 파일의 경우
|
||||
} else if(/\.(wmv|avi|mpg|mpeg)$/i.test(uploaded_filename)) {
|
||||
type = "multimedia";
|
||||
}
|
||||
|
||||
var alt = "align="+align+"|@|src="+uploaded_filename+"|@|type="+type;
|
||||
var html = "<img src=\""+editor_path+"images/blank.gif\" style=\"width:400px;height:300px;\" alt=\""+alt+"\" class=\"editor_multimedia\"/>";
|
||||
|
||||
var iframe_obj = editorGetIFrame(editorPrevSrl);
|
||||
editorReplaceHTML(iframe_obj, html);
|
||||
openComponent("multimedia_link", upload_target_srl, uploaded_filename);
|
||||
}
|
||||
|
||||
// binary파일의 경우 다운로드 링크를 추가
|
||||
// binary파일의 경우 url_link 컴포넌트 연결
|
||||
} else {
|
||||
var fo_obj = obj;
|
||||
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
|
||||
var mid = fo_obj.mid.value;
|
||||
var upload_target_srl = fo_obj.upload_target_srl.value;
|
||||
var url = "./?mid="+mid+"&act=procDownload&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl+"&sid="+sid;
|
||||
|
||||
var x = (screen.availWidth - 400)/2;
|
||||
var y = (screen.availHeight - 220)/2;
|
||||
winopen(editor_path+"popup/add_url.php?title="+escape(filename)+"&url="+escape(url),"_editorPopup","top="+y+",left="+x+",width=400,height=220,resizable=no,toolbars=no,scrollbars=no");
|
||||
var url = "./?mid="+mid+"&act=procDownloadFile&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl+"&sid="+sid;
|
||||
openComponent("url_link", upload_target_srl, url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@
|
|||
BR태그가 적용됩니다.";
|
||||
|
||||
$lang->edit->upload = '첨부';
|
||||
$lang->edit->link_selected = '다운로드 링크 추가';
|
||||
$lang->edit->delete_selected = '선택파일 삭제';
|
||||
$lang->edit->upload_file = '파일 첨부';
|
||||
$lang->edit->link_file = '본문 삽입';
|
||||
$lang->edit->delete_selected = '선택 삭제';
|
||||
|
||||
$lang->edit->icon_align_article = '한 문단을 차지';
|
||||
$lang->edit->icon_align_left = '글의 왼쪽으로';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue