Commit ec36c21c by Takumi Imai

Merge branch 'feature/1.0_check_web_dev' into feature/1.0_check_web_dev_imai

# Conflicts:
#	abvw/common/js/appCommon/check-common.js
#	abvw/common/js/appCommon/check-footer.js
#	abvw/common/js/constant.js
#	abvw/js/operationList/operationList.js
#	abvw/js/topPage/topPage.js
parents f235a516 a5359e8b
...@@ -47,7 +47,7 @@ FOOTER.inactiveAllBottomNav = function () { ...@@ -47,7 +47,7 @@ FOOTER.inactiveAllBottomNav = function () {
*/ */
FOOTER.goIndexPage = function (tabId) { FOOTER.goIndexPage = function (tabId) {
sessionStorage.activeTab = tabId; sessionStorage.activeTab = tabId;
CHK_Common.goUrlWithCurrentParams(DAFAULT_PAGE); COMMON.goUrlWithCurrentParams(DAFAULT_PAGE);
}; };
/** /**
......
...@@ -18,7 +18,7 @@ CONSTANT.PAGE_NAME = { ...@@ -18,7 +18,7 @@ CONSTANT.PAGE_NAME = {
OPERATION_LIST: 'operationList', OPERATION_LIST: 'operationList',
FOOTER: 'main-footer.html', FOOTER: 'main-footer.html',
DEFAULT: 'index.html', DEFAULT: 'index.html',
LOGIN: 'login.html', LOGIN: './login.html',
}; };
CONSTANT.PAGE_TAB = { CONSTANT.PAGE_TAB = {
...@@ -61,6 +61,43 @@ CONSTANT.LANG = { ...@@ -61,6 +61,43 @@ CONSTANT.LANG = {
ENGLISH: 'en', ENGLISH: 'en',
}; };
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 = { CONSTANT.MSG_MAP = {
all: { ja: '全て', ko: '전체', en: 'All' }, all: { ja: '全て', ko: '전체', en: 'All' },
dateError: { ja: '開始日は終了日の前に設定してください。', ko: '잘못된 검색일입니다.', en: 'Please enter correct search date.' }, dateError: { ja: '開始日は終了日の前に設定してください。', ko: '잘못된 검색일입니다.', en: 'Please enter correct search date.' },
......
/**
* 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();
// }
// });
});
};
/*
* String utilities [ end ]
*/
// =============================================================================================
// Utils for string, date, number [ end ]
// =============================================================================================
var ValidationUtil = {
// 必須: Text
CheckRequiredForText : function(value) {
if (value == null || value == '') {
return false;
}
return true;
},
// get byte count
GetByteCount : function(value) {
var escapedStr = encodeURI(value);
if (escapedStr.indexOf("%") != -1) {
var count = escapedStr.split("%").length - 1;
if (count == 0)
count++; // perverse case; can't happen with real UTF-8
var tmp = escapedStr.length - (count * 3);
count = count + tmp;
} else {
count = escapedStr.length;
}
return count;
},
// 最小文字数
CheckMinLengthForByte : function(value, len) {
if (this.GetByteCount(value) < len)
return false;
return true;
},
// 最大文字数
CheckMaxLengthForByte : function(value, len) {
if (this.GetByteCount(value) > len)
return false;
return true;
},
// 半数字
IsNumber : function(value) {
var reg = new RegExp("^[0-9]+$");
return reg.test(value);
},
// 半英字
IsAlphabet : function(value) {
var reg = new RegExp("^[a-zA-Z]+$");
return reg.test(value);
},
// 半記号
IsSymbol : function(value) {
var reg = new RegExp(
"\u005b\u005e\u0027\u0060\u0027\u007e\u0027\u0021\u0027\u0040\u0027\u0023\u0027\u0024\u0027\u0025\u0027\u005e\u0027\u0026\u0027\u002a\u0027\u0028\u0027\u0029\u0027\u005f\u0027\u002b\u0027\u003d\u0027\u007b\u0027\u007d\u0027\u007c\u0027\u003a\u0027\u0022\u0027\u003b\u0027\u0027\u0027\u003c\u0027\u003e\u0027\u003f\u0027\u002f\u0027\u002e\u0027\u002c\u005c\u002d\u005b\u005c\u005d\u005c\u005c\u005d");
return !reg.test(value);
},
// メール
CheckEmailValid : function(value) {
// Check if string is a valid email address
var reg = new RegExp("^[0-9a-zA-Z]+@[0-9a-zA-Z]+[\\.]{1}[0-9a-zA-Z]+[\\.]?[0-9a-zA-Z]+$");
return reg.test(value);
},
// Password
CheckPasswordValid : function(value) {
// Check if string is a valid email address
var reg = new RegExp("^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[#+-\\./:_]).{1,47}$");
return reg.test(value);
},
// Alphabet + Nunber + Symbol
IsAlphabetOrNumberOrSymbol : function(value) {
// Check if string is alphabet or number or symbol
var reg = new RegExp(
"\u005b\u005e\u0061\u002d\u007a\u0041\u002d\u005a\u0030\u002d\u0039\u0027\u0060\u0027\u007e\u0027\u0021\u0027\u0040\u0027\u0023\u0027\u0024\u0027\u0025\u0027\u005e\u0027\u0026\u0027\u002a\u0027\u0028\u0027\u0029\u0027\u005f\u0027\u002b\u0027\u003d\u0027\u007b\u0027\u007d\u0027\u007c\u0027\u003a\u0027\u0022\u0027\u003b\u0027\u0027\u0027\u003c\u0027\u003e\u0027\u003f\u0027\u002f\u0027\u002e\u0027\u002c\u005c\u002d\u005b\u005c\u005d\u005c\u005c\u005d");
return !reg.test(value);
},
// Get the total of types in array
CheckNumberOfTypeInString : function(value) {
var list = new Array();
var c;
for ( var i = 0; i < value.length; i++) {
c = value[i];
for ( var j = i + 1; j < value.length; j++) {
if (value[j] == c) {
value = value.slice(0, j) + value.slice(j + 1, value.len);
j = j - 1;
}
}
list[i] = c;
}
var count = list.length;
return count
},
// Special character: *
IsCharacterSpecial : function(value) {
for ( var i = 0; i < value.length; i++) {
if (value[i] == '*')
return true;
}
return false;
},
// 半記号
IsPasswordSymbol : function(value) {
var reg = new RegExp("\u005b\u005e\u0027\u0023\u0027\u002b\u005c\u002d\u0027\u002e\u0027\u002f\u0027\u003a\u0027\u005f\u005d");
return !reg.test(value);
},
// 半記号
IsPasswordAlphabetOrNumerOrSymbol : function(value) {
var reg = new RegExp("\u005b\u005e\u0061\u002d\u007a\u0041\u002d\u005a\u0030\u002d\u0039\u0027\u0023\u0027\u002b\u005c\u002d\u0027\u002e\u0027\u002f\u0027\u003a\u0027\u005f\u005d");
return !reg.test(value);
},
HasSeqChar : function(value, num) {
var count = 0;
var prev = 0;
for (var i = 0; i < str.length(); i++) {
var c = str.charAt(i);
if (i > 0 && prev == c) {
count++;
if (count == num - 1) {
return true;
}
}
else {
count = 0;
}
prev = c;
}
return false;
},
ContainSameSeqChar : function(str1, str2, num) {
if (str2.length < num || str1.length < num) {
return false;
}
for (var i = 0; i <= str2.length - num; i++) {
var target = str2.substring(i, i + num);
if (str1.contains(target)) {
return true;
}
}
return false;
}
};
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -16,20 +16,20 @@ ...@@ -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-3.6.0.min.js?__UPDATEID__"></script>
<script src="/abvw/common/js/jquery/jquery-ui.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/common.js?__UPDATEID__"></script>
<script src="/abvw/common/js/web/avweb.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/constant.js?__UPDATEID__"></script>
<script src="/abvw/common/js/appCommon/check-common.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/operationList/operationList.js?__UPDATEID__"></script>
<script src="/abvw/js/topPage/topPage.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/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"></script>
<script src="/abvw/js/dashboard/check-dashboard.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> <script src="/abvw/common/js/appCommon/app.js?__UPDATEID__" defer></script>
</head> </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;"> <section id="operationList" class="page-content" style="display: none;">
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<!--アラート--> <!--アラート-->
<div class="alert-overlay d-none"></div> <div class="alert-overlay d-none"></div>
<div class="alert-area d-none"> <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 class="fs-13 mt-4 text-left" style="padding: 15px;" id="alertMsg"></div>
</div> </div>
......
...@@ -11,28 +11,20 @@ ...@@ -11,28 +11,20 @@
<title></title> <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/web/common.css?__UPDATEID__" />
<!-- <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__" />
<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__" />
<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__" />
<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/css/login/login.css?__UPDATEID__" />
<!-- <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_validation.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__" /> -->
<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-3.6.0.min.js?__UPDATEID__"></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/jquery-ui.min.js?__UPDATEID__"></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/web/i18n.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/constant.js?__UPDATEID__"></script>
<!-- <script type="text/javascript" src="./abvw/common/js/jquery.toastmessage.js?__UPDATEID__"></script> --> <script type="text/javascript" src="/abvw/common/js/validation.js?__UPDATEID__"></script>
<!-- <script type="text/javascript" src="./abvw/common/js/screenLock.js?__UPDATEID__" ></script> --> <script type="text/javascript" src="/abvw/common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/web/thickbox.js?__UPDATEID__1"></script> <script type="text/javascript" src="/abvw/js/login/login.js?__UPDATEID__"></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>
<!--[if gte IE 9]> <!--[if gte IE 9]>
<style type="text/css"> <style type="text/css">
......
...@@ -40,7 +40,7 @@ LOGIN.saveLoginInfo = function() { ...@@ -40,7 +40,7 @@ LOGIN.saveLoginInfo = function() {
I18N.changeLanguage(lang); I18N.changeLanguage(lang);
// Set flag コンテンツデータチェックフラグ = true to sync local with server // Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData.common_contentDataChkFlg(true); // ClientData.common_contentDataChkFlg(true);
var accountPath, loginId, password; var accountPath, loginId, password;
var chkRemember = $('#chkRemember').attr('checked'); var chkRemember = $('#chkRemember').attr('checked');
...@@ -76,9 +76,9 @@ LOGIN.saveLoginInfo = function() { ...@@ -76,9 +76,9 @@ LOGIN.saveLoginInfo = function() {
LOGIN.checkValidation = function() { LOGIN.checkValidation = function() {
// 暗号化モードならチェック無し // 暗号化モードならチェック無し
if (ClientData.serviceOpt_encryption() == 'Y') { // if (ClientData.serviceOpt_encryption() == 'Y') {
return true; // return true;
} // }
var accountPath = $('#txtAccPath').val(); var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val(); var loginId = $('#txtAccId').val();
...@@ -171,7 +171,7 @@ LOGIN.processLogin = function() { ...@@ -171,7 +171,7 @@ LOGIN.processLogin = function() {
// Get url to login // Get url to login
var apiLoginUrl = ClientData.conf_apiLoginUrl(); // sysSettings.apiLoginUrl; 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_sid = data.sid;
LOGIN.userInfo_userName = data.userName; LOGIN.userInfo_userName = data.userName;
LOGIN.optionList = data.serviceOptionList; LOGIN.optionList = data.serviceOptionList;
...@@ -186,9 +186,9 @@ LOGIN.processLogin = function() { ...@@ -186,9 +186,9 @@ LOGIN.processLogin = function() {
$('#main-error-message').css('display', 'none'); $('#main-error-message').css('display', 'none');
if (ClientData.serviceOpt_encryption() == 'Y') { // if (ClientData.serviceOpt_encryption() == 'Y') {
data.requirePasswordChange = 0; // data.requirePasswordChange = 0;
} // }
console.log("data.requirePasswordChange:" + data.requirePasswordChange); console.log("data.requirePasswordChange:" + data.requirePasswordChange);
console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check()); console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check());
...@@ -198,7 +198,7 @@ LOGIN.processLogin = function() { ...@@ -198,7 +198,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} else if (data.requirePasswordChange == 1) { } else if (data.requirePasswordChange == 1) {
...@@ -227,7 +227,7 @@ LOGIN.processLogin = function() { ...@@ -227,7 +227,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} else if (numDay > 30) { } else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
$('#btnSkip').show(); $('#btnSkip').show();
...@@ -238,7 +238,7 @@ LOGIN.processLogin = function() { ...@@ -238,7 +238,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} }
} else if (data.requirePasswordChange == 2) { } else if (data.requirePasswordChange == 2) {
...@@ -261,7 +261,7 @@ LOGIN.processLogin = function() { ...@@ -261,7 +261,7 @@ LOGIN.processLogin = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} else if (numDay > 30) { } else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog(); LOGIN.OpenChangePasswordDialog();
...@@ -279,12 +279,12 @@ LOGIN.processLogin = function() { ...@@ -279,12 +279,12 @@ LOGIN.processLogin = function() {
} else { // No need to change password } else { // No need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} }
} }
} else { } else {
LOGIN.login_errorMessage = data.errorMessage; 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(); $('#main-error-message').show();
} }
...@@ -294,9 +294,9 @@ LOGIN.processLogin = function() { ...@@ -294,9 +294,9 @@ LOGIN.processLogin = function() {
if (xhr.responseText && xhr.status != 0) { if (xhr.responseText && xhr.status != 0) {
LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage; 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 { } 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(); $('#main-error-message').show();
}); });
...@@ -327,9 +327,9 @@ LOGIN.changePasswordProcess = function() { ...@@ -327,9 +327,9 @@ LOGIN.changePasswordProcess = function() {
if (ClientData.serviceOpt_abook_check() == 'Y') { if (ClientData.serviceOpt_abook_check() == 'Y') {
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} else { } 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(); $('#main-error-message').show();
} }
...@@ -343,38 +343,38 @@ LOGIN.changePasswordProcess = function() { ...@@ -343,38 +343,38 @@ LOGIN.changePasswordProcess = function() {
$('#dialog-error-message').show(); $('#dialog-error-message').show();
} else { } else {
// Show systemerror // Show systemerror
AVWEB.showSystemError(); COMMON.showSystemError();
} }
}); });
}; };
// Change Language Japanese // Change Language Japanese
LOGIN.changeLanguageJa = function() { LOGIN.changeLanguageJa = function() {
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ja); I18N.changeLanguage(CONSTANT.LANG.JAPAN);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle'); document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja); // ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja);
if (LOGIN.login_errorMessage != "") { 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 // Change Language Korean
LOGIN.changeLanguageKo = function() { LOGIN.changeLanguageKo = function() {
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ko); I18N.changeLanguage(CONSTANT.LANG.KOREA);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle'); document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko); // ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
if (LOGIN.login_errorMessage != "") { 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 // Change Language English
LOGIN.changeLanguageEn = function() { LOGIN.changeLanguageEn = function() {
I18N.changeLanguage(COMMON.Consts.ConstLanguage_En); I18N.changeLanguage(CONSTANT.LANG.ENGLISH);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle'); document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En); // ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
if (LOGIN.login_errorMessage != "") { 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() { ...@@ -401,9 +401,9 @@ LOGIN.skipPassFunction = function() {
if (ClientData.serviceOpt_abook_check() == 'Y') { if (ClientData.serviceOpt_abook_check() == 'Y') {
// ホームへ移動 // ホームへ移動
AVWEB.avwScreenMove("index.html"); COMMON.avwScreenMove("index.html");
} else { } 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(); $('#main-error-message').show();
} }
...@@ -431,10 +431,6 @@ LOGIN.saveServiceUserOption = function() { ...@@ -431,10 +431,6 @@ LOGIN.saveServiceUserOption = function() {
ClientData.serviceOpt_force_pw_change_periodically(option.value); ClientData.serviceOpt_force_pw_change_periodically(option.value);
} else if (option.serviceOptionId == 21) { } else if (option.serviceOptionId == 21) {
ClientData.serviceOpt_force_pw_change_on_login(option.value); 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) { } else if (option.serviceOptionId == 49) {
ClientData.serviceOpt_usable_push_message(option.value); ClientData.serviceOpt_usable_push_message(option.value);
} else if (option.serviceOptionId == 161) { } else if (option.serviceOptionId == 161) {
...@@ -513,7 +509,7 @@ LOGIN.showAlertScreen = function(errMes, scrMove) { ...@@ -513,7 +509,7 @@ LOGIN.showAlertScreen = function(errMes, scrMove) {
$('.toast-item-close').live('click', function() { $('.toast-item-close').live('click', function() {
COMMON.unlockLayout(); COMMON.unlockLayout();
if (scrMove) { if (scrMove) {
AVWEB.avwScreenMove(scrMove); COMMON.avwScreenMove(scrMove);
} }
}); });
}; };
...@@ -523,20 +519,13 @@ LOGIN.ready = function() { ...@@ -523,20 +519,13 @@ LOGIN.ready = function() {
// セッションストレージクリア // セッションストレージクリア
SessionStorageUtils.clear(); SessionStorageUtils.clear();
AVWEB.avwUserSessionObj = null; COMMON.userSessionObj = null;
// create new session // create new session
AVWEB.avwCreateUserSession(); COMMON.createUserSession();
I18N.initi18n(); 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サーバー設定確認 // getitsサーバー設定確認
if (sysSettings.apiUrl == "") { if (sysSettings.apiUrl == "") {
...@@ -546,10 +535,7 @@ LOGIN.ready = function() { ...@@ -546,10 +535,7 @@ LOGIN.ready = function() {
var storeUrl = COMMON.getUrlParam('storeUrl', ''); var storeUrl = COMMON.getUrlParam('storeUrl', '');
if (siteUrl != "" && urlPath != "") { if (siteUrl != "" && urlPath != "") {
// getitsモード有効 // ClientData.siteUrl(siteUrl);
ClientData.isGetitsMode(true);
ClientData.siteUrl(siteUrl);
// api接続先設定 // api接続先設定
ClientData.conf_apiUrl(siteUrl + "{0}/abvapi"); ClientData.conf_apiUrl(siteUrl + "{0}/abvapi");
ClientData.conf_apiLoginUrl(siteUrl + "nuabvapi"); ClientData.conf_apiLoginUrl(siteUrl + "nuabvapi");
...@@ -559,8 +545,6 @@ LOGIN.ready = function() { ...@@ -559,8 +545,6 @@ LOGIN.ready = function() {
ClientData.userInfo_accountPath_session(urlPath); ClientData.userInfo_accountPath_session(urlPath);
ClientData.userInfo_loginId(""); ClientData.userInfo_loginId("");
ClientData.userInfo_loginId_session(""); ClientData.userInfo_loginId_session("");
// ストア遷移用のURL
ClientData.storeUrl(storeUrl);
} }
......
...@@ -47,7 +47,7 @@ OL.init = function () { ...@@ -47,7 +47,7 @@ OL.init = function () {
*/ */
OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEndDate, operationGroupMasterId) { OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEndDate, operationGroupMasterId) {
let param = {}; let param = {};
param.sid = CHK_Common.getSid(); param.sid = COMMON.getSid();
param.operationName = searchKeyword; param.operationName = searchKeyword;
param.sort = sortIndex; param.sort = sortIndex;
param.startDate = searchStartDate; param.startDate = searchStartDate;
...@@ -55,7 +55,7 @@ OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEn ...@@ -55,7 +55,7 @@ OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEn
param.operationGroupMasterId = operationGroupMasterId; param.operationGroupMasterId = operationGroupMasterId;
const url = CONSTANT.URL.BASE_CMS + ClientData.userInfo_accountPath() + CONSTANT.URL.BASE_CHECKAPI + CONSTANT.URL.ALL_OPERATION_LIST; const url = CONSTANT.URL.BASE_CMS + ClientData.userInfo_accountPath() + CONSTANT.URL.BASE_CHECKAPI + CONSTANT.URL.ALL_OPERATION_LIST;
CHK_Common.cmsAjax(url, param, false, function (json) { COMMON.cmsAjax(url, param, false, function (json) {
OL.operationList = json.operationList; OL.operationList = json.operationList;
OL.operationGroupMaster = json.operationGroupMasterList; OL.operationGroupMaster = json.operationGroupMasterList;
OL.isOperationGroupMaster = json.isOperationGroupMaster; OL.isOperationGroupMaster = json.isOperationGroupMaster;
...@@ -250,6 +250,7 @@ OL.createCategoryList = function () { ...@@ -250,6 +250,7 @@ OL.createCategoryList = function () {
//common //common
const noCategory = $("<dl id='groupMasterId_0' class='group-category-list'><dt><a onclick='OL.changeOperationGroupMaster(0);'>" + CHK_Common.getMsg('all') + '</a></dt></dl>'); const noCategory = $("<dl id='groupMasterId_0' class='group-category-list'><dt><a onclick='OL.changeOperationGroupMaster(0);'>" + CHK_Common.getMsg('all') + '</a></dt></dl>');
$('#category-menu').append(noCategory); $('#category-menu').append(noCategory);
//create category(operationGroupMaster) structure //create category(operationGroupMaster) structure
...@@ -341,6 +342,7 @@ OL.changeSortType = function (sortType) { ...@@ -341,6 +342,7 @@ OL.changeSortType = function (sortType) {
* *
* @param {Number} sortNumber * @param {Number} sortNumber
*/ */
OL.sortOperationList = function (sortNumber) { OL.sortOperationList = function (sortNumber) {
switch (sortNumber) { switch (sortNumber) {
case CONSTANT.SORT_TYPE.NAME: case CONSTANT.SORT_TYPE.NAME:
...@@ -361,6 +363,7 @@ OL.sortOperationList = function (sortNumber) { ...@@ -361,6 +363,7 @@ OL.sortOperationList = function (sortNumber) {
OL.operationList.sort(function (a, b) { OL.operationList.sort(function (a, b) {
if (OL.setOperationDate(a.operationStartDate) > OL.setOperationDate(b.operationStartDate)) return 1; if (OL.setOperationDate(a.operationStartDate) > OL.setOperationDate(b.operationStartDate)) return 1;
if (OL.setOperationDate(a.operationStartDate) < OL.setOperationDate(b.operationStartDate)) return -1; if (OL.setOperationDate(a.operationStartDate) < OL.setOperationDate(b.operationStartDate)) return -1;
return 0; return 0;
}); });
break; break;
...@@ -392,21 +395,21 @@ OL.sortOperationList = function (sortNumber) { ...@@ -392,21 +395,21 @@ OL.sortOperationList = function (sortNumber) {
* search operarionList * search operarionList
*/ */
OL.search = function () { OL.search = function () {
CHK_Common.showLoading(); COMMON.showLoading();
const searchKeyword = $('#searchTaskName').val(); const searchKeyword = $('#searchTaskName').val();
const searchStartDate = $('#searchStartDate').val(); const searchStartDate = $('#searchStartDate').val();
const searchEndDate = $('#searchEndDate').val(); const searchEndDate = $('#searchEndDate').val();
if (searchStartDate && searchEndDate && searchStartDate > searchEndDate) { if (searchStartDate && searchEndDate && searchStartDate > searchEndDate) {
CHK_Common.closeLoading(); COMMON.closeLoading();
CHK_Common.displayAlert('dateError'); COMMON.displayAlert('dateError');
return; return;
} }
OL.getAllDataWeb(searchKeyword, OL.sortIndex, searchStartDate, searchEndDate, OL.operationGroupMasterId); OL.getAllDataWeb(searchKeyword, OL.sortIndex, searchStartDate, searchEndDate, OL.operationGroupMasterId);
OL.createOperationList(OL.operationList); OL.createOperationList(OL.operationList);
OL.createCategory(); OL.createCategory();
CHK_Common.closeLoading(); COMMON.closeLoading();
}; };
/** /**
...@@ -452,7 +455,7 @@ OL.resetSearch = function () { ...@@ -452,7 +455,7 @@ OL.resetSearch = function () {
OL.sendOperation = function (operationId, operationType, reportType) { OL.sendOperation = function (operationId, operationType, reportType) {
//save operation logs. needed for sorting //save operation logs. needed for sorting
let saveParams = {}; let saveParams = {};
saveParams.sid = CHK_Common.getSid(); saveParams.sid = COMMON.getSid();
saveParams.cmd = CONSTANT.ACT_CMD.saveOperationLog; saveParams.cmd = CONSTANT.ACT_CMD.saveOperationLog;
saveParams.deviceType = 4; saveParams.deviceType = 4;
saveParams.operationType = operationType; saveParams.operationType = operationType;
...@@ -460,13 +463,13 @@ OL.sendOperation = function (operationId, operationType, reportType) { ...@@ -460,13 +463,13 @@ OL.sendOperation = function (operationId, operationType, reportType) {
const date = new Date(); const date = new Date();
saveParams.viewingStartDate = date.toLocaleString(); saveParams.viewingStartDate = date.toLocaleString();
CHK_Common.sendABookCheckApi(saveParam, false); COMMON.sendABookCheckApi(saveParam, false);
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
let postParams = {}; let postParams = {};
postParams.sid = CHK_Common.getSid(); postParams.sid = COMMON.getSid();
postParams.cmd = CONSTANT.ACT_CMD.goOperation; postParams.cmd = CONSTANT.ACT_CMD.goOperation;
postParams.operationId = operationId; postParams.operationId = operationId;
const url = CHK_Common.getUrlWeb(postParams.cmd); const url = COMMON.getUrlWeb(postParams.cmd);
postCommunication(url, postParams); postCommunication(url, postParams);
}; };
...@@ -5,26 +5,26 @@ ...@@ -5,26 +5,26 @@
* @since cms:1.4.3.2&1.4.3.3 web:1.0 * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var CHK_TOP = {}; var TOP = {};
$(document).ready(function () { $(document).ready(function () {
//setting lang info //setting lang info
CHK_Common.setLangCodeWeb(); COMMON.setLangCodeWeb();
//Check if user is logged in //Check if user is logged in
CHK_Common.checkAuth(false); COMMON.checkAuth(false);
//setting msg of html //setting msg of html
CHK_Common.updateLang(); COMMON.updateLang();
}); });
/** /**
* show page * show page
*/ */
CHK_TOP.init = function () { TOP.init = function () {
CHK_Common.showLoading(); COMMON.showLoading();
FOOTER.initFooter(); //app should get data after initFooter FOOTER.initFooter(); //app should get data after initFooter
CHK_Common.closeLoading(); COMMON.closeLoading();
}; };
/** /**
...@@ -32,7 +32,7 @@ CHK_TOP.init = function () { ...@@ -32,7 +32,7 @@ CHK_TOP.init = function () {
* *
* @param {String} pageId * @param {String} pageId
*/ */
CHK_TOP.showPage = function (pageId) { TOP.showPage = function (pageId) {
//get data //get data
if (pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) { if (pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) {
OL.init(); OL.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