Commit 33bd3942 by Hayato Kamimura

【規約同意】言語修正、ホーム画面遷移時の規約確認

parent 6de9129c
......@@ -132,5 +132,5 @@
"agreementToTermsTitle": "Terms of Service",
"agreeTerm": "Agree",
"disagreeTerm": "Disagree",
"msgDisagreeTerm": "Log out and then go to the login screen. Are you okay?"
"msgDisagreeTerm": "Log out and transition to the login screen. Are you okay?"
}
\ No newline at end of file
......@@ -127,7 +127,7 @@
"sitePolicy": "사이트 정책",
"agreementToTermsTitle": "이용규약",
"agreeTerm": "동의",
"agreeTerm": "동의",
"disagreeTerm": "동의 안함",
"msgDisagreeTerm": "로그 아웃되어 로그인 화면으로 이동합니다. 실행 하시겠습니까?"
}
\ No newline at end of file
......@@ -31,6 +31,7 @@
<script type="text/javascript" src="../js/dashboardSetting/dashboardSetting.js"></script>
<script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/dashboard/dashboard.js"></script>
<script src="../js/agreementToTerms/agreementToTerms.js"></script>
<script type="text/javascript">
$(document).ready(function(){
......
......@@ -32,17 +32,6 @@
<script src="../js/topPage/topPage.js?__UPDATEID__"></script>
<script src="../js/reportForm/reportForm.js?__UPDATEID__"></script>
<script src="../js/agreementToTerms/agreementToTerms.js"></script>
<script type="text/javascript">
$(document).ready(function(){
if(window.performance){
if(window.performance.navigation.type === 1){
agreementToTerms.destinationHtml();
}
}
})
</script>
</head>
<body>
......
......@@ -4,11 +4,17 @@ var agreementToTerms = {};
//言語、規約情報読み込み
agreementToTerms.initAgreement = function(){
var data = agreementToTerms.getTerms();
$("#agreementToTermsTitle").text(I18N.i18nText("agreementToTermsTitle"));
$("#agreeTerm").text(I18N.i18nText("agreeTerm"));
$("#disagreeTerm").text(I18N.i18nText("disagreeTerm"));
$("#termsVersion").text(data.termsVersion);
$("#terms").html(data.terms.replace(/(\r\n|\n|\r)/g, "<br>"));
//規約同意のデータを取得できているか確認
if(Object.keys(data).length){
$("#agreementToTermsTitle").text(I18N.i18nText("agreementToTermsTitle"));
$("#agreeTerm").text(I18N.i18nText("agreeTerm"));
$("#disagreeTerm").text(I18N.i18nText("disagreeTerm"));
$("#termsVersion").text(data.termsVersion);
$("#terms").html(data.terms.replace(/(\r\n|\n|\r)/g, "<br>"));
}else{
//未ログイン状態で規約同意画面に遷移した場合、ログインページに遷移する
COMMON.avwScreenMove("login.html");
}
};
//遷移先の決定
......@@ -69,8 +75,15 @@ agreementToTerms.agreeTerm = function(){
params,
false,
function(data){
//ホーム画面に遷移
COMMON.avwScreenMove("index.html");
var agreeCheck = agreementToTerms.getTerms();
//規約に同意できているか確認
if(Object.keys(agreeCheck).length == 3){
//ホーム画面に遷移
COMMON.avwScreenMove("index.html");
}else{
//再度試す
agreementToTerms.agreeTerm();
}
},
function(xmlHttpRequest, txtStatus, errorThrown){
if(xmlHttpRequest.errorMessage){
......
......@@ -130,6 +130,19 @@ DASHBOARD.init = function () {
COMMON.showLoading();
COMMON.checkAuth(false);
//ページ再読み込み時の規約確認
if(window.performance){
if(window.performance.navigation.type === 1){
agreementToTerms.destinationHtml();
}
}
//ホーム画面に遷移した時の規約確認(規約が更新された場合は規約同意画面に遷移する)
var terms = agreementToTerms.getTerms();
if(Object.keys(terms).length >= 4){
agreementToTerms.destinationHtml();
}
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD;
sessionStorage.removeItem('operationId');
sessionStorage.removeItem('RL_searchWord');
......
......@@ -19,6 +19,19 @@ $(document).ready(function () {
* show page
*/
TOP.init = function () {
//ページ再読み込み時の規約確認
if(window.performance){
if(window.performance.navigation.type === 1){
agreementToTerms.destinationHtml();
}
}
//ホーム画面に遷移した時の規約確認(規約が更新された場合は規約同意画面に遷移する)
var terms = agreementToTerms.getTerms();
if(Object.keys(terms).length >= 4){
agreementToTerms.destinationHtml();
}
const urlParameterList = COMMON.getUrlParameter();
if (urlParameterList && urlParameterList.pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) {
//index with param page
......
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