Clean up common_layout.html and merge with mobile_layout.html

This commit is contained in:
Kijin Sung 2016-02-17 16:20:57 +09:00
parent 32aa19e6f2
commit 65517735e0
10 changed files with 65 additions and 132 deletions

View file

@ -2032,6 +2032,10 @@ class Context
{
return self::$_instance->ssl_actions;
}
else
{
return array();
}
}
/**

View file

@ -223,17 +223,17 @@ class HTMLDisplayHandler
// convert the final layout
Context::set('content', $output);
Context::set('m', $is_mobile = Mobile::isFromMobilePhone() ? 1 : 0);
$oTemplate = TemplateHandler::getInstance();
if(Mobile::isFromMobilePhone())
if($is_mobile)
{
$this->_loadMobileJSCSS();
$output = $oTemplate->compile('./common/tpl', 'mobile_layout');
}
else
{
$this->_loadDesktopJSCSS();
$output = $oTemplate->compile('./common/tpl', 'common_layout');
}
$output = $oTemplate->compile('./common/tpl', 'common_layout');
// replace the user-defined-language
$oModuleController = getController('module');

View file

@ -933,7 +933,7 @@ function getCookie(name) {
}
function is_def(v) {
return (typeof(v)!='undefined');
return typeof(v) != 'undefined' && v !== null;
}
function ucfirst(str) {

View file

@ -54,7 +54,7 @@
waiting_obj.css("opacity", 0.0);
var wfsr_timeout = setTimeout(function() {
if (show_waiting_message) {
waiting_obj.css("opacity", "").html(waiting_message).show();
waiting_obj.css("opacity", "").show();
}
}, 1000);
@ -175,7 +175,7 @@
waiting_obj.css("opacity", 0.0);
var wfsr_timeout = setTimeout(function() {
if (show_waiting_message) {
waiting_obj.css("opacity", "").html(waiting_message).show();
waiting_obj.css("opacity", "").show();
}
}, 1000);
@ -270,7 +270,7 @@
waiting_obj.css("opacity", 0.0);
var wfsr_timeout = setTimeout(function() {
if (show_waiting_message) {
waiting_obj.css("opacity", "").html(waiting_message).show();
waiting_obj.css("opacity", "").show();
}
}, 1000);

View file

@ -203,10 +203,10 @@ $lang->about_tag = '쉼표(,)를 이용하여 복수 등록';
$lang->about_layout = '레이아웃은 콘텐츠의 겉모습을 꾸며줍니다. 상단 레이아웃 메뉴에서 관리할 수 있습니다.';
$lang->about_ipaddress_input = 'IP주소 입력형식<br />1. 와일드카드(*) 사용가능(예: 192.168.0.*)<br />2. 하이픈(-)을 사용하여 대역으로 입력가능<br />(단, 대역폭으로 입력할 경우 와일드카드 사용불가. 예: 192.168.0.1-192.168.0.254)<br />3.여러개의 항목은 줄을 바꾸어 입력하세요';
$lang->msg_invalid_ip = '잘못된 IP주소 형식입니다.';
$lang->msg_no_root = '루트는 선택 할 수 없습니다.';
$lang->msg_no_shortcut = '바로가기는 선택 할 수 없습니다.';
$lang->msg_no_root = '루트는 선택할 수 없습니다.';
$lang->msg_no_shortcut = '바로가기는 선택할 수 없습니다.';
$lang->msg_select_menu = '대상 메뉴 선택';
$lang->msg_call_server = '서버에 요청 중입니다. 잠시만 기다려주세요.';
$lang->msg_call_server = '서버에 요청 중입니다. 잠시만 기다려 주십시오...';
$lang->msg_db_not_setted = 'DB 설정이 되어 있지 않습니다.';
$lang->msg_dbconnect_failed = 'DB 접속 오류가 발생했습니다. DB정보를 다시 확인해주세요.';
$lang->msg_invalid_queryid = 'Query ID값이 잘못 지정되었습니다.';

View file

@ -1,33 +1,31 @@
{@
$db_info = Context::getDBInfo();
$lang_type = Context::getLangType();
$ssl_actions = Context::getSSLActions();
$css_files = Context::getCssFile();
$js_files = Context::getJsFile();
}
<!DOCTYPE html>
<html lang="{str_replace('jp','ja',$lang_type)}">
<html lang="{$lang_type = Context::getLangType()}" class="xe-mobilelayout"|cond="$m">
<head>
<!-- META -->
<meta charset="utf-8">
<meta name="Generator" content="Rhymix">
<meta name="generator" content="Rhymix">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" cond="$m" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<block loop="Context::getMetaTag() => $no, $val">
<meta http-equiv="{$val['name']}"|cond="$val['is_http_equiv']" name="{$val['name']}"|cond="!$val['is_http_equiv']" content="{$val['content']}">
</block>
<!-- TITLE -->
<title>{Context::getBrowserTitle()}</title>
<!-- CSS -->
<block loop="$css_files=>$key,$css_file">
<block loop="Context::getCssFile() => $key, $css_file">
<block cond="$css_file['targetie']"><!--[if {$css_file['targetie']}]><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--></block></block>
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
<block cond="$css_file['targetie']"><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
<block cond="$css_file['targetie']"><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--</block><![endif]-->{"\n"}</block>
</block>
<!-- JS -->
<block loop="$js_files=>$key,$js_file">
<block loop="Context::getJsFile() => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--></block></block>
<script src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
<block cond="$js_file['targetie']"><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--</block><![endif]-->{"\n"}</block>
</block>
<!-- RSS -->
@ -35,48 +33,47 @@
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{$general_rss_url}" cond="$general_rss_url" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" cond="$rss_url" />
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" cond="$general_rss_url" />
<!-- ICON -->
<!-- ICONS -->
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />
{Context::getHtmlHeader()}
<script>
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',array_keys($ssl_actions))}"</block>);
var default_url = "{Context::getDefaultUrl()}";
<block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block>
<block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block>
<block cond="Context::get('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
xe.current_lang = "{$lang_type}";
xe.cmd_find = "{$lang->cmd_find}";
xe.cmd_cancel = "{$lang->cmd_cancel}";
xe.cmd_confirm = "{$lang->cmd_confirm}";
xe.msg_no_root = "{$lang->msg_no_root}";
xe.msg_no_shortcut = "{$lang->msg_no_shortcut}";
xe.msg_select_menu = "{$lang->msg_select_menu}";
//]]>
<!-- OTHER HEADERS -->
{Context::getHtmlHeader()}
<!-- COMMON JS VARIABLES -->
<script>
var default_url = "{Context::getDefaultUrl()}";
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
var current_lang = xe.current_lang = "{$lang_type}";
var current_mid = {json_encode($mid ?: null)};
var http_port = {Context::get("_http_port") ?: 'null'};
var https_port = {Context::get("_https_port") ?: 'null'};
var enforce_ssl = {Context::get('_use_ssl') === 'always' ? 'true' : 'false'};
var ssl_actions = {json_encode(array_values(Context::getSSLActions()))};
var xeVid = {json_encode($vid ?: null)};
</script>
</head>
{@$isAdminKind = false}
<!--@if(stripos(Context::get('act'),'admin') || Context::get('module') == 'admin')-->
{@$isAdminKind = true}
<!--@end-->
<!-- BODY START -->
<body{Context::getBodyClass()}>
<!-- PAGE CONTENT -->
{Context::getBodyHeader()}
{$content}
{Context::getHtmlFooter()}
<!-- ETC -->
<div id="rhymix_waiting" class="wfsr"></div>
<div id="rhymix_waiting" class="wfsr" cond="!$m">{$lang->msg_call_server}</div>
<div id="rhymix_debug_panel"></div>
<div id="rhymix_debug_button"></div>
{@ $js_body_files = Context::getJsFile('body') }
<block loop="$js_body_files => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block><script src="{$js_file['file']}"></script><block cond="$js_file['targetie']"><![endif]--></block>
<!-- BODY JS -->
<block loop="Context::getJsFile('body') => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block>
<script src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><![endif]-->{"\n"}</block>
</block>
</body>

View file

@ -1,73 +0,0 @@
{@
$lang_type = Context::getLangType();
$ssl_actions = Context::getSSLActions();
$css_files=Context::getCssFile();
$js_files=Context::getJsFile();
}
<!DOCTYPE html>
<html lang="{str_replace('jp','ja',$lang_type)}" class="xe-mobilelayout">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<block loop="Context::getMetaTag() => $no, $val">
<meta http-equiv="{$val['name']}"|cond="$val['is_http_equiv']" name="{$val['name']}"|cond="!$val['is_http_equiv']" content="{$val['content']}">
</block>
<!--// TITLE -->
<title>{Context::getBrowserTitle()}</title>
<!-- CSS -->
<block loop="$css_files=>$key,$css_file">
<block cond="$css_file['targetie']"><!--[if {$css_file['targetie']}]><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--></block></block>
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
<block cond="$css_file['targetie']"><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
</block>
<!-- JS -->
<block loop="$js_files=>$key,$js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--></block></block>
<script src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
</block>
<!--// RSS -->
<!--@if($rss_url)-->
<link rel="alternate" type="application/rss+xml" title="RSS" href="{$rss_url}" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" />
<!--@end-->
<!--@if($general_rss_url)-->
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{$general_rss_url}" />
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" />
<!--@end-->
<!--// ICON-->
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />
{Context::getHtmlHeader()}
<script>
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',array_keys($ssl_actions))}"<!--@end-->);
var default_url = "{Context::getDefaultUrl()}";
<block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block>
<block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block>
<block cond="Context::get('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
//]]>
</script>
</head>
<body{Context::getBodyClass()}>
{Context::getBodyHeader()}
{$content}
{Context::getHtmlFooter()}
<div id="rhymix_debug_panel"></div>
<div id="rhymix_debug_button"></div>
<!--// ETC -->
{@ $js_body_files = Context::getJsFile('body') }
<!--@foreach($js_body_files as $key => $js_file)-->
<!--@if($js_file['targetie'])--><!--[if {$js_file['targetie']}]><!--@end-->
<script src="{$js_file['file']}"></script>
<!--@if($js_file['targetie'])--><![endif]--><!--@end-->
<!--@end-->
</body>
</html>

View file

@ -16,11 +16,5 @@
</p>
</footer>
</div>
<script>
xe.current_lang = '{$lang_type}';
xe.lang.confirm_run = '{$lang->confirm_run}';
xe.lang.confirm_reset_admin_menu = '{$lang->confirm_reset_admin_menu}';
admin_menu_srl = '{$admin_menu_srl}';
</script>
<load target="./js/config.js" usecdn="true" />
<load target="../../session/tpl/js/session.js" usecdn="true" />

View file

@ -1,5 +1,14 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2, user-scalable=yes" />
<script>
var admin_menu_srl = "{$admin_menu_srl}";
xe.cmd_find = "{$lang->cmd_find}";
xe.cmd_cancel = "{$lang->cmd_cancel}";
xe.cmd_confirm = "{$lang->cmd_confirm}";
xe.msg_select_menu = "{$lang->msg_select_menu}";
xe.lang.confirm_run = "{$lang->confirm_run}";
xe.lang.confirm_reset_admin_menu = "{$lang->confirm_reset_admin_menu}";
</script>
<div class="x">
<p class="skipNav"><a href="#content">{$lang->skip_to_content}</a></p>
<header class="header">

View file

@ -685,6 +685,8 @@
<script>
xe.lang.shortcut = '{$lang->shortcut}';
xe.lang.msg_no_root = xe.msg_no_root = "{$lang->msg_no_root}";
xe.lang.msg_no_shortcut = xe.msg_no_shortcut = "{$lang->msg_no_shortcut}";
xe.lang.msg_target_is_sub_of_origin = '{$lang->msg_target_is_sub_of_origin}';
xe.lang.confirm_sitemap_delete = '{$lang->confirm_sitemap_delete}';
xe.lang.confirm_menu_delete = '{$lang->confirm_menu_delete}';