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

@ -373,7 +373,7 @@ $lang->use_and_display = 'Use and Display Vote List';
$lang->pc = 'PC';
$lang->mobile = 'Mobile';
$lang->mobile_view = 'Mobile View';
$lang->about_mobile_view = 'Mobile View will display the best layout when you access the website with your smart phone.';
$lang->about_mobile_view = 'Use different layouts and skins for PC and mobile.<br>Select &quot;No&quot; if you have installed an adaptive (responsive) theme that supports both PC and mobile.';
$lang->simple_view = 'Simple View';
$lang->detail_view = 'Detail View';
$lang->more = 'More';

View file

@ -311,7 +311,7 @@ $lang->play = 'プレイ';
$lang->use_and_display = '使用+推奨履歴公開';
$lang->mobile = 'モバイル';
$lang->mobile_view = 'モバイルスキン使用';
$lang->about_mobile_view = 'スマートフォンなどを利用してサイトに接続した場合、モバイル画面に最適化されたレイアウトを使用するよう設定します。';
$lang->about_mobile_view = 'PCとモバイルにそれぞれ異なるレイアウトとスキンを使用します。<br>PCとモバイルの両方に対応する適応型(反応型)テーマを使用する場合は、"いいえ"を選択してください。';
$lang->simple_view = 'シンプルビュー';
$lang->detail_view = '詳細ビュー';
$lang->more = 'もっと見る';

View file

@ -374,7 +374,7 @@ $lang->use_and_display = '사용 + 추천내역 공개';
$lang->pc = 'PC';
$lang->mobile = '모바일';
$lang->mobile_view = '모바일 뷰 사용';
$lang->about_mobile_view = '스마트폰 등을 이용하여 접속할 때 모바일 화면에 최적화된 레이아웃을 이용하도록 합니다.';
$lang->about_mobile_view = 'PC와 모바일에 각각 다른 레이아웃과 스킨을 사용합니다.<br>PC와 모바일을 모두 지원하는 적응형(반응형) 테마를 사용하신다면 &quot;아니오&quot;를 선택하세요.';
$lang->simple_view = '간단보기';
$lang->detail_view = '상세보기';
$lang->more = '더보기';

View file

@ -293,7 +293,7 @@ $lang->reload = '重新加载';
$lang->play = '播放';
$lang->use_and_display = '使用+专题刊物历史';
$lang->mobile_view = '开启移动版';
$lang->about_mobile_view = '为智能手机访问网站,提供最佳视觉效果。';
$lang->about_mobile_view = '在PC和手机上分别使用不同的布局和皮肤。<br>如果使用同时支持PC和手机的适应型反应型主题请选择"不"。';
$lang->simple_view = '预览';
$lang->detail_view = '查看详情';
$lang->more = '更多';

View file

@ -293,5 +293,5 @@ $lang->reload = '重新讀取';
$lang->play = '播放';
$lang->use_and_display = '使用+專題刊物歷史';
$lang->mobile_view = '手機瀏覽';
$lang->about_mobile_view = '使用手機瀏覽時將會顯示最適當的畫面。';
$lang->about_mobile_view = '在PC和手機上分別使用不同的佈局和皮膚。<br>如果使用同時支持PC和手機的適應型反應型主題請選擇"不"。';
$lang->more = '更多';

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">