mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@659 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ed4637125a
commit
cfa4e9bd30
3 changed files with 37 additions and 4 deletions
|
|
@ -66,10 +66,41 @@
|
|||
/**
|
||||
* @brief 컴포넌트의 위치 변경
|
||||
**/
|
||||
function doMoveListOrder() {
|
||||
function procMoveListOrder() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->mode = Context::get('mode');
|
||||
$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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@
|
|||
|
||||
$lang->msg_component_is_not_founded = '%s 에디터 컴포넌트를 찾을 수 없습니다';
|
||||
$lang->msg_component_is_inserted = '선택하신 컴포넌트는 이미 입력되어 있습니다';
|
||||
$lang->msg_component_is_first_order = '선택하신 컴포넌트는 첫번째에 위치하고 있습니다';
|
||||
$lang->msg_component_is_last_order = '선택하신 컴포넌트는 마지막에 위치하고 있습니다';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<table name="editor_components" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="enabled" var="enabled" default="N" />
|
||||
<column name="extra_vars" var="extra_vars" default="" />
|
||||
<column name="enabled" var="enabled" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="list_order" var="list_order"/>
|
||||
</columns>
|
||||
<conditions>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue