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@661 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7472e1165f
commit
062bca7301
10 changed files with 116 additions and 2 deletions
|
|
@ -44,6 +44,7 @@
|
|||
$lang->cmd_close = "닫기";
|
||||
$lang->cmd_open = "열기";
|
||||
$lang->cmd_setup = "설정";
|
||||
$lang->cmd_apply = "적용";
|
||||
$lang->cmd_remake_cache = "캐시파일 재생성";
|
||||
|
||||
$lang->enable = '가능';
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<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="procCall" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -85,6 +85,33 @@
|
|||
return $component_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief compnent의 xml+db정보를 구함
|
||||
**/
|
||||
function getComponent($component_name) {
|
||||
$args->component_name = $component_name;
|
||||
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getComponent', $args);
|
||||
$component = $output->data;
|
||||
|
||||
$component_name = $component->component_name;
|
||||
|
||||
unset($xml_info);
|
||||
$xml_info = $this->getComponentXmlInfo($component_name);
|
||||
$xml_info->enabled = $component->enabled;
|
||||
|
||||
if($component->extra_vars) {
|
||||
$extra_vars = unserialize($component->extra_vars);
|
||||
foreach($xml_info->extra_vars as $key => $val) {
|
||||
$xml_info->extra_vars->{$key}->value = $extra_vars->{$key};
|
||||
}
|
||||
}
|
||||
|
||||
return $xml_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief component의 xml정보를 읽음
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -28,6 +28,22 @@
|
|||
$this->setTemplateFile('admin_index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴퍼넌트 setup
|
||||
**/
|
||||
function setupComponent() {
|
||||
$component_name = Context::get('component_name');
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name);
|
||||
debugPrint($component);
|
||||
Context::set('component', $component);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('setup_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터를 return
|
||||
**/
|
||||
|
|
@ -40,7 +56,6 @@
|
|||
if(!Context::get('component_list')) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component_list = $oEditorModel->getComponentList();
|
||||
debugPrint($component_list);
|
||||
Context::set('component_list', $component_list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
$lang->component_link = "링크";
|
||||
$lang->component_date = "제작일";
|
||||
$lang->component_description = "설명";
|
||||
$lang->component_extra_vars = "설정 변수";
|
||||
|
||||
$lang->msg_component_is_not_founded = '%s 에디터 컴포넌트를 찾을 수 없습니다';
|
||||
$lang->msg_component_is_inserted = '선택하신 컴포넌트는 이미 입력되어 있습니다';
|
||||
|
|
|
|||
11
modules/editor/queries/getComponent.xml
Normal file
11
modules/editor/queries/getComponent.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getComponent" action="select">
|
||||
<tables>
|
||||
<table name="editor_components" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="component_name" var="component_name" notnull="notnull"/>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<td>{$xml_info->author->date}</td>
|
||||
<td>
|
||||
<!--@if($xml_info->extra_vars)-->
|
||||
<a href="#">{$lang->cmd_setup}</a>
|
||||
<a href="#" onclick="doSetupComponent('{$component_name}'); return false;">{$lang->cmd_setup}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -122,3 +122,21 @@ div.editor_drag_down_area {
|
|||
background-color:#FFFFFF;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
.component_setup_window {
|
||||
width:800px;
|
||||
}
|
||||
|
||||
.editor_input {
|
||||
border:1px solid #AAAAAA;
|
||||
height:14px;
|
||||
font-size:9pt;
|
||||
width:200px;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
border:1px solid #AAAAAA;
|
||||
background-color:#FFFFFF;
|
||||
height:17px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,3 +24,7 @@ function completeUpdate(ret_obj) {
|
|||
alert(ret_obj['message']);
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
function doSetupComponent(component_name) {
|
||||
winopen("./?module=editor&act=setupComponent&component_name="+component_name, "SetupComponent","width=10,height=10,scrollbars=no,resizable=no,toolbars=no");
|
||||
}
|
||||
|
|
|
|||
36
modules/editor/tpl/setup_component.html
Normal file
36
modules/editor/tpl/setup_component.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!--%import("css/editor.css")-->
|
||||
|
||||
<div class="component_setup_window">
|
||||
<table border="1" width="100%">
|
||||
<tr>
|
||||
<th>{$lang->component_name}</th>
|
||||
<td>{$component->component_name} ver. {$component->version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->component_author}</th>
|
||||
<td>{$component->author->name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->component_link}</th>
|
||||
<td><a href="#" onclick="winopen('{$component->author->link}');return false;">{$component->author->link}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">{$lang->component_extra_vars}</th>
|
||||
</tr>
|
||||
<!--@foreach($component->extra_vars as $key => $val)-->
|
||||
<tr>
|
||||
<th rowspan="2">{$val->title}</th>
|
||||
<td><input type="text" name="{$key}" value="{$val->value}" class="editor_input" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$val->description}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" value="{$lang->cmd_apply}" class="editor_button" />
|
||||
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue