Commit a2495381 by Kang Donghun

#50169 コード整理、画面遷移検討

parent 7284ccb8
/**
* common js of app(web).
* The following is written.
* 1.language
* 2.loading
* 3.alert
* 4.url
* 5.cms communication
* 6.check if user is logged in
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var CHK_Common = {};
CHK_Common.lang;
/**
* get lang code in local storage
* web gets lang form local storage
* but app gets lnag from session storage
*/
CHK_Common.setLangCodeWeb = function () {
let lang = CHK_Common.getLangWeb();
if (lang.split('-')[0] == CHK_CONSTANT.LANG.English) {
lang = CHK_CONSTANT.LANG.ENGLISH;
} else if (lang.split('-')[0] == CHK_CONSTANT.LANG.KOREA) {
lang = CHK_CONSTANT.LANG.KOREA;
} else {
lang = CHK_CONSTANT.LANG.JAPAN;
}
CHK_Common.lang = lang;
};
/**
* get lang in local storage
*
* @returns String pageLang
*/
CHK_Common.getLangWeb = function () {
if (!CHK_Common.lang) {
let pageLang;
if (localStorage[CHK_CONSTANT.LANG.SAVE_NAME]) {
pageLang = localStorage[CHK_CONSTANT.LANG.SAVE_NAME];
} else {
pageLang = (window.navigator.languages && window.navigator.languages[0]) || window.navigator.language || window.navigator.userLanguage || window.navigator.browserLanguage;
localStorage[CHK_CONSTANT.LANG.SAVE_NAME] = pageLang;
}
return pageLang;
} else {
return CHK_Common.lang;
}
return pageLang;
};
/**
* change lang of html
*/
CHK_Common.updateLang = function () {
$('.multi-lang').each(function () {
const key = $(this).attr('data-msg');
if (key) {
if ($(this).prop('tagName').toLowerCase() == 'input' && ($(this).attr('type') == 'text' || $(this).attr('type') == 'search')) {
const attr = $(this).attr('placeholder');
if (typeof attr !== 'undefined' && attr !== false) {
$(this).attr('placeholder', CHK_Common.getMsg(key));
} else {
$(this).val(CHK_Common.getMsg(key));
}
} else {
$(this).html(CHK_Common.getMsg(key));
}
}
});
};
/**
* get any lang msg from CHK_Common.msgMap
*
* @param String key
* @returns String msg
*/
CHK_Common.getMsg = function (key) {
const msg = CHK_CONSTANT.MSG_MAP[key];
if (!msg) {
return '';
}
return msg[CHK_Common.lang];
};
/**
* show loading dialog
* show msg by key
*
* @param {String} key
*/
CHK_Common.showLoading = function () {
$('#check_loading').dialog({
dialogClass: 'noTitleDialog ui-dialog-titlebar dialogNoBorder', //cssを追加する必要がある
autoOpen: false,
resizable: false,
modal: true,
width: '100%',
title: ' ',
open: function (e) {
$(e.target).parent().css('background-color', 'rgba(128,128,128)');
$(e.target).parent().css('position', 'absolute');
$(e.target).parent().css('left', '50%');
$(e.target).parent().css('top', '25vh');
$(e.target).parent().css('transform', 'translateX(-50%)');
$(e.target).parent().css('-webkit- transform', 'translateY(-50%) translateX(-50%)');
$(e.target).parent().children('.ui-dialog-buttonpane').css('background-color', 'rgba(128,128,128)').css('border', 'none');
},
close: function () {},
});
$('#check_loading').dialog('open');
};
/**
* close loading
*/
CHK_Common.closeLoading = function () {
if ($('#check_loading').hasClass('ui-dialog-content')) {
$('#check_loading').dialog('close');
}
};
/**
* show alert
*
* @param {String} msgCode
*/
CHK_Common.displayAlert = function (msgCode, title) {
$('#alertMsg').html(CHK_Common.getMsg(msgCode));
$('.alert-overlay').removeClass('d-none');
$('.alert-area').removeClass('d-none');
const positionY = $(document).scrollTop() + screen.height / 8;
const height = screen.height / 4;
$('.alert-overlay').css('height', screen.height);
$('.alert-area').css('top', positionY);
$('.alert-area').css('min-height', height);
$('body').css('overflow', 'hidden');
};
/**
* close alert
*/
CHK_Common.alertClose = function () {
$('.alert-overlay').addClass('d-none');
$('.alert-area').addClass('d-none');
$('body').css('overflow', 'visible');
};
/**
* go Url page With Current Params
*
* ios will remove all web types data when reopen webview
* need add common parameters: app, lang, debug, mobile_flg, isChat, ...
*
* @param {String} url
* @param {Object} params
*/
CHK_Common.goUrlWithCurrentParams = function (url, params) {
if (!params) {
location.href = CHK_CONSTANT.URL.BASE_WEB + url;
}
const mixParams = Object.assign(CHK_Common.getUrlParameter(), params);
if (url.includes('?')) {
location.href = url + '&' + new URLSearchParams(mixParams);
} else {
location.href = url + '?' + new URLSearchParams(mixParams);
}
};
/**
* get url parameter
*
*/
CHK_Common.getUrlParameter = function () {
var ret = {};
if (location.search) {
var param = {};
location.search
.substring(1)
.split('&')
.forEach(function (val) {
var kv = val.split('=');
param[kv[0]] = kv[1];
});
ret = param;
}
console.log({ ret: ret });
return ret;
};
/**
* get sid in local Storage
*
* @returns sid
*/
CHK_Common.getSid = function () {
return ClientData.userInfo_sid();
};
/**
* cms communication
*
* @param {String} url
* @param {Json} param
* @param {boolean} async
* @param {Object} callback
* @param {Object} errorCallback
*/
CHK_Common.cmsAjax = function (url, param, async = true, type, dataType, callback, errorCallback) {
var sysSettings = AVWEB.avwSysSetting();
if (url) {
$.ajax({
type: type,
url: url,
data: param,
dataType: dataType,
cache: false,
async: async,
crossDomain: true,
beforeSend: function(xhr) {
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function (result) {
if (result.status == '200') {
if (callback) callback(result);
} else if (result.status == '401') {
CHK_Common.goUrlWithCurrentParams(CHK_CONSTANT.PAGE_NAME.LOGIN);
} else if (errorCallback) {
errorCallback();
} else {
CHK_Common.closeLoading();
CHK_Common.displayAlert(result.message);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
if (errorCallback) {
errorCallback();
} else {
CHK_Common.closeLoading();
CHK_Common.displayAlert('errorCommunicationFailed');
}
},
});
} else {
if (errorCallback) {
errorCallback();
} else {
CHK_Common.closeLoading();
CHK_Common.displayAlert('errorOccurred');
}
}
};
/**
* Communicate with cms and post
*
* @param {String} url
* @param {Object} params
* @param {String} method
*/
CHK_Common.postCommunication = function (url, params, method = 'post') {
const form = document.createElement('form');
form.method = method;
form.action = url;
for (const key in params) {
if (params.hasOwnProperty(key)) {
const hiddenField = document.createElement('input');
hiddenField.type = 'hidden';
hiddenField.name = key;
hiddenField.value = params[key];
form.appendChild(hiddenField);
}
}
document.body.appendChild(form);
form.submit();
};
/**
* Check if user is logged in
*
* @param {boolean} async
*/
CHK_Common.checkAuth = function (async = true) {
let params = {};
params.sid = CHK_Common.getSid;
var urlPath = ClientData.userInfo_accountPath();
const url = CHK_CONSTANT.URL.BASE_CMS + urlPath + CHK_CONSTANT.URL.BASE_CHECKAPI + CHK_CONSTANT.URL.AUTH_SESSION;
CHK_Common.cmsAjax(url, params, async, CONSTANT.API_TYPE.GET, CONSTANT.DATA_TYPE.TEXT, function () {
CHK_Common.goUrlWithCurrentParams(CHK_CONSTANT.PAGE_NAME.LOGIN);
});
};
......@@ -47,7 +47,7 @@ CHK_Footer.inactiveAllBottomNav = function() {
*/
CHK_Footer.goIndexPage = function(tabId) {
sessionStorage.activeTab = tabId;
CHK_Common.goUrlWithCurrentParams(DAFAULT_PAGE);
COMMON.goUrlWithCurrentParams(DAFAULT_PAGE);
}
/**
......@@ -55,7 +55,7 @@ CHK_Footer.goIndexPage = function(tabId) {
*/
CHK_Footer.isIndexPage = function() {
if (typeof location === 'object' && typeof location.pathname === 'string') {
if (location.pathname.includes(CHK_CONSTANT.PAGE_NAME.DEFAULT) == true) {
if (location.pathname.includes(CONSTANT.PAGE_NAME.DEFAULT) == true) {
return true;
}
}
......@@ -76,26 +76,26 @@ CHK_Footer.activeInitBottomNav = function(bottomNav) {
* Go page of dashboard
*/
CHK_Footer.goDashboard = function() {
sessionStorage.activeTab = CHK_CONSTANT.PAGE_TAB.DASHBOARD;
sessionStorage.activeTab = CONSTANT.PAGE_TAB.DASHBOARD;
CHK_Footer.activeInitBottomNav('dashboardBottomNav');
if (CHK_Footer.isIndexPage()) {
CHK_TOP.showPage(CHK_CONSTANT.PAGE_NAME.DASHBOARD);
TOP.showPage(CONSTANT.PAGE_NAME.DASHBOARD);
return;
}
CHK_Footer.goIndexPage(CHK_CONSTANT.PAGE_NAME.DASHBOARD);
CHK_Footer.goIndexPage(CONSTANT.PAGE_NAME.DASHBOARD);
}
/**
* Go page of operationList
*/
CHK_Footer.goOperationList = function() {
sessionStorage.activeTab = CHK_CONSTANT.PAGE_TAB.OPERATION_LIST;
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
CHK_Footer.activeInitBottomNav('operationListBottomNav');
if (CHK_Footer.isIndexPage()) {
CHK_TOP.showPage(CHK_CONSTANT.PAGE_NAME.OPERATION_LIST);
TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
return;
}
CHK_Footer.goIndexPage(CHK_CONSTANT.PAGE_NAME.OPERATION_LIST);
CHK_Footer.goIndexPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
}
/**
......@@ -103,10 +103,10 @@ CHK_Footer.goOperationList = function() {
* If it is no active tab, go to page in settings.
*/
CHK_Footer.initFooter = function() {
$("#footer").load(CHK_CONSTANT.PAGE_NAME.FOOTER, function() {
$("#footer").load(CONSTANT.PAGE_NAME.FOOTER, function() {
if (typeof sessionStorage != 'undefined' && typeof sessionStorage.activeTab != 'undefined') {
if (sessionStorage.activeTab == CHK_CONSTANT.PAGE_TAB.DASHBOARD) {
if (sessionStorage.activeTab == CONSTANT.PAGE_TAB.DASHBOARD) {
CHK_Footer.goDashboard();
} else {
CHK_Footer.goOperationList();
......
......@@ -3,9 +3,9 @@
*
* @since 1.4.3.2 & 1.4.3.3
*/
const CHK_CONSTANT = {};
const CONSTANT = {};
CHK_CONSTANT.SORT_TYPE = {
CONSTANT.SORT_TYPE = {
NAME: 0,
START_DATE_DESC: 1,
START_DATE_ASC: 2,
......@@ -13,39 +13,39 @@ CHK_CONSTANT.SORT_TYPE = {
LAST_EDIT_DATE: 4,
};
CHK_CONSTANT.PAGE_NAME = {
CONSTANT.PAGE_NAME = {
DASHBOARD: 'dashboard',
OPERATION_LIST: 'operationList',
FOOTER: 'main-footer.html',
DEFAULT: 'index.html',
LOGIN: 'login.html',
LOGIN: './login.html',
};
CHK_CONSTANT.PAGE_TAB = {
CONSTANT.PAGE_TAB = {
DASHBOARD: 'dashboard',
OPERATION_LIST: 'operationList',
};
CHK_CONSTANT.OPERATION_TYPE = {
CONSTANT.OPERATION_TYPE = {
LIST: '0',
DRAWING: '1',
VTOUR: '2',
PDF: '3',
};
CHK_CONSTANT.REPORT_TYPE = {
CONSTANT.REPORT_TYPE = {
REPORTONLY: '0',
INSPECT: '1',
WITHREPLY: '2',
WORKFLOW: '3',
};
CHK_CONSTANT.ADD_REPORT_FLG = {
CONSTANT.ADD_REPORT_FLG = {
UNABLE: '0',
ABLE: '1',
};
CHK_CONSTANT.URL = {
CONSTANT.URL = {
// BASE_CMS: 'https://' + location.host + '/checkapi/web/',
BASE_CMS: 'http://localhost:8080/acms/',
BASE_CHECKAPI: '/checkapi/web/',
......@@ -64,14 +64,51 @@ CONSTANT.DATA_TYPE = {
JSON: 'json',
}
CHK_CONSTANT.LANG = {
CONSTANT.LANG = {
SAVE_NAME: 'lang',
JAPAN: 'ja',
KOREA: 'ko',
ENGLISH: 'en',
};
CHK_CONSTANT.MSG_MAP = {
CONSTANT.KEYS = {
userInfo_loginId : 'loginId',
// Local :ユーザ情報(userInfo)_アカウントパス:String
userInfo_accountPath : 'accountPath',
// Local :ユーザ情報(userInfo)_アカウント情報記憶フラグ:Char(Y:可能, N:不可)
userInfo_rememberLogin : 'rememberLogin',
// Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime
userInfo_lastLoginTime : 'lastLoginTime',
// Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime
userInfo_pwdSkipDt : 'pwdSkipDt',
// Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
// Session/local:ユーザ情報(userInfo)_セッションID:String
userInfo_sid : 'sid',
userInfo_sid_preview : 'sidPreview',
// Session :事業者オプション(serviceOpt)_初回ログイン時パスワード強制変更:Integer(0:なし, 1:催促, 2:強制)
serviceOpt_force_pw_change_on_login : 'force_pw_change_on_login',
// Session :事業者オプション(serviceOpt)_定期ログイン時パスワード強制変更:Integer(0:なし, 1:催促, 2:強制)
serviceOpt_force_pw_change_periodically : 'force_pw_change_periodically',
// Session:事業者オプション(serviceOpt)_メモ・マーキングデータバックアップ使用:Char(Y:可能, N:不可)
userInfo_userName : 'userInfo_userName',
// Local:セッションID:String
userInfo_sid_bak : 'sid_bak',
// Session :通知情報(pushInfo)_新着件数:Interger
pushInfo_newMsgNumber : 'pushInfo_newMsgNumber',
conf_apiUrl : 'conf_apiUrl',
conf_apiLoginUrl : 'conf_apiLoginUrl',
conf_apiResourceDlUrl : 'conf_apiResourceDlUrl',
// Session :ABookCheck:Char(Y:有効, N:無効)
serviceOpt_abook_check : 'abook_check',
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_usable_push_message : 'usable_push_message',
// Local
IsJumpBack : 'IsJumpBack',
// Local:
JumpQueue : 'JumpQueue',
}
CONSTANT.MSG_MAP = {
all: { ja: '全て', ko: '전체', en: 'All' },
dateError: { ja: '開始日は終了日の前に設定してください。', ko: '잘못된 검색일입니다.', en: 'Please enter correct search date.' },
operationListTitle: { ja: 'トップページ|A Book Check', ko: '톱 페이지|A Book Check', en: 'Top Page|A Book Check' },
......
/**
* Common js for footer.
* ※Code is written mainly for dashboard and operationList.
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var FOOTER = {};
/**
* Change specific footer bottom to active.
*
* @param {String} bottomNavId
*/
FOOTER.activeBottomNav = function (bottomNavId) {
let elm = $('#' + bottomNavId);
if (typeof elm !== 'object') {
console.log('FOOTER.activeBottomNav:elm !== object:' + bottomNavId);
return;
}
elm.removeClass('text-secondary');
elm.addClass('text-primary');
let img = elm.find('img')[0];
if (img && img.getAttribute('data-src')) {
img.src = img.getAttribute('data-src');
}
};
/**
* change inactive all footer bottom
*/
FOOTER.inactiveAllBottomNav = function () {
let navs = document.getElementsByClassName('bottom-nav');
for (i = 0; i < navs.length; i++) {
navs[i].className = navs[i].className.replace('text-primary', 'text-secondary');
let img = navs[i].querySelector('img');
if (img && img.getAttribute('data-inactive-src')) {
img.src = img.getAttribute('data-inactive-src');
}
}
};
/**
* Go page of index.html.
* Store tab id in session for want to show display.
*
* @param {String} tabId
*/
FOOTER.goIndexPage = function (tabId) {
sessionStorage.activeTab = tabId;
COMMON.goUrlWithCurrentParams(DAFAULT_PAGE);
};
/**
* is the url index.html?
*/
FOOTER.isIndexPage = function () {
if (typeof location === 'object' && typeof location.pathname === 'string') {
if (location.pathname.includes(CONSTANT.PAGE_NAME.DEFAULT) == true) {
return true;
}
}
return false;
};
/**
* Initialize with any navigation
*
* @param {String} bottomNav
*/
FOOTER.activeInitBottomNav = function (bottomNav) {
FOOTER.inactiveAllBottomNav();
FOOTER.activeBottomNav(bottomNav);
};
/**
* Go page of dashboard
*/
FOOTER.goDashboard = function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.DASHBOARD;
FOOTER.activeInitBottomNav('dashboardBottomNav');
if (FOOTER.isIndexPage()) {
TOP.showPage(CONSTANT.PAGE_NAME.DASHBOARD);
return;
}
FOOTER.goIndexPage(CONSTANT.PAGE_NAME.DASHBOARD);
};
/**
* Go page of operationList
*/
FOOTER.goOperationList = function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
FOOTER.activeInitBottomNav('operationListBottomNav');
if (FOOTER.isIndexPage()) {
TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
return;
}
FOOTER.goIndexPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
};
/**
* Go to active tab when footer was loaded.
* If it is no active tab, go to page in settings.
*/
FOOTER.initFooter = function () {
$('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () {
if (typeof sessionStorage != 'undefined' && typeof sessionStorage.activeTab != 'undefined') {
if (sessionStorage.activeTab == CONSTANT.PAGE_TAB.DASHBOARD) {
FOOTER.goDashboard();
} else {
FOOTER.goOperationList();
}
return;
}
FOOTER.goOperationList();
// CHK.loadDashboardSetting(function() {
// if (CHK.dashboardSetting.dashboardHome) {
// FOOTER.goDashboard();
// } else {
// FOOTER.goOperationList();
// }
// });
});
};
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,20 +16,20 @@
<script src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script src="/abvw/common/js/web/common.js?__UPDATEID__"></script>
<script src="/abvw/common/js/web/avweb.js?__UPDATEID__"></script>
<script src="/abvw/common/js/appCommon/constant.js?__UPDATEID__"></script>
<script src="/abvw/common/js/appCommon/check-common.js?__UPDATEID__"></script>
<!-- <script src="/abvw/common/js/web/common.js?__UPDATEID__"></script>
<script src="/abvw/common/js/web/avweb.js?__UPDATEID__"></script> -->
<script src="/abvw/common/js/constant.js?__UPDATEID__"></script>
<script src="/abvw/common/js/common.js?__UPDATEID__"></script>
<script src="/abvw/js/operationList/operationList.js?__UPDATEID__"></script>
<script src="/abvw/js/topPage/topPage.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboard/check-dashboard.js?__UPDATEID__"></script>
<script src="/abvw/common/js/appCommon/check-footer.js?__UPDATEID__"></script>
<script src="/abvw/common/js/footer.js?__UPDATEID__"></script>
<script src="/abvw/common/js/appCommon/app.js?__UPDATEID__" defer></script>
</head>
<body onload="CHK_TOP.init();" style="position: relative; margin-top: 53px;">
<body onload="TOP.init();" style="position: relative; margin-top: 53px;">
<!--作業一覧画面-->
<section id="operationList" class="page-content" style="display: none;">
......@@ -38,7 +38,7 @@
<header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;">
<nav class="navbar navbar-dark bg-primary">
<div>
<a class="navbar-brand category-btn lht-0 d-none" onclick="CHK_OL.openCategory();" id="operationGroupMasterButton">
<a class="navbar-brand category-btn lht-0 d-none" onclick="OL.openCategory();" id="operationGroupMasterButton">
<i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i>
<span class="d-none d-md-inline fs-10 multi-lang" data-msg="buttonCategory"></span>
</a>
......@@ -53,7 +53,7 @@
<nav id="category-menu" class="drawer-menu">
<div class="d-flex justifyfont-weight-bold fs-13 p-3 mb-0 multi-lang" data-msg="buttonCategory"></h2>
<a class="category-content-between border-bottom">
<h2 class="text-nowrap -btn p-3" onclick="CHK_OL.openCategory();" href="#"><i class="fa fa-times"></i></a>
<h2 class="text-nowrap -btn p-3" onclick="OL.openCategory();" href="#"><i class="fa fa-times"></i></a>
</div>
</nav>
</section>
......@@ -74,7 +74,7 @@
<div class="form-group has-search input-group">
<input type="text" class="form-control multi-lang" data-msg="placeholderOperationName" placeholder="placeholderOperationName" id="searchTaskName">
<div class="input-group-append">
<i class="fas fa-search input-group-text" onclick="CHK_OL.search();"></i>
<i class="fas fa-search input-group-text" onclick="OL.search();"></i>
</div>
</div>
</div>
......@@ -124,12 +124,12 @@
<span class="d-none d-md-inline text-dark fs-10 align-middle multi-lang" data-msg="labelSort"></span>
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortName" data-sort="0" onclick="CHK_OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type active multi-lang" data-msg="labelSortNew" data-sort="1" id="defaultSort" onclick="CHK_OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOld" data-sort="2" onclick="CHK_OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOpen" data-sort="4" onclick="CHK_OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortName" data-sort="0" onclick="OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type active multi-lang" data-msg="labelSortNew" data-sort="1" id="defaultSort" onclick="OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOld" data-sort="2" onclick="OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOpen" data-sort="4" onclick="OL.changeSortType(this);"></a>
</div>
<a href="javascript:CHK_OL.resetSearch();" class="text-decoration-none py-2 lht-0 d-inline-block ml-3">
<a href="javascript:OL.resetSearch();" class="text-decoration-none py-2 lht-0 d-inline-block ml-3">
<img class="icon" src="/abvw/img/operationList/icon_clear.svg">
<span class="d-none d-md-inline text-dark fs-10 align-middle multi-lang" data-msg="labelReset" lnag="labelReset"></span>
</a>
......@@ -190,7 +190,7 @@
<!--アラート-->
<div class="alert-overlay d-none"></div>
<div class="alert-area d-none">
<i class="text-right fas fa-times fa-2x loading-close" onclick="CHK_Common.alertClose();"></i>
<i class="text-right fas fa-times fa-2x loading-close" onclick="COMMON.alertClose();"></i>
<div class="fs-13 mt-4 text-left" style="padding: 15px;" id="alertMsg"></div>
</div>
......
......@@ -11,28 +11,19 @@
<title></title>
<link rel="stylesheet" type="text/css" href="/abvw/common/css/web/common.css?__UPDATEID__1" />
<!-- <link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery-ui.css?__UPDATEID__" /> -->
<link rel="stylesheet" type="text/css" href="/abvw/common/css/jquery/jquery-ui.min.css?__UPDATEID__1" />
<link rel="stylesheet" type="text/css" href="/abvw/common/css/jquery/jquery-ui.structure.min.css?__UPDATEID__1" />
<link rel="stylesheet" type="text/css" href="/abvw/common/css/jquery/jquery-ui.theme.min.css?__UPDATEID__1" />
<!-- <link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery.toastmessage.css?__UPDATEID__" /> -->
<link rel="stylesheet" type="text/css" href="/abvw/css/login/login.css?__UPDATEID__1" />
<link rel="stylesheet" type="text/css" href="/abvw/css/login/login_validation.css?__UPDATEID__1" />
<!-- <link rel="stylesheet" type="text/css" href="./abvw/css/layout/limit_access.css?__UPDATEID__" /> -->
<link rel="stylesheet" type="text/css" href="/abvw/common/css/web/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="/abvw/common/css/jquery/jquery-ui.min.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="/abvw/common/css/jquery/jquery-ui.structure.min.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="/abvw/common/css/jquery/jquery-ui.theme.min.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="/abvw/css/login/login.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="/abvw/css/login/login_validation.css?__UPDATEID__" />
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__1"></script>
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__1"></script>
<!-- <script type="text/javascript" src="./abvw/common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>-->
<!-- <script type="text/javascript" src="./abvw/common/js/jquery-ui-1.8.23.custom.min.js?__UPDATEID__"></script> -->
<!-- <script type="text/javascript" src="./abvw/common/js/jquery.toastmessage.js?__UPDATEID__"></script> -->
<!-- <script type="text/javascript" src="./abvw/common/js/screenLock.js?__UPDATEID__" ></script> -->
<script type="text/javascript" src="/abvw/common/js/web/thickbox.js?__UPDATEID__1"></script>
<script type="text/javascript" src="/abvw/common/js/web/avweb.js?__UPDATEID__1"></script>
<script type="text/javascript" src="/abvw/common/js/web/i18n.js?__UPDATEID__1"></script>
<script type="text/javascript" src="/abvw/common/js/web/common.js?__UPDATEID__1"></script>
<!-- <script type="text/javascript" src="./abvw/js/Limit_Access_Content.js?__UPDATEID__"></script> -->
<script type="text/javascript" src="/abvw/js/login/login.js?__UPDATEID__1"></script>
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/web/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/constant.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/js/login/login.js?__UPDATEID__"></script>
<!--[if gte IE 9]>
<style type="text/css">
......
......@@ -40,7 +40,7 @@ LOGIN.saveLoginInfo = function() {
I18N.changeLanguage(lang);
// Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData.common_contentDataChkFlg(true);
// ClientData.common_contentDataChkFlg(true);
var accountPath, loginId, password;
var chkRemember = $('#chkRemember').attr('checked');
......@@ -76,9 +76,9 @@ LOGIN.saveLoginInfo = function() {
LOGIN.checkValidation = function() {
// 暗号化モードならチェック無し
if (ClientData.serviceOpt_encryption() == 'Y') {
return true;
}
// if (ClientData.serviceOpt_encryption() == 'Y') {
// return true;
// }
var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val();
......@@ -171,7 +171,7 @@ LOGIN.processLogin = function() {
// Get url to login
var apiLoginUrl = ClientData.conf_apiLoginUrl(); // sysSettings.apiLoginUrl;
AVWEB.avwCmsApiWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params, function(data) {
COMMON.callCmsApi(apiLoginUrl, null, 'webClientLogin', 'GET', params, true, function(data) {
LOGIN.userinfo_sid = data.sid;
LOGIN.userInfo_userName = data.userName;
LOGIN.optionList = data.serviceOptionList;
......@@ -186,9 +186,9 @@ LOGIN.processLogin = function() {
$('#main-error-message').css('display', 'none');
if (ClientData.serviceOpt_encryption() == 'Y') {
data.requirePasswordChange = 0;
}
// if (ClientData.serviceOpt_encryption() == 'Y') {
// data.requirePasswordChange = 0;
// }
console.log("data.requirePasswordChange:" + data.requirePasswordChange);
console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check());
......@@ -198,7 +198,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
} else if (data.requirePasswordChange == 1) {
......@@ -227,7 +227,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
$('#btnSkip').show();
......@@ -238,7 +238,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
}
} else if (data.requirePasswordChange == 2) {
......@@ -261,7 +261,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
......@@ -279,12 +279,12 @@ LOGIN.processLogin = function() {
} else { // No need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
}
}
} else {
LOGIN.login_errorMessage = data.errorMessage;
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show();
}
......@@ -294,9 +294,9 @@ LOGIN.processLogin = function() {
if (xhr.responseText && xhr.status != 0) {
LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString());
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), JSON.parse(xhr.responseText).errorMessage).toString());
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
}
$('#main-error-message').show();
});
......@@ -327,9 +327,9 @@ LOGIN.changePasswordProcess = function() {
if (ClientData.serviceOpt_abook_check() == 'Y') {
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
}
......@@ -343,38 +343,38 @@ LOGIN.changePasswordProcess = function() {
$('#dialog-error-message').show();
} else {
// Show systemerror
AVWEB.showSystemError();
COMMON.showSystemError();
}
});
};
// Change Language Japanese
LOGIN.changeLanguageJa = function() {
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ja);
I18N.changeLanguage(CONSTANT.LANG.JAPAN);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja);
if (LOGIN.login_errorMessage != "") {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
};
// Change Language Korean
LOGIN.changeLanguageKo = function() {
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ko);
I18N.changeLanguage(CONSTANT.LANG.KOREA);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
if (LOGIN.login_errorMessage != "") {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
};
// Change Language English
LOGIN.changeLanguageEn = function() {
I18N.changeLanguage(COMMON.Consts.ConstLanguage_En);
I18N.changeLanguage(CONSTANT.LANG.ENGLISH);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
if (LOGIN.login_errorMessage != "") {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
};
......@@ -401,9 +401,9 @@ LOGIN.skipPassFunction = function() {
if (ClientData.serviceOpt_abook_check() == 'Y') {
// ホームへ移動
AVWEB.avwScreenMove("index.html");
COMMON.avwScreenMove("index.html");
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
}
......@@ -431,10 +431,6 @@ LOGIN.saveServiceUserOption = function() {
ClientData.serviceOpt_force_pw_change_periodically(option.value);
} else if (option.serviceOptionId == 21) {
ClientData.serviceOpt_force_pw_change_on_login(option.value);
} else if (option.serviceOptionId == 71) {
ClientData.serviceOpt_usable_readinglog_gps(option.value);
} else if (option.serviceOptionId == 72) {
ClientData.serviceOpt_usable_readinglog_object(option.value);
} else if (option.serviceOptionId == 49) {
ClientData.serviceOpt_usable_push_message(option.value);
} else if (option.serviceOptionId == 161) {
......@@ -513,7 +509,7 @@ LOGIN.showAlertScreen = function(errMes, scrMove) {
$('.toast-item-close').live('click', function() {
COMMON.unlockLayout();
if (scrMove) {
AVWEB.avwScreenMove(scrMove);
COMMON.avwScreenMove(scrMove);
}
});
};
......@@ -523,20 +519,13 @@ LOGIN.ready = function() {
// セッションストレージクリア
SessionStorageUtils.clear();
AVWEB.avwUserSessionObj = null;
COMMON.userSessionObj = null;
// create new session
AVWEB.avwCreateUserSession();
COMMON.createUserSession();
I18N.initi18n();
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
var sysSettings = COMMON.sysSetting(); // get info in conf.json
// モード初期化
ClientData.isGetitsMode(false);
ClientData.isStreamingMode(false);
ClientData.isCheckViewMode(false);
ClientData.isCheckMode(false);
ClientData.storeUrl("");
// getitsサーバー設定確認
if (sysSettings.apiUrl == "") {
......@@ -546,10 +535,7 @@ LOGIN.ready = function() {
var storeUrl = COMMON.getUrlParam('storeUrl', '');
if (siteUrl != "" && urlPath != "") {
// getitsモード有効
ClientData.isGetitsMode(true);
ClientData.siteUrl(siteUrl);
// ClientData.siteUrl(siteUrl);
// api接続先設定
ClientData.conf_apiUrl(siteUrl + "{0}/abvapi");
ClientData.conf_apiLoginUrl(siteUrl + "nuabvapi");
......@@ -559,8 +545,6 @@ LOGIN.ready = function() {
ClientData.userInfo_accountPath_session(urlPath);
ClientData.userInfo_loginId("");
ClientData.userInfo_loginId_session("");
// ストア遷移用のURL
ClientData.storeUrl(storeUrl);
}
......
......@@ -5,28 +5,25 @@
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var CHK_TOP = {};
var TOP = {};
$(document).ready(function () {
//setting lang info
CHK_Common.setLangCodeWeb();
COMMON.setLangCodeWeb();
//Check if user is logged in
CHK_Common.checkAuth(false);
COMMON.checkAuth(false);
//setting msg of html
CHK_Common.updateLang();
COMMON.updateLang();
});
/**
* show page
*/
CHK_TOP.init = function() {
CHK_Common.showLoading();
CHK_Footer.initFooter();//app should get data after initFooter
CHK_Common.closeLoading();
TOP.init = function () {
COMMON.showLoading();
FOOTER.initFooter(); //app should get data after initFooter
COMMON.closeLoading();
};
/**
......@@ -34,12 +31,12 @@ CHK_TOP.init = function() {
*
* @param {String} pageId
*/
CHK_TOP.showPage = function(pageId) {
TOP.showPage = function(pageId) {
//get data
if (pageId == CHK_CONSTANT.PAGE_NAME.OPERATION_LIST) {
CHK_OL.init();
} else if (pageId == CHK_CONSTANT.PAGE_NAME.DASHBOARD) {
if (pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) {
OL.init();
} else if (pageId == CONSTANT.PAGE_NAME.DASHBOARD) {
CHK_Dashboard.init();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment