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