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@1540 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
86e8af5b3f
commit
f2e47e336d
37 changed files with 27 additions and 3019 deletions
|
|
@ -17,7 +17,7 @@
|
|||
$oModuleController->insertActionForward('editor', 'view', 'dispEditorAdminSetupComponent');
|
||||
|
||||
// 기본 에디터 컴포넌트를 추가
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent('colorpicker_text',true);
|
||||
$oEditorController->insertComponent('colorpicker_bg',true);
|
||||
$oEditorController->insertComponent('emoticon',true);
|
||||
|
|
|
|||
|
|
@ -66,88 +66,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 활성화
|
||||
**/
|
||||
function procEditorAdminEnableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'Y';
|
||||
$output = 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';
|
||||
$output = 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에서 전체 목록 가져옴
|
||||
$output = 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;
|
||||
executeQuery('editor.updateComponent', $prev_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key-1]->list_order;
|
||||
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;
|
||||
executeQuery('editor.updateComponent', $next_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key+1]->list_order;
|
||||
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);
|
||||
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 자동 저장된 글을 삭제
|
||||
* 현재 접속한 사용자를 기준
|
||||
|
|
@ -163,25 +81,5 @@
|
|||
// 일단 이전 저장본 삭제
|
||||
executeQuery('editor.deleteSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트를 DB에 추가
|
||||
**/
|
||||
function insertComponent($component_name, $enabled = false) {
|
||||
if($enabled) $enabled = 'Y';
|
||||
else $enabled = 'N';
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->enabled = $enabled;
|
||||
|
||||
// 컴포넌트가 있는지 확인
|
||||
$output = executeQuery('editor.isComponentInserted', $args);
|
||||
if($output->data->count) return new Object(-1, 'msg_component_is_not_founded');
|
||||
|
||||
// 입력
|
||||
$args->list_order = getNextSequence();
|
||||
$output = executeQuery('editor.insertComponent', $args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -60,36 +60,5 @@
|
|||
$this->setTemplateFile('view_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 설정 페이지
|
||||
* 에디터 컴포넌트의 on/off 및 설정을 담당
|
||||
**/
|
||||
function dispEditorAdminIndex() {
|
||||
// 컴포넌트의 종류를 구해옴
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component_list = $oEditorModel->getComponentList(false);
|
||||
|
||||
Context::set('component_list', $component_list);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('admin_index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴퍼넌트 setup
|
||||
**/
|
||||
function dispEditorAdminSetupComponent() {
|
||||
$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('setup_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue