mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Enable responsive skin in member, communication, and ncenterlite
회원, 커뮤니케이션, 알림센터Lite 모듈에서 모바일 스킨을 선택할 때 PC와 동일한 반응형 스킨을 지정할 수 있도록 개선
This commit is contained in:
parent
eb3108b446
commit
f0ad692650
6 changed files with 58 additions and 32 deletions
|
|
@ -14,12 +14,25 @@ class communicationMobile extends communicationView
|
|||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
$this->config = $oCommunicationModel->getConfig();
|
||||
$skin = $this->config->mskin;
|
||||
|
||||
Context::set('communication_config', $this->config);
|
||||
|
||||
$tpl_path = sprintf('%sm.skins/%s', $this->module_path, $skin);
|
||||
$this->setTemplatePath($tpl_path);
|
||||
$mskin = $this->config->mskin;
|
||||
if(!$mskin)
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s/', $this->module_path, 'default');
|
||||
}
|
||||
elseif($mskin === '/USE_RESPONSIVE/')
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->config->skin);
|
||||
if(!is_dir($template_path) || !$this->config->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
|
||||
}
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->config->mlayout_srl);
|
||||
|
|
@ -28,6 +41,8 @@ class communicationMobile extends communicationView
|
|||
$this->module_info->mlayout_srl = $this->config->mlayout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
|
||||
$this->setTemplatePath($template_path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -18,13 +18,19 @@ class memberMobile extends memberView
|
|||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('member_config.signupForm..');
|
||||
|
||||
|
||||
$mskin = $this->member_config->mskin;
|
||||
// Set the template path
|
||||
$mskin = $this->member_config->mskin;
|
||||
if(!$mskin)
|
||||
{
|
||||
$mskin = 'default';
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
|
||||
$template_path = sprintf('%sm.skins/%s/', $this->module_path, 'default');
|
||||
}
|
||||
elseif($mskin === '/USE_RESPONSIVE/')
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, $this->member_config->skin);
|
||||
if(!is_dir($template_path) || !$this->member_config->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<div class="x_controls">
|
||||
<select id="mlayout" 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 == $config->mlayout_srl">{$val->title} ({$val->layout})</option>
|
||||
<option loop="$mlayout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $config->mlayout_srl">{$val->title} <block cond="$val->layout">({$val->layout})</block></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<label class="x_control-label" for="mskin">{$lang->mobile_skin}</label>
|
||||
<div class="x_controls">
|
||||
<select id="mskin" name="mskin">
|
||||
<option loop="$mskin_list=>$key,$val" value="{$key}" selected="selected"|cond="$config->mskin==$key">{$val->title} ({$key})</option>
|
||||
<option loop="$mskin_list=>$key,$val" value="{$key}" selected="selected"|cond="$config->mskin==$key">{$val->title} <block cond="!starts_with('/', $key)">({$key})</block></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1110,18 +1110,11 @@ class moduleModel extends module
|
|||
{
|
||||
$moduleName = 'ARTICLE';
|
||||
}
|
||||
|
||||
$useDefaultList = array();
|
||||
if(array_key_exists($moduleName, $installedMenuTypes))
|
||||
{
|
||||
if($dir == 'skins')
|
||||
{
|
||||
$type = 'P';
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = 'M';
|
||||
}
|
||||
$defaultSkinName = $this->getModuleDefaultSkin($module, $type);
|
||||
|
||||
$defaultSkinName = $this->getModuleDefaultSkin($module, $dir == 'skins' ? 'P' : 'M');
|
||||
if(isset($defaultSkinName))
|
||||
{
|
||||
$defaultSkinInfo = $this->loadSkinInfo($path, $defaultSkinName, $dir);
|
||||
|
|
@ -1130,14 +1123,14 @@ class moduleModel extends module
|
|||
$useDefault->title = lang('use_site_default_skin') . ' (' . $defaultSkinInfo->title . ')';
|
||||
|
||||
$useDefaultList['/USE_DEFAULT/'] = $useDefault;
|
||||
if($type === 'M')
|
||||
{
|
||||
$useDefaultList['/USE_RESPONSIVE/'] = (object)array('title' => lang('use_responsive_pc_skin'));
|
||||
}
|
||||
|
||||
$skin_list = array_merge($useDefaultList, $skin_list);
|
||||
}
|
||||
}
|
||||
if($dir == 'm.skins')
|
||||
{
|
||||
$useDefaultList['/USE_RESPONSIVE/'] = (object)array('title' => lang('use_responsive_pc_skin'));
|
||||
}
|
||||
|
||||
$skin_list = array_merge($useDefaultList, $skin_list);
|
||||
|
||||
return $skin_list;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,23 @@ class ncenterliteMobile extends ncenterliteView
|
|||
{
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
$config = $oNcenterliteModel->getConfig();
|
||||
$template_path = sprintf("%sm.skins/%s/",$this->module_path, $config->mskin);
|
||||
if(!is_dir($template_path)||!$config->mskin)
|
||||
|
||||
$mskin = $config->mskin;
|
||||
if(!$mskin)
|
||||
{
|
||||
$config->skin = 'default';
|
||||
$template_path = sprintf("%sm.skins/%s/",$this->module_path, $config->mskin);
|
||||
$template_path = sprintf('%sm.skins/%s/', $this->module_path, 'default');
|
||||
}
|
||||
elseif($mskin === '/USE_RESPONSIVE/')
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, $config->skin);
|
||||
if(!is_dir($template_path) || !$config->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/", $this->module_path, 'default');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
|
||||
}
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<div class="x_controls">
|
||||
<select name="skin" id="skin" onchange="doDisplaySkinColorset(this); return false;">
|
||||
<option loop="$skin_list => $key, $val" value="{$key}" selected="selected"|cond="$config->skin == $key">
|
||||
{$val->title} ({htmlspecialchars($key)})
|
||||
{$val->title} ({escape($key)})
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
<div class="x_controls">
|
||||
<select name="mskin" id="mskin" onchange="doDisplayMobileSkinColorset(this); return false;">
|
||||
<option loop="$mskin_list => $key, $val" value="{$key}" selected="selected"|cond="$config->mskin == $key">
|
||||
{$val->title} ({htmlspecialchars($key)})
|
||||
{$val->title} <block cond="!starts_with('/', $key)">({escape($key)})</block>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue