mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 11:33:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@805 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
84d0a85ebb
commit
df75151c85
79 changed files with 1972 additions and 1919 deletions
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.colorpicker {
|
||||
width:160px;
|
||||
padding:5px;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.colorpicker {
|
||||
width:160px;
|
||||
padding:5px;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.editor_window {
|
||||
width:300px;
|
||||
text-align:center;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.editor_window {
|
||||
width:400px;
|
||||
background-color:#F3F3F3;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,5 @@
|
|||
</script>
|
||||
|
||||
<div align="{$gallery_info->gallery_align}">
|
||||
<div id='zone_list_gallery_{$gallery_info->srl}' style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color};text-align:left;">
|
||||
</div>
|
||||
<div id='zone_list_gallery_{$gallery_info->srl}' style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color};text-align:left;"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.editor_window {
|
||||
width:550px;
|
||||
text-align:center;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
<!--%import("../lang")-->
|
||||
|
||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
|
||||
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
|
||||
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.slide_gallery_loading_text {
|
||||
color:#555555;
|
||||
font-size:8pt;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<!--%import("../lang")-->
|
||||
<script type='text/javascript'>
|
||||
// 이미지갤러리에 보여줄 이미지 등록
|
||||
//
|
||||
<!--@foreach($gallery_info->image_list as $image)-->
|
||||
slide_gallery_add_image({$gallery_info->srl},'{$image}');
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:500px;
|
||||
text-align:center;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
{$lang->image_align_normal}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="left" id="align_left" />
|
||||
<label for="align_left">
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
{$lang->image_align_left}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="middle" id="align_middle" />
|
||||
<label for="align_middle">
|
||||
|
|
@ -44,6 +46,7 @@
|
|||
{$lang->image_align_middle}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="right" id="align_right" />
|
||||
<label for="align_right">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:400px;
|
||||
clear:both;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:700px;
|
||||
clear:both;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
<!--%import("../lang")-->
|
||||
|
||||
<form action="./" method="get" onSubmit="search_address(); return false;" id="fo">
|
||||
<input type="hidden" id="map_x" name="x" value="" />
|
||||
<input type="hidden" id="map_y" name="x" value="" />
|
||||
<input type="hidden" id="marker" name="marker_1" value="" />
|
||||
<input type="hidden" id="map_x" name="x" value="" />
|
||||
<input type="hidden" id="map_y" name="x" value="" />
|
||||
<input type="hidden" id="marker" name="marker_1" value="" />
|
||||
|
||||
<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>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:555px;
|
||||
text-align:center;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:530px;
|
||||
text-align:center;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
<input type="radio" name="width_unit" id="width_unit_pixel" /><label for="width_unit_pixel">px</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item_area">
|
||||
<div class="header">{$lang->table_cellspacing} :</div>
|
||||
<div class="body"><input type="text" class="table_input" id="cellspacing" value="0" />px</div>
|
||||
|
|
@ -70,6 +71,7 @@
|
|||
printColor("border", "{$tpl_path}/images/blank.gif");
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="editor_color_input">
|
||||
<table border="0" cellspacing="0">
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:400px;
|
||||
clear:both;
|
||||
|
|
|
|||
|
|
@ -37,11 +37,10 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="editor_button_area">
|
||||
<input type="button" class="editor_button" value="{$lang->cmd_insert}" onclick="setText()" />
|
||||
<input type="button" class="editor_button" value="{$lang->cmd_close}" onclick="window.close()" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1">
|
||||
<title xml:lang="ko">위지윅 에디터 </title>
|
||||
<title xml:lang="en">editor</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">위지윅 에디터 출력 및 관리</description>
|
||||
<description xml:lang="en">editor</description>
|
||||
<description xml:lang="ko">위지윅 에디터를 출력하거나 에디터 컴포넌트들을 관리/중계하는 모듈입니다.</description>
|
||||
</author>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -2,16 +2,18 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="adminIndex" type="view" standalone="true" admin_index="true" />
|
||||
<action name="setupComponent" type="view" standalone="true" />
|
||||
<action name="dispPopup" type="view" standalone="true" />
|
||||
<action name="viewComponentInfo" type="view" standalone="true" />
|
||||
<action name="dispEditorPopup" type="view" standalone="true" />
|
||||
<action name="dispEditorComponentInfo" type="view" standalone="true" />
|
||||
|
||||
<action name="procSaveDoc" type="controller" standalone="true" />
|
||||
<action name="procCall" type="controller" standalone="true" />
|
||||
<action name="procEnableComponent" type="controller" standalone="true" />
|
||||
<action name="procDisableComponent" type="controller" standalone="true" />
|
||||
<action name="procMoveListOrder" type="controller" standalone="true" />
|
||||
<action name="procSetupComponent" type="controller" standalone="true" />
|
||||
<action name="dispEditorAdminIndex" type="view" standalone="true" admin_index="true" />
|
||||
<action name="dispEditorAdminSetupComponent" type="view" standalone="true" />
|
||||
|
||||
<action name="procEditorSaveDoc" type="controller" standalone="true" />
|
||||
<action name="procEditorCall" type="controller" standalone="true" />
|
||||
|
||||
<action name="procEditorAdminEnableComponent" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminDisableComponent" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminMoveListOrder" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminSetupComponent" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,14 @@
|
|||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// 에디터 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/cache/editor');
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionFoward('editor', 'view', 'dispEditorAdminIndex');
|
||||
$oModuleController->insertActionFoward('editor', 'view', 'dispEditorAdminSetupComponent');
|
||||
$oModuleController->insertActionFoward('editor', 'controller', 'procEditorAdminEnableComponent');
|
||||
$oModuleController->insertActionFoward('editor', 'controller', 'procEditorAdminDisableComponent');
|
||||
$oModuleController->insertActionFoward('editor', 'controller', 'procEditorAdminMoveListOrder');
|
||||
$oModuleController->insertActionFoward('editor', 'controller', 'procEditorAdminSetupComponent');
|
||||
|
||||
// 기본 에디터 컴포넌트를 추가
|
||||
$oEditorController = &getController('editor');
|
||||
|
|
@ -26,6 +32,9 @@
|
|||
$oEditorController->insertComponent('quotation',true);
|
||||
$oEditorController->insertComponent('table_maker',true);
|
||||
|
||||
// 에디터 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/cache/editor');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
/**
|
||||
* @brief 자동 저장
|
||||
**/
|
||||
function procSaveDoc() {
|
||||
function procEditorSaveDoc() {
|
||||
|
||||
$this->deleteSavedDoc();
|
||||
|
||||
|
|
@ -41,6 +41,120 @@
|
|||
$this->setMessage('msg_auto_saved');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트에서 ajax요청시 해당 컴포넌트의 method를 실행
|
||||
**/
|
||||
function procEditorCall() {
|
||||
$component = Context::get('component');
|
||||
$method = Context::get('method');
|
||||
if(!$component) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component);
|
||||
if(!$oComponent->toBool()) return $oComponent;
|
||||
|
||||
if(!method_exists($oComponent, $method)) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
$output = call_user_method($method, $oComponent);
|
||||
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
|
||||
|
||||
$this->setError($oComponent->getError());
|
||||
$this->setMessage($oComponent->getMessage());
|
||||
|
||||
$vars = $oComponent->getVariables();
|
||||
if(count($vars)) {
|
||||
foreach($vars as $key=>$val) $this->add($key, $val);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 활성화
|
||||
**/
|
||||
function procEditorAdminEnableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'Y';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 비활성화
|
||||
**/
|
||||
function procEditorAdminDisableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'N';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 위치 변경
|
||||
**/
|
||||
function procEditorAdminMoveListOrder() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$mode = Context::get('mode');
|
||||
|
||||
// DB에서 전체 목록 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
foreach($db_list as $key => $val) {
|
||||
if($val->component_name == $args->component_name) break;
|
||||
}
|
||||
|
||||
if($mode=="up") {
|
||||
if($key == 2) return new Object(-1,'msg_component_is_first_order');
|
||||
|
||||
$prev_args->component_name = $db_list[$key-1]->component_name;
|
||||
$prev_args->list_order = $db_list[$key]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $prev_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key-1]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $cur_args);
|
||||
} else {
|
||||
if($key == count($db_list)-1) return new Object(-1,'msg_component_is_last_order');
|
||||
|
||||
$next_args->component_name = $db_list[$key+1]->component_name;
|
||||
$next_args->list_order = $db_list[$key]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $next_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key+1]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $cur_args);
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트 설정
|
||||
**/
|
||||
function procEditorAdminSetupComponent() {
|
||||
$component_name = Context::get('component_name');
|
||||
$extra_vars = Context::getRequestVars();
|
||||
unset($extra_vars->component_name);
|
||||
unset($extra_vars->module);
|
||||
unset($extra_vars->act);
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 자동 저장된 글을 삭제
|
||||
* 현재 접속한 사용자를 기준
|
||||
|
|
@ -79,119 +193,5 @@
|
|||
$output = $oDB->executeQuery('editor.insertComponent', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 활성화
|
||||
**/
|
||||
function procEnableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'Y';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 비활성화
|
||||
**/
|
||||
function procDisableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'N';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 위치 변경
|
||||
**/
|
||||
function procMoveListOrder() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$mode = Context::get('mode');
|
||||
|
||||
// DB에서 전체 목록 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
foreach($db_list as $key => $val) {
|
||||
if($val->component_name == $args->component_name) break;
|
||||
}
|
||||
|
||||
if($mode=="up") {
|
||||
if($key == 2) return new Object(-1,'msg_component_is_first_order');
|
||||
|
||||
$prev_args->component_name = $db_list[$key-1]->component_name;
|
||||
$prev_args->list_order = $db_list[$key]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $prev_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key-1]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $cur_args);
|
||||
} else {
|
||||
if($key == count($db_list)-1) return new Object(-1,'msg_component_is_last_order');
|
||||
|
||||
$next_args->component_name = $db_list[$key+1]->component_name;
|
||||
$next_args->list_order = $db_list[$key]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $next_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key+1]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $cur_args);
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트 설정
|
||||
**/
|
||||
function procSetupComponent() {
|
||||
$component_name = Context::get('component_name');
|
||||
$extra_vars = Context::getRequestVars();
|
||||
unset($extra_vars->component_name);
|
||||
unset($extra_vars->module);
|
||||
unset($extra_vars->act);
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트에서 ajax요청시 해당 컴포넌트의 method를 실행
|
||||
**/
|
||||
function procCall() {
|
||||
$component = Context::get('component');
|
||||
$method = Context::get('method');
|
||||
if(!$component) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component);
|
||||
if(!$oComponent->toBool()) return $oComponent;
|
||||
|
||||
if(!method_exists($oComponent, $method)) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
$output = call_user_method($method, $oComponent);
|
||||
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
|
||||
|
||||
$this->setError($oComponent->getError());
|
||||
$this->setMessage($oComponent->getMessage());
|
||||
|
||||
$vars = $oComponent->getVariables();
|
||||
if(count($vars)) {
|
||||
foreach($vars as $key=>$val) $this->add($key, $val);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,11 +13,59 @@
|
|||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 팝업 출력을 요청을 받는 action
|
||||
**/
|
||||
function dispEditorPopup() {
|
||||
// css 파일 추가
|
||||
Context::addCssFile($this->module_path."tpl/css/editor.css");
|
||||
|
||||
// 변수 정리
|
||||
$upload_target_srl = Context::get('upload_target_srl');
|
||||
$component = Context::get('component');
|
||||
|
||||
// component 객체를 받음
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component, $upload_target_srl);
|
||||
if(!$oComponent->toBool()) {
|
||||
Context::set('message', sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('component_not_founded');
|
||||
} else {
|
||||
|
||||
// 컴포넌트의 popup url을 출력하는 method실행후 결과를 받음
|
||||
$popup_content = $oComponent->getPopupContent();
|
||||
Context::set('popup_content', $popup_content);
|
||||
|
||||
// 레이아웃을 popup_layout으로 설정
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('popup');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴퍼넌트 정보 보기
|
||||
**/
|
||||
function dispEditorComponentInfo() {
|
||||
$component_name = Context::get('component_name');
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name);
|
||||
Context::set('component', $component);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('view_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 설정 페이지
|
||||
* 에디터 컴포넌트의 on/off 및 설정을 담당
|
||||
**/
|
||||
function adminIndex() {
|
||||
function dispEditorAdminIndex() {
|
||||
// 컴포넌트의 종류를 구해옴
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component_list = $oEditorModel->getComponentList(false);
|
||||
|
|
@ -31,7 +79,7 @@
|
|||
/**
|
||||
* @brief 컴퍼넌트 setup
|
||||
**/
|
||||
function setupComponent() {
|
||||
function dispEditorAdminSetupComponent() {
|
||||
$component_name = Context::get('component_name');
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
|
|
@ -43,22 +91,6 @@
|
|||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴퍼넌트 정보 보기
|
||||
**/
|
||||
function viewComponentInfo() {
|
||||
$component_name = Context::get('component_name');
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name);
|
||||
Context::set('component', $component);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('view_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 에디터를 return
|
||||
**/
|
||||
|
|
@ -94,37 +126,5 @@
|
|||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 팝업 출력을 요청을 받는 action
|
||||
**/
|
||||
function dispPopup() {
|
||||
// css 파일 추가
|
||||
Context::addCssFile($this->module_path."tpl/css/editor.css");
|
||||
|
||||
// 변수 정리
|
||||
$upload_target_srl = Context::get('upload_target_srl');
|
||||
$component = Context::get('component');
|
||||
|
||||
// component 객체를 받음
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component, $upload_target_srl);
|
||||
if(!$oComponent->toBool()) {
|
||||
Context::set('message', sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('component_not_founded');
|
||||
} else {
|
||||
|
||||
// 컴포넌트의 popup url을 출력하는 method실행후 결과를 받음
|
||||
$popup_content = $oComponent->getPopupContent();
|
||||
Context::set('popup_content', $popup_content);
|
||||
|
||||
// 레이아웃을 popup_layout으로 설정
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('popup');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<th>{$lang->use}</th>
|
||||
<th colspan="2">{$lang->cmd_move}</th>
|
||||
</tr>
|
||||
|
||||
<!--@foreach($component_list as $component_name => $xml_info)-->
|
||||
<tr>
|
||||
<td rowspan="2">{$xml_info->title}<br />({$component_name})</td>
|
||||
|
|
@ -37,4 +38,5 @@
|
|||
<td colspan="7">{nl2br($xml_info->description)}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@charset "utf-8";
|
||||
|
||||
div.editor_content {
|
||||
margin:3px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
<!-- 에디터 -->
|
||||
<div class="editor_content">
|
||||
|
||||
<div class="editor_area_1">
|
||||
|
||||
<!-- 폰트 종류와 크기 -->
|
||||
<div class="editor_fontbox">
|
||||
<select onChange="editorChangeFontName(this,'{$upload_target_srl}')" id="editor_font_{$upload_target_srl}">
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
<option style="font-family:{$obj}" value="{$obj}">{$obj}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
|
||||
<select onChange="editorChangeFontSize(this,'{$upload_target_srl}')" id="editor_fontsize_{$upload_target_srl}">
|
||||
<option value="" selected>{$lang->edit->fontsize}</option>
|
||||
<option value="1">8pt</option>
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
<option value="6">24pt</option>
|
||||
<option value="7">36pt</option>
|
||||
</select>
|
||||
|
||||
<select onChange="editorChangeHeader(this,'{$upload_target_srl}')" id="editor_header_{$upload_target_srl}">
|
||||
<option value="">{$lang->edit->header}</option>
|
||||
<!--@foreach($lang->edit->header_list as $key=>$obj)-->
|
||||
|
|
@ -100,7 +102,7 @@
|
|||
<div class="editor_uploader_box">
|
||||
|
||||
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
|
||||
<input type="hidden" name="act" value="procUploadFile" />
|
||||
<input type="hidden" name="act" value="procFileUploadFile" />
|
||||
|
||||
<!-- 미리보기 -->
|
||||
<div class="editor_preview_uploaded" id="preview_uploaded_{$upload_target_srl}"><img src="./images/blank.gif" width="100" height="100" alt="preview" /></div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<filter name="setup_component" module="editor" act="procSetupComponent" confirm_msg_code="confirm_submit">
|
||||
<filter name="setup_component" module="editor" act="procEditorAdminSetupComponent" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<parameter />
|
||||
<response>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,21 @@
|
|||
/**
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @version 0.1
|
||||
* @brief 에디터 관리자 페이지용 스크립트
|
||||
**/
|
||||
|
||||
function doEnableComponent(component_name) {
|
||||
var params = new Array();
|
||||
params['component_name'] = component_name;
|
||||
|
||||
exec_xml('editor', 'procEnableComponent', params, completeUpdate);
|
||||
exec_xml('editor', 'procEditorAdminEnableComponent', params, completeUpdate);
|
||||
}
|
||||
|
||||
function doDisableComponent(component_name) {
|
||||
var params = new Array();
|
||||
params['component_name'] = component_name;
|
||||
|
||||
exec_xml('editor', 'procDisableComponent', params, completeUpdate);
|
||||
exec_xml('editor', 'procEditorAdminDisableComponent', params, completeUpdate);
|
||||
}
|
||||
|
||||
function doMoveListOrder(component_name, mode) {
|
||||
|
|
@ -17,7 +23,7 @@ function doMoveListOrder(component_name, mode) {
|
|||
params['component_name'] = component_name;
|
||||
params['mode'] = mode;
|
||||
|
||||
exec_xml('editor', 'procMoveListOrder', params, completeUpdate);
|
||||
exec_xml('editor', 'procEditorAdminMoveListOrder', params, completeUpdate);
|
||||
}
|
||||
|
||||
function completeUpdate(ret_obj) {
|
||||
|
|
@ -26,5 +32,5 @@ function completeUpdate(ret_obj) {
|
|||
}
|
||||
|
||||
function doSetupComponent(component_name) {
|
||||
winopen("./?module=editor&act=setupComponent&component_name="+component_name, "SetupComponent","width=10,height=10,scrollbars=no,resizable=no,toolbars=no");
|
||||
winopen("./?module=editor&act=dispEditorAdminSetupComponent&component_name="+component_name, "SetupComponent","width=10,height=10,scrollbars=no,resizable=no,toolbars=no");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ function editorEventCheck(evt) {
|
|||
// 컴포넌트 팝업 열기
|
||||
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;
|
||||
var popup_url = "./?module=editor&act=dispEditorPopup&upload_target_srl="+upload_target_srl+"&component="+component_name;
|
||||
if(typeof(manual_url)!="undefined" && manual_url) popup_url += "&manual_url="+escape(manual_url);
|
||||
|
||||
winopen(popup_url, 'editorComponent', 'left=10,top=10,width=10,height=10,toolbars=no,scrollbars=no');
|
||||
|
|
@ -396,7 +396,7 @@ function editorSearchComponent(evt) {
|
|||
var upload_target_srl = tobj.getAttribute("upload_target_srl");
|
||||
var plugin = obj.getAttribute("plugin");
|
||||
editorPrevNode = obj;
|
||||
winopen("?module=plugin&act=dispGenerateCodeInPage&selected_plugin="+plugin+"&module_srl="+upload_target_srl,'GenerateCodeInPage','left=10,top10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');
|
||||
winopen("?module=plugin&act=dispPluginGenerateCodeInPage&selected_plugin="+plugin+"&module_srl="+upload_target_srl,'GenerateCodeInPage','left=10,top10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ function editor_upload_form_set(upload_target_srl) {
|
|||
var document_srl = "";
|
||||
if(fo_obj["document_srl"]) document_srl = fo_obj.document_srl.value;
|
||||
|
||||
var url = "./?act=procDeleteFile&upload_target_srl="+upload_target_srl;
|
||||
var url = "./?act=procFileDeleteFile&upload_target_srl="+upload_target_srl;
|
||||
if(module) url+="&module="+module;
|
||||
if(mid) url+="&mid="+mid;
|
||||
if(document_srl) url+="&document_srl="+document_srl;
|
||||
|
|
@ -130,15 +130,19 @@ function editor_preview(sel_obj, upload_target_srl) {
|
|||
// 플래쉬 동영상의 경우
|
||||
if(/\.flv$/i.test(uploaded_filename)) {
|
||||
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=\"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=\"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=\"110\" height=\"110\" />";
|
||||
|
||||
}
|
||||
xInnerHtml(preview_obj, html);
|
||||
}
|
||||
|
|
@ -155,7 +159,7 @@ function editor_remove_file(upload_target_srl) {
|
|||
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=procDeleteFile&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl;
|
||||
var url = "./?mid="+mid+"&act=procFileDeleteFile&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl;
|
||||
|
||||
// iframe에 url을 보내버림
|
||||
var iframe_obj = xGetElementById('tmp_upload_iframe');
|
||||
|
|
@ -177,7 +181,6 @@ function editor_insert_file(upload_target_srl) {
|
|||
|
||||
// 바로 링크 가능한 파일의 경우 (이미지, 플래쉬, 동영상 등..)
|
||||
if(uploaded_filename) {
|
||||
|
||||
// 이미지 파일의 경우 image_link 컴포넌트 열결
|
||||
if(/\.(jpg|jpeg|png|gif)$/i.test(uploaded_filename)) {
|
||||
openComponent("image_link", upload_target_srl, uploaded_filename);
|
||||
|
|
@ -193,7 +196,7 @@ function editor_insert_file(upload_target_srl) {
|
|||
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 = "./?module=file&act=procDownload&file_srl="+file_srl+"&sid="+sid;
|
||||
var url = "./?module=file&act=procFileDownload&file_srl="+file_srl+"&sid="+sid;
|
||||
openComponent("url_link", upload_target_srl, url);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<tr>
|
||||
<th colspan="2">{$lang->component_extra_vars}</th>
|
||||
</tr>
|
||||
|
||||
<!--@foreach($component->extra_vars as $key => $val)-->
|
||||
<tr>
|
||||
<th rowspan="2">{$val->title}</th>
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
<td>{$val->description}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" value="{$lang->cmd_apply}" class="editor_button" />
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<div class="component_view_window">
|
||||
<input type="hidden" name="component_name" value="{$component_name}" />
|
||||
|
||||
<table border="1" width="100%">
|
||||
<tr>
|
||||
<th>{$lang->component_name}</th>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1">
|
||||
<title xml:lang="ko">파일</title>
|
||||
<title xml:lang="en">file</title>
|
||||
<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>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">파일 관리 모듈</description>
|
||||
<description xml:lang="en">file manager</description>
|
||||
<description xml:lang="ko">첨부 파일 관리 모듈</description>
|
||||
</author>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="procDownload" type="model" standalone="true" />
|
||||
<action name="procDeleteChecked" type="controller" standalone="true" />
|
||||
<action name="dispFileAdminList" type="view" admin_index="true" standalone="true" />
|
||||
|
||||
<action name="procFileDownload" type="model" standalone="true" />
|
||||
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@
|
|||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionFoward('file', 'view', 'dispFileAdminList');
|
||||
$oModuleController->insertActionFoward('file', 'controller', 'dispFileDownload');
|
||||
$oModuleController->insertActionFoward('file', 'controller', 'dispFileAdminDeleteChecked');
|
||||
|
||||
// file 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/attach/images');
|
||||
FileHandler::makeDir('./files/attach/binaries');
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@
|
|||
/**
|
||||
* @brief 관리자 페이지에서 선택된 파일들을 삭제
|
||||
**/
|
||||
function procDeleteChecked() {
|
||||
function procFileAdminDeleteChecked() {
|
||||
// 선택된 글이 없으면 오류 표시
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_cart_is_null');
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
/**
|
||||
* @brief 목록 출력 (관리자용)
|
||||
**/
|
||||
function dispList() {
|
||||
function dispFileAdminList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue