Commit d5d85487 by takashi sasaki

Merge branch 'feature/1.1.0_dev_kamimura' into 'feature/1.1.0_dev'

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

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