From 32aa19e6f2771d6c6c6f12fe33f277a930109654 Mon Sep 17 00:00:00 2001
From: Kijin Sung
Date: Wed, 17 Feb 2016 15:10:47 +0900
Subject: [PATCH 1/2] Remove unnecessary sitelock template
---
common/tpl/sitelock.html | 48 ----------------------------------------
1 file changed, 48 deletions(-)
delete mode 100644 common/tpl/sitelock.html
diff --git a/common/tpl/sitelock.html b/common/tpl/sitelock.html
deleted file mode 100644
index ca4a4f981..000000000
--- a/common/tpl/sitelock.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
From 65517735e0c4f666e365ccdf61dcd8174e984f37 Mon Sep 17 00:00:00 2001
From: Kijin Sung
Date: Wed, 17 Feb 2016 16:20:57 +0900
Subject: [PATCH 2/2] Clean up common_layout.html and merge with
mobile_layout.html
---
classes/context/Context.class.php | 4 ++
classes/display/HTMLDisplayHandler.php | 6 +-
common/js/common.js | 2 +-
common/js/xml_handler.js | 6 +-
common/lang/ko.php | 6 +-
common/tpl/common_layout.html | 83 +++++++++++++-------------
common/tpl/mobile_layout.html | 73 ----------------------
modules/admin/tpl/_footer.html | 6 --
modules/admin/tpl/_header.html | 9 +++
modules/menu/tpl/sitemap.html | 2 +
10 files changed, 65 insertions(+), 132 deletions(-)
delete mode 100644 common/tpl/mobile_layout.html
diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php
index 1479efabe..e128a5dce 100644
--- a/classes/context/Context.class.php
+++ b/classes/context/Context.class.php
@@ -2032,6 +2032,10 @@ class Context
{
return self::$_instance->ssl_actions;
}
+ else
+ {
+ return array();
+ }
}
/**
diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php
index 0373d5510..2254c2694 100644
--- a/classes/display/HTMLDisplayHandler.php
+++ b/classes/display/HTMLDisplayHandler.php
@@ -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');
diff --git a/common/js/common.js b/common/js/common.js
index ab14e21c7..08b0d6688 100644
--- a/common/js/common.js
+++ b/common/js/common.js
@@ -933,7 +933,7 @@ function getCookie(name) {
}
function is_def(v) {
- return (typeof(v)!='undefined');
+ return typeof(v) != 'undefined' && v !== null;
}
function ucfirst(str) {
diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js
index 5e2ee7f8e..2b049bdfe 100644
--- a/common/js/xml_handler.js
+++ b/common/js/xml_handler.js
@@ -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);
diff --git a/common/lang/ko.php b/common/lang/ko.php
index 69835c2fd..0e6e43253 100644
--- a/common/lang/ko.php
+++ b/common/lang/ko.php
@@ -203,10 +203,10 @@ $lang->about_tag = '쉼표(,)를 이용하여 복수 등록';
$lang->about_layout = '레이아웃은 콘텐츠의 겉모습을 꾸며줍니다. 상단 레이아웃 메뉴에서 관리할 수 있습니다.';
$lang->about_ipaddress_input = 'IP주소 입력형식
1. 와일드카드(*) 사용가능(예: 192.168.0.*)
2. 하이픈(-)을 사용하여 대역으로 입력가능
(단, 대역폭으로 입력할 경우 와일드카드 사용불가. 예: 192.168.0.1-192.168.0.254)
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값이 잘못 지정되었습니다.';
diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html
index c68945e8f..264683074 100644
--- a/common/tpl/common_layout.html
+++ b/common/tpl/common_layout.html
@@ -1,33 +1,31 @@
-{@
- $db_info = Context::getDBInfo();
- $lang_type = Context::getLangType();
- $ssl_actions = Context::getSSLActions();
- $css_files = Context::getCssFile();
- $js_files = Context::getJsFile();
-}
-
+
+
-
+
+
+
{Context::getBrowserTitle()}
+
-
+
-
+{"\n"}
+
-
+
-
+{"\n"}
@@ -35,48 +33,47 @@
-
+
+
-{Context::getHtmlHeader()}
-
-{@$isAdminKind = false}
-
-{@$isAdminKind = true}
-
+
+
+
+
{Context::getBodyHeader()}
{$content}
{Context::getHtmlFooter()}
+
-
+{$lang->msg_call_server}
-{@ $js_body_files = Context::getJsFile('body') }
-
-
+
+
+
+{"\n"}
diff --git a/common/tpl/mobile_layout.html b/common/tpl/mobile_layout.html
deleted file mode 100644
index f957cc7ef..000000000
--- a/common/tpl/mobile_layout.html
+++ /dev/null
@@ -1,73 +0,0 @@
-{@
- $lang_type = Context::getLangType();
- $ssl_actions = Context::getSSLActions();
- $css_files=Context::getCssFile();
- $js_files=Context::getJsFile();
-}
-
-
-
-
-
-
-
-
-
-{Context::getBrowserTitle()}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{Context::getHtmlHeader()}
-
-
-
-{Context::getBodyHeader()}
-{$content}
-{Context::getHtmlFooter()}
-
-
-
-{@ $js_body_files = Context::getJsFile('body') }
-
-
-
-
-
-
-
diff --git a/modules/admin/tpl/_footer.html b/modules/admin/tpl/_footer.html
index a5689eb6c..e60075e64 100644
--- a/modules/admin/tpl/_footer.html
+++ b/modules/admin/tpl/_footer.html
@@ -16,11 +16,5 @@
-
diff --git a/modules/admin/tpl/_header.html b/modules/admin/tpl/_header.html
index bb50a84f1..e1d0fe4dd 100644
--- a/modules/admin/tpl/_header.html
+++ b/modules/admin/tpl/_header.html
@@ -1,5 +1,14 @@
+