mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 03:09:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@713 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f3fd2da4ae
commit
9be7431441
8 changed files with 136 additions and 37 deletions
|
|
@ -7,5 +7,6 @@
|
|||
<action name="dispGenerateCodeInPage" type="view" standalone="true" />
|
||||
|
||||
<action name="procGenerateCode" type="controller" standalone="true" />
|
||||
<action name="procGetColorsetList" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -40,5 +40,25 @@
|
|||
$this->add('plugin_code', $plugin_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 선택된 플러그인 - 스킨의 컬러셋을 return
|
||||
**/
|
||||
function procGetColorsetList() {
|
||||
$plugin = Context::get('selected_plugin');
|
||||
$skin = Context::get('skin');
|
||||
|
||||
$path = sprintf('./plugins/%s/', $plugin);
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($path, $skin);
|
||||
|
||||
for($i=0;$i<count($skin_info->colorset);$i++) {
|
||||
$colorset = sprintf('%s|@|%s', $skin_info->colorset[$i]->name, $skin_info->colorset[$i]->title);
|
||||
$colorset_list[] = $colorset;
|
||||
}
|
||||
|
||||
if(count($colorset_list)) $colorsets = implode("\n", $colorset_list);
|
||||
$this->add('colorset_list', $colorsets);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@
|
|||
$mid_list = $oModuleModel->getMidList();
|
||||
Context::set('mid_list', $mid_list);
|
||||
|
||||
// 스킨의 정보를 구함
|
||||
$skin_list = $oModuleModel->getSkins($plugin_info->path);
|
||||
Context::set('skin_list', $skin_list);
|
||||
|
||||
// 플러그인을 팝업으로 지정
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
|
|
|
|||
|
|
@ -23,3 +23,36 @@ function completeGenerateCodeInPage(ret_obj,response_tags,params,fo_obj) {
|
|||
|
||||
window.close();
|
||||
}
|
||||
|
||||
/* 플러그인 코드 생성시 스킨을 고르면 컬러셋의 정보를 표시 */
|
||||
function doDisplaySkinColorset(sel) {
|
||||
var skin = sel.options[sel.selectedIndex].value;
|
||||
if(!skin) {
|
||||
xGetElementById("colorset_area").style.display = "none";
|
||||
return;
|
||||
}
|
||||
|
||||
var params = new Array();
|
||||
params["selected_plugin"] = xGetElementById("fo_plugin").selected_plugin.value;
|
||||
params["skin"] = skin;
|
||||
|
||||
var response_tags = new Array("error","message","colorset_list");
|
||||
|
||||
exec_xml("plugin", "procGetColorsetList", params, completeGetSkinColorset, response_tags);
|
||||
}
|
||||
|
||||
// 서버에서 받아온 컬러셋을 표시
|
||||
function completeGetSkinColorset(ret_obj) {
|
||||
var sel = xGetElementById("fo_plugin").colorset;
|
||||
var length = sel.options.length;
|
||||
for(var i=0;i<length;i++) sel.remove(0);
|
||||
|
||||
var colorset_list = ret_obj["colorset_list"].split("\n");
|
||||
for(var i=0;i<colorset_list.length;i++) {
|
||||
var tmp = colorset_list[i].split("|@|");
|
||||
var opt = new Option(tmp[1], tmp[0], false, false);
|
||||
sel.options.add(opt);
|
||||
}
|
||||
|
||||
xGetElementById("colorset_area").style.display = "block";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!--%import("js/admin.js")-->
|
||||
<!--%import("css/plugin.css")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, generate_code);">
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, generate_code);" id="fo_plugin">
|
||||
<input type="hidden" name="selected_plugin" value="{$selected_plugin}" />
|
||||
|
||||
<div class="plugin_detail_info_window">
|
||||
|
|
@ -14,6 +14,24 @@
|
|||
<div class="plugin_header">{$lang->plugin}</div>
|
||||
<div class="plugin_body">{$plugin_info->title} ver {$plugin_info->version}</div>
|
||||
|
||||
<div class="plugin_header">{$lang->skin}</div>
|
||||
<div class="plugin_body">
|
||||
<select name="skin" onchange="doDisplaySkinColorset(this);return false;">
|
||||
<option value=""> </option>
|
||||
<!--@foreach($skin_list as $key => $val)-->
|
||||
<option value="{$key}">{$val->title} ({$key})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="colorset_area" style="display:none">
|
||||
<div class="plugin_header">{$lang->colorset}</div>
|
||||
<div class="plugin_body">
|
||||
<select name="colorset">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@foreach($plugin_info->extra_var as $id => $var)-->
|
||||
<div class="plugin_header">{$var->name}</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,24 @@
|
|||
<div class="plugin_header">{$lang->description}</div>
|
||||
<div class="plugin_body">{nl2br($plugin_info->author->description)}</div>
|
||||
|
||||
<div class="plugin_header">{$lang->skin}</div>
|
||||
<div class="plugin_body">
|
||||
<select name="skin" onchange="doDisplaySkinColorset(this);return false;">
|
||||
<option value=""> </option>
|
||||
<!--@foreach($skin_list as $key => $val)-->
|
||||
<option value="{$key}">{$val->title} ({$key})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="colorset_area" style="display:none">
|
||||
<div class="plugin_header">{$lang->colorset}</div>
|
||||
<div class="plugin_body">
|
||||
<select name="colorset">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@foreach($plugin_info->extra_var as $id => $var)-->
|
||||
<div class="plugin_header">{$var->name}</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue