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@657 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b0521ae3f1
commit
749dc4a9ab
6 changed files with 54 additions and 6 deletions
|
|
@ -15,7 +15,7 @@ function exec_xml(module, act, params, callback_func, response_tags, callback_fu
|
|||
oXml.addParam("module", module);
|
||||
oXml.addParam("act", act);
|
||||
|
||||
if(typeof(response_tags)=="undefined") response_tags = new Array();
|
||||
if(typeof(response_tags)=="undefined") response_tags = new Array('error','message');
|
||||
response_tags[response_tags.length] = "redirect_url";
|
||||
|
||||
var waiting_obj = document.getElementById("waitingforserverresponse");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
<actions>
|
||||
<action name="adminIndex" type="view" standalone="true" admin_index="true" />
|
||||
<action name="dispPopup" type="view" standalone="true" />
|
||||
|
||||
<action name="procCall" type="controller" standalone="true" />
|
||||
<action name="procEnableComponent" type="controller" standalone="true" />
|
||||
<action name="procDisableComponent" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,33 @@
|
|||
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 컴포넌트에서 ajax요청시 해당 컴포넌트의 method를 실행
|
||||
|
|
@ -60,8 +87,6 @@
|
|||
if(count($vars)) {
|
||||
foreach($vars as $key=>$val) $this->add($key, $val);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="enabled" var="enabled" default="N" />
|
||||
<column name="extra_vars" var="extra_vars" default="N" />
|
||||
<column name="extra_vars" var="extra_vars" default="" />
|
||||
<column name="list_order" var="list_order"/>
|
||||
</columns>
|
||||
<conditions>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<!--%import("js/admin.js")-->
|
||||
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>{$lang->component_name}</th>
|
||||
|
|
@ -23,9 +25,9 @@
|
|||
</td>
|
||||
<td>
|
||||
<!--@if($xml_info->enabled=='Y')-->
|
||||
<a href="#">{$lang->notuse}</a>
|
||||
<a href="#" onclick="doDisableComponent('{$component_name}');return false;">{$lang->notuse}</a>
|
||||
<!--@else-->
|
||||
<a href="#">{$lang->use}</a>
|
||||
<a href="#" onclick="doEnableComponent('{$component_name}');return false;">{$lang->use}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td><a href="#">{$lang->cmd_move_up}</a></td>
|
||||
|
|
|
|||
18
modules/editor/tpl/js/admin.js
Normal file
18
modules/editor/tpl/js/admin.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
function doEnableComponent(component_name) {
|
||||
var params = new Array();
|
||||
params['component_name'] = component_name;
|
||||
|
||||
exec_xml('editor', 'procEnableComponent', params, completeUpdate);
|
||||
}
|
||||
|
||||
function doDisableComponent(component_name) {
|
||||
var params = new Array();
|
||||
params['component_name'] = component_name;
|
||||
|
||||
exec_xml('editor', 'procDisableComponent', params, completeUpdate);
|
||||
}
|
||||
|
||||
function completeUpdate(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
location.href = location.href;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue