Improve description of mobile view setting, and hide mobile settings if mobile view is disabled #2510

This commit is contained in:
Kijin Sung 2025-03-08 23:18:11 +09:00
parent b6c444c536
commit f980ea58c6
10 changed files with 60 additions and 15 deletions

View file

@ -30,6 +30,7 @@
<input type="radio" name="use_mobile_view" id="use_mobile_view_n" value="N" checked="checked"|cond="!$use_mobile_view" />
{$lang->cmd_no}
</label>
<p class="x_help-block">{$lang->about_mobile_view}</p>
</div>
</div>
<div class="x_control-group">

View file

@ -121,9 +121,18 @@
<div class="x_control-group">
<label class="x_control-label">{$lang->mobile_view}</label>
<div class="x_controls">
<label class="x_inline" for="use_mobile"><input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" /> {$lang->about_mobile_view}</label>
<label for="use_mobile_y" class="x_inline">
<input type="radio" name="use_mobile" id="use_mobile_y" value="Y" checked="checked"|cond="$module_info->use_mobile === 'Y'" />
{$lang->cmd_yes}
</label>
<label for="use_mobile_n" class="x_inline">
<input type="radio" name="use_mobile" id="use_mobile_n" value="N" checked="checked"|cond="$module_info->use_mobile !== 'Y'" />
{$lang->cmd_no}
</label>
<p class="x_help-block">{$lang->about_mobile_view}</p>
</div>
</div>
<div class="hide-if-not-mobile-view">
<div class="x_control-group">
<label class="x_control-label" for="mlayout_srl">{$lang->mobile_layout}</label>
<div class="x_controls">
@ -180,6 +189,7 @@
<p id="mobile_footer_text_help" class="x_help-block">{$lang->about_mobile_footer_text}</p>
</div>
</div>
</div>
</section>
<section class="section">
<h1>{$lang->cmd_list_setting}</h1>

View file

@ -147,3 +147,18 @@ function doSaveListConfig(module_srl)
exec_json('board.procBoardAdminInsertListConfig', params, function() { location.reload(); });
}
$(function() {
$('#use_mobile_y,#use_mobile_n').on('change', function() {
if ($(this).is(':checked')) {
if ($(this).val() == 'Y') {
$('.hide-if-not-mobile-view').show();
} else {
$('.hide-if-not-mobile-view').hide();
}
}
});
if ($('#use_mobile_n').is(':checked')) {
$('.hide-if-not-mobile-view').hide();
}
});

View file

@ -35,7 +35,7 @@ function completeArticleDocumentInserted(ret_obj){
alert(message);
var url = '';
if(is_mobile == 'Y')
url = current_url.setQuery('act', 'dispPageAdminMobileContent').setQuery('mid', mid);
else
@ -103,7 +103,7 @@ function doRemoveWidgetCache(module_srl) {
function completeRemoveWidgetCache(ret_obj) {
var message = ret_obj['message'];
location.reload();
location.reload();
}
/* 일괄 설정 */
@ -131,4 +131,17 @@ jQuery(function($){
$('#opage_proc_php').prop('checked', true);
}
});
$('#use_mobile_y,#use_mobile_n').on('change', function() {
if ($(this).is(':checked')) {
if ($(this).val() == 'Y') {
$('.hide-if-not-mobile-view').show();
} else {
$('.hide-if-not-mobile-view').hide();
}
}
});
if ($('#use_mobile_n').is(':checked')) {
$('.hide-if-not-mobile-view').hide();
}
});

View file

@ -1,4 +1,5 @@
<!--#include("header.html")-->
<include target="header.html" />
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/page/tpl/page_info/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
@ -72,10 +73,15 @@
<div class="x_control-group">
<label class="x_control-label">{$lang->mobile_view}</label>
<div class="x_controls">
<label for="use_mobile">
<input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" />
{$lang->about_mobile_view}
<label for="use_mobile_y" class="x_inline">
<input type="radio" name="use_mobile" id="use_mobile_y" value="Y" checked="checked"|cond="$module_info->use_mobile === 'Y'" />
{$lang->cmd_yes}
</label>
<label for="use_mobile_n" class="x_inline">
<input type="radio" name="use_mobile" id="use_mobile_n" value="N" checked="checked"|cond="$module_info->use_mobile !== 'Y'" />
{$lang->cmd_no}
</label>
<p class="x_help-block">{$lang->about_mobile_view}</p>
</div>
</div>
<div class="x_control-group">
@ -88,7 +94,7 @@
<p class="x_help-block" id="aboutLayout">{$lang->about_layout}</p>
</div>
</div>
<div class="x_control-group">
<div class="x_control-group hide-if-not-mobile-view">
<label class="x_control-label" for="mlayout_srl">{$lang->mobile_layout}</label>
<div class="x_controls">
<select name="mlayout_srl" id="mlayout_srl">
@ -112,7 +118,7 @@
<p class="x_help-block" id="aboutOpagePath">{$lang->about_opage_path}<b>{realpath("./")}</b></p>
</div>
</div>
<div class="x_control-group" cond="$module_info->page_type == 'OUTSIDE'">
<div class="x_control-group hide-if-not-mobile-view" cond="$module_info->page_type == 'OUTSIDE'">
<label class="x_control-label" for="mpath">{$lang->opage_mobile_path}</label>
<div class="x_controls">
<input type="text" name="mpath" id="mpath" value="{$module_info->mpath}" />
@ -142,7 +148,7 @@
<p class="x_help-block" id="aboutSkin">{$lang->about_skin}</p>
</div>
</div>
<div class="x_control-group optionnalData articleType" cond="$module_info->page_type == 'ARTICLE'">
<div class="x_control-group hide-if-not-mobile-view optionnalData articleType" cond="$module_info->page_type == 'ARTICLE'">
<label class="x_control-label" for="mskin">{$lang->mobile_skin}</label>
<div class="x_controls">
<select name="mskin">