Commit e511043b by Takumi Imai

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

Feature/1.0 check web dev kdh 2

See merge request !67
parents ea7330b8 2bb880f8
...@@ -34,8 +34,8 @@ COMMON.loginCheckPageList = [CONSTANT.PAGE_NAME.DEFAULT, CONSTANT.PAGE_NAME.DASH ...@@ -34,8 +34,8 @@ COMMON.loginCheckPageList = [CONSTANT.PAGE_NAME.DEFAULT, CONSTANT.PAGE_NAME.DASH
COMMON.hasErrorKey = 'AVW_HASERR'; COMMON.hasErrorKey = 'AVW_HASERR';
$(document).ready(function() { $(document).ready(function() {
const checkUrl = location.href.substring(location.href.lastIndexOf('/') + 1 ,location.href.lastIndexOf(".html"));
if (location.href.includes(COMMON.loginCheckPageList)) { if (COMMON.loginCheckPageList.includes(checkUrl)) {
if (!COMMON.checkLogin(CONSTANT.PAGE_NAME.LOGIN)){ if (!COMMON.checkLogin(CONSTANT.PAGE_NAME.LOGIN)){
return; return;
} }
...@@ -58,6 +58,12 @@ COMMON.avwScreenMove = function (url) { ...@@ -58,6 +58,12 @@ COMMON.avwScreenMove = function (url) {
* @param {String} key * @param {String} key
*/ */
COMMON.showLoading = function () { COMMON.showLoading = function () {
// $(window).resize(function() {
$('#loader').css( {
'width': $(window).width(),
'height': $(window).height()
});
// });
document.getElementById('loader').style.display = 'block'; document.getElementById('loader').style.display = 'block';
}; };
...@@ -651,17 +657,13 @@ var UserSession = function () { ...@@ -651,17 +657,13 @@ var UserSession = function () {
*/ */
UserSession.prototype.init = function (option) { UserSession.prototype.init = function (option) {
this.available = false; this.available = false;
console.log("kdh check userSession init option : " + option);
if (option == 'restore') { if (option == 'restore') {
var value = null; var value = null;
try { try {
value = this._get('init'); value = this._get('init');
console.log("kdh check userSession init value : " + value);
} catch (e) { } catch (e) {
value = null; value = null;
console.log("kdh check userSession init catch : " + e);
} finally { } finally {
console.log("kdh check userSession init final : " + value);
if (value) { if (value) {
this.available = true; this.available = true;
} }
...@@ -698,7 +700,6 @@ UserSession.prototype.set = function (key, value) { ...@@ -698,7 +700,6 @@ UserSession.prototype.set = function (key, value) {
* @returns * @returns
*/ */
UserSession.prototype.get = function (key) { UserSession.prototype.get = function (key) {
console.log("kdh check userSession get");
var value = null; var value = null;
if (this.available) { if (this.available) {
value = this._get(key); value = this._get(key);
...@@ -844,16 +845,13 @@ COMMON.setErrorState = function () { ...@@ -844,16 +845,13 @@ COMMON.setErrorState = function () {
/* get user session object */ /* get user session object */
COMMON.userSession = function () { COMMON.userSession = function () {
if (!COMMON.userSessionObj) { if (!COMMON.userSessionObj) {
console.log("kdh check userSession : COMMON.userSessionObj null");
var obj = new UserSession(); var obj = new UserSession();
obj.init('restore'); obj.init('restore');
if (obj.available) { if (obj.available) {
console.log("kdh check userSession : COMMON.userSessionObj available");
COMMON.userSessionObj = obj; COMMON.userSessionObj = obj;
return COMMON.userSessionObj; return COMMON.userSessionObj;
} else { } else {
console.log("kdh check userSession : COMMON.userSessionObj unavailable"); return null;
return CO;
} }
} }
return COMMON.userSessionObj; return COMMON.userSessionObj;
...@@ -895,7 +893,6 @@ var SessionStorageUtils = { ...@@ -895,7 +893,6 @@ var SessionStorageUtils = {
} }
}, },
get: function (strKey) { get: function (strKey) {
console.log("kdh check SessionStorageUtils get : " + strKey);
return COMMON.userSession().get(strKey); return COMMON.userSession().get(strKey);
}, },
set: function (strKey, objValue) { set: function (strKey, objValue) {
...@@ -1087,6 +1084,7 @@ COMMON.checkLogin = function (option) { ...@@ -1087,6 +1084,7 @@ COMMON.checkLogin = function (option) {
'position': 'fixed', 'position': 'fixed',
'top': '0', 'top': '0',
'left': '0', 'left': '0',
'background': "#ffffff",
'width': $(window).width(), 'width': $(window).width(),
'height': $(window).height(), 'height': $(window).height(),
'zIndex': '10000' 'zIndex': '10000'
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</head> </head>
<body> <body>
<div id="loader"></div> <div id="loader" style="display: none;"></div>
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
<div id="includedMainTitle"></div> <div id="includedMainTitle"></div>
......
...@@ -34,7 +34,7 @@ PP.loadCommon = function () { ...@@ -34,7 +34,7 @@ PP.loadCommon = function () {
}, },
{ {
titleLang: CONSTANT.PAGE_NAME.REPORT_LIST, titleLang: CONSTANT.PAGE_NAME.REPORT_LIST,
href: CONSTANT.URL_TREE_NAME.OPERATION_LIST, href: CONSTANT.URL_TREE_NAME.REPORT_LIST,
}, },
{ {
titleLang: CONSTANT.PAGE_NAME.PDF_PRINT, titleLang: CONSTANT.PAGE_NAME.PDF_PRINT,
......
...@@ -22,7 +22,7 @@ RF.init = function () { ...@@ -22,7 +22,7 @@ RF.init = function () {
RF.loadCommon = function () { RF.loadCommon = function () {
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
RF.initBreadcrumb();
}; };
/** /**
...@@ -79,9 +79,8 @@ RF.initBreadcrumb = function () { ...@@ -79,9 +79,8 @@ RF.initBreadcrumb = function () {
} }
} else { } else {
if (sessionStorage.getItem("pickUpType")) sessionStorage.removeItem("pickUpType"); if (sessionStorage.getItem("pickUpType")) sessionStorage.removeItem("pickUpType");
const urlParam = COMMON.getUrlParameter();
let addReportFlg = urlParam["addReport"]; if ((addReportFlg) && addReportFlg == 1) {
if (addReportFlg == "1") {
navs = [ navs = [
{ {
titleLang: CONSTANT.PAGE_NAME.OPERATION_LIST, titleLang: CONSTANT.PAGE_NAME.OPERATION_LIST,
...@@ -137,6 +136,7 @@ RF.initFormView = function () { ...@@ -137,6 +136,7 @@ RF.initFormView = function () {
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
$('#report-form').load(url, params, function () { $('#report-form').load(url, params, function () {
initPageLoad(); initPageLoad();
RF.initBreadcrumb();
COMMON.closeLoading(); COMMON.closeLoading();
}); });
} else { } else {
......
...@@ -11,6 +11,7 @@ var RL = {}; ...@@ -11,6 +11,7 @@ var RL = {};
*/ */
RL.init = function () { RL.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.showLoading();
COMMON.checkAuth(false); COMMON.checkAuth(false);
console.log('ReportList init start'); console.log('ReportList init start');
RL.checkQuickReport(); RL.checkQuickReport();
......
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