mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
UI refactoring communication module
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11983 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d3672fda8f
commit
735c2fa848
7 changed files with 132 additions and 75 deletions
|
|
@ -19,7 +19,9 @@
|
|||
**/
|
||||
function procCommunicationAdminInsertConfig() {
|
||||
// get the default information
|
||||
$args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin', 'layout_srl', 'mlayout_srl');
|
||||
$args = Context::gets('skin','colorset','editor_skin','sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl');
|
||||
$args->editor_colorset = $args->sel_editor_colorset;
|
||||
unset($args->sel_editor_colorset);
|
||||
|
||||
if(!$args->skin) $args->skin = 'default';
|
||||
if(!$args->colorset) $args->colorset = 'white';
|
||||
|
|
|
|||
|
|
@ -19,10 +19,22 @@
|
|||
**/
|
||||
function getCommunicationAdminColorset() {
|
||||
$skin = Context::get('skin');
|
||||
$type = Context::get('type') == 'P' ? 'P' : 'M';
|
||||
Context::set('type', $type);
|
||||
|
||||
if($type == 'P')
|
||||
{
|
||||
$dir = 'skins';
|
||||
}
|
||||
else
|
||||
{
|
||||
$dir = 'm.skins';
|
||||
}
|
||||
|
||||
if(!$skin) $tpl = "";
|
||||
else {
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin, $dir);
|
||||
Context::set('skin_info', $skin_info);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -39,6 +51,7 @@
|
|||
}
|
||||
|
||||
$this->add('tpl', $tpl);
|
||||
$this->add('type', $type);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
<load target="js/communication.js" />
|
||||
<h1 class="h1">{$lang->cmd_send_message}</h1>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<load target="../../../../common/css/bootstrap.css" />
|
||||
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->cmd_send_message}</h1>
|
||||
</div>
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="sendMessage" action="./" method="post">
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@
|
|||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
<!--@end-->
|
||||
<div style="float:left;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($communication_config->colorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<label for="colorset_{$key}">{$val->title}</label>
|
||||
<input cond="$type == 'P'" type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($communication_config->colorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<input cond="$type == 'M'" type="radio" name="mcolorset" value="{$val->name}" id="mcolorset_{$key}" <!--@if($communication_config->mcolorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<label cond="$type == 'P'" for="colorset_{$key}">{$val->title}</label>
|
||||
<label cond="$type == 'M'" for="mcolorset_{$key}">{$val->title}</label>
|
||||
<!--@if($val->screenshot)-->
|
||||
<br />
|
||||
<img src="{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
|
|
|
|||
|
|
@ -1,76 +1,87 @@
|
|||
<load target="js/communication_admin.js" usecdn="true" />
|
||||
<load target="../../editor/tpl/js/editor_module_config.js" usecdn="true" />
|
||||
<div class="x_page-header"><h1>{$lang->communication} {$lang->cmd_management}</h1></div>
|
||||
<p>{nl2br($lang->about_communication)}</p>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->communication} {$lang->cmd_management}</h1>
|
||||
</div>
|
||||
|
||||
<p class="x_help-block">{nl2br($lang->about_communication)}</p>
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertConfig" action="./" method="post">
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="communication" />
|
||||
<input type="hidden" name="act" value="procCommunicationAdminInsertConfig">
|
||||
<div class="x_clearfix">
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tr>
|
||||
<th>{$lang->editor_skin}</th>
|
||||
<td>
|
||||
<select name="editor_skin" onchange="getEditorSkinColorList(this.value)">
|
||||
<!--@foreach($editor_skin_list as $editor_skin)-->
|
||||
<option value="{$editor_skin}" <!--@if($editor_skin==$communication_config->editor_skin)-->selected="selected"<!--@end-->>{$editor_skin}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<select name="editor_colorset" id="sel_editor_colorset" style="display:none">
|
||||
</select>
|
||||
<script>//<![CDATA[
|
||||
getEditorSkinColorList('{$communication_config->editor_skin}','{$communication_config->editor_colorset}');
|
||||
//]]></script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->layout}</th>
|
||||
<td>
|
||||
<select id="layout" name="layout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$layout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->layout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->skin}</th>
|
||||
<td>
|
||||
<select name="skin" onchange="doGetSkinColorset(this.options[this.selectedIndex].value);return false;">
|
||||
<!--@foreach($communication_skin_list as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($key==$communication_config->skin)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->colorset}</th>
|
||||
<td><div id="communication_colorset"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->mobile_layout}</th>
|
||||
<td>
|
||||
<select id="layout" name="mlayout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$mlayout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->mlayout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->mobile_skin}</th>
|
||||
<td>
|
||||
<select name="mskin">
|
||||
<option loop="$communication_mobile_skin_list => $key,$val" value="{$key}" selected="selected"|cond="$key==$communication_config->mskin" >{$val->title}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="editor_skin">{$lang->editor_skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="editor_skin" id="editor_skin" onchange="getEditorSkinColorList(this.value)">
|
||||
<option loop="$editor_skin_list => $editor_skin" value="{$editor_skin}" selected="selected"|cond="$editor_skin==$communication_config->editor_skin">{$editor_skin}</option>
|
||||
</select>
|
||||
<select name="sel_editor_colorset" style="display:none">
|
||||
</select>
|
||||
<script>//<![CDATA[
|
||||
getEditorSkinColorList('{$communication_config->editor_skin}','{$communication_config->editor_colorset}');
|
||||
//]]></script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_pull-right">
|
||||
<input type="submit" value="{$lang->cmd_registration}" class="x_btn x_btn-large x_btn-primary"/>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="layout">{$lang->layout}</label>
|
||||
<div class="x_controls">
|
||||
<select id="layout" name="layout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$layout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->layout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="skin">{$lang->skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="skin" id="skin" onchange="doGetSkinColorset(this.options[this.selectedIndex].value, 'P');return false;">
|
||||
<option loop="$communication_skin_list => $key, $val" value="{$key}" <!--@if($key==$communication_config->skin)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" id="__skin_colorset">
|
||||
<label class="x_control-label">{$lang->colorset}</label>
|
||||
<div class="x_controls">
|
||||
<div id="communication_colorset"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mlayout_srl">{$lang->mobile_layout}</label>
|
||||
<div class="x_controls">
|
||||
<select id="mlayout_srl" name="mlayout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$mlayout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->mlayout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mskin">{$lang->mobile_skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="mskin" id="mskin" onchange="doGetSkinColorset(this.options[this.selectedIndex].value, 'M');return false;">
|
||||
<option loop="$communication_mobile_skin_list => $key,$val" value="{$key}" selected="selected"|cond="$key==$communication_config->mskin" >{$val->title}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" id="__mskin_colorset">
|
||||
<label class="x_control-label">{$lang->colorset}</label>
|
||||
<div class="x_controls">
|
||||
<div id="communication_mcolorset"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btnArea">
|
||||
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
jQuery(function() { doGetSkinColorset("{$communication_config->skin}"); });
|
||||
jQuery(function() {
|
||||
doGetSkinColorset("{$communication_config->skin}", 'P');
|
||||
doGetSkinColorset("{$communication_config->mskin}", 'M');
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,32 @@
|
|||
/* 스킨 컬러셋 구해옴 */
|
||||
function doGetSkinColorset(skin) {
|
||||
function doGetSkinColorset(skin, type) {
|
||||
var params = new Array();
|
||||
params['skin'] = skin;
|
||||
params['type'] = type;
|
||||
|
||||
var response_tags = new Array('error','message','tpl');
|
||||
var response_tags = new Array('error','message','tpl', 'type');
|
||||
exec_xml('communication', 'getCommunicationAdminColorset', params, doDisplaySkinColorset, response_tags);
|
||||
}
|
||||
|
||||
function doDisplaySkinColorset(ret_obj) {
|
||||
var tpl = ret_obj["tpl"];
|
||||
jQuery('#communication_colorset').html(tpl);
|
||||
var type = ret_obj['type'];
|
||||
var $controls = null;
|
||||
var $control_group = null;
|
||||
|
||||
if(type == 'P'){
|
||||
$controls = jQuery('#communication_colorset');
|
||||
$control_group = jQuery('#__skin_colorset');
|
||||
}else{
|
||||
$controls = jQuery('#communication_mcolorset');
|
||||
$control_group = jQuery('#__mskin_colorset');
|
||||
}
|
||||
|
||||
$controls.html(tpl);
|
||||
if(tpl){
|
||||
$control_group.show();
|
||||
}else{
|
||||
$control_group.hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,13 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
|||
}
|
||||
var selectAttr = "";
|
||||
for(var i=0;i<it.length;i++){
|
||||
selectbox.append($('<option value="'+it[i].name+'" >'+it[i].title+'</option>'));
|
||||
var $options = $('<option value="'+it[i].name+'" >'+it[i].title+'</option>');
|
||||
|
||||
if(params.selected_colorset == it[i].name){
|
||||
$options.attr('selected', 'selected');
|
||||
}
|
||||
|
||||
selectbox.append($options);
|
||||
}
|
||||
selectbox.show();
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue