Commit 5cc1db79 by Takumi Imai

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

Add showLoading when init runs, delete unnecessary logs

See merge request !81
parents 7b353503 8f7b8434
...@@ -43,6 +43,7 @@ COMMON.avwScreenMove = function (url) { ...@@ -43,6 +43,7 @@ COMMON.avwScreenMove = function (url) {
COMMON.showLoading(); COMMON.showLoading();
window.onbeforeunload = null; window.onbeforeunload = null;
window.location = url; window.location = url;
COMMON.closeLoading();
}; };
/** /**
...@@ -52,7 +53,6 @@ COMMON.avwScreenMove = function (url) { ...@@ -52,7 +53,6 @@ COMMON.avwScreenMove = function (url) {
* @param {String} key * @param {String} key
*/ */
COMMON.showLoading = function () { COMMON.showLoading = function () {
console.log('kdh check showLoading');
$('#loader').css({ $('#loader').css({
width: $(window).width(), width: $(window).width(),
height: $(window).height(), height: $(window).height(),
...@@ -301,7 +301,6 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty ...@@ -301,7 +301,6 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
*/ */
COMMON.checkAuth = function (async = true) { COMMON.checkAuth = function (async = true) {
let params = {}; let params = {};
console.log('kdh check');
params.sid = COMMON.getSid; params.sid = COMMON.getSid;
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.AUTH_SESSION; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.AUTH_SESSION;
COMMON.cmsAjax(url, params, async, null, function () { COMMON.cmsAjax(url, params, async, null, function () {
......
...@@ -128,6 +128,7 @@ DASHBOARD.initHtmlItem = function (item) { ...@@ -128,6 +128,7 @@ DASHBOARD.initHtmlItem = function (item) {
/** Initialization dashboard screen */ /** Initialization dashboard screen */
DASHBOARD.init = function () { DASHBOARD.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.showLoading();
COMMON.checkAuth(false); COMMON.checkAuth(false);
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD; sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD;
......
...@@ -11,9 +11,9 @@ var PP = {}; ...@@ -11,9 +11,9 @@ var PP = {};
*/ */
PP.init = function () { PP.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.showLoading();
COMMON.checkAuth(false); COMMON.checkAuth(false);
console.log('PP.init');
PP.loadCommon(); PP.loadCommon();
COMMON.closeLoading(); COMMON.closeLoading();
......
...@@ -133,10 +133,10 @@ PICKUP.getReportWithWarningsListData = function (callback) { ...@@ -133,10 +133,10 @@ PICKUP.getReportWithWarningsListData = function (callback) {
*/ */
PICKUP.init = function () { PICKUP.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.showLoading();
COMMON.checkAuth(false); COMMON.checkAuth(false);
console.log('PICKUP.init'); console.log('PICKUP.init');
sessionStorage.removeItem("pickUpType"); sessionStorage.removeItem("pickUpType");
// sessionStorage.pickUpType = null;
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD; sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD;
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
......
...@@ -22,6 +22,7 @@ PushMessageDetail.dummyMessageDetailJson = { ...@@ -22,6 +22,7 @@ PushMessageDetail.dummyMessageDetailJson = {
* init when html loaded * init when html loaded
*/ */
PushMessageDetail.init = function () { PushMessageDetail.init = function () {
COMMON.showLoading();
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
//load common html //load common html
......
...@@ -10,6 +10,7 @@ PushMessageList.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Client ...@@ -10,6 +10,7 @@ PushMessageList.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Client
*/ */
PushMessageList.init = function () { PushMessageList.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.showLoading();
COMMON.checkAuth(false); COMMON.checkAuth(false);
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal(); TEMPLATE.loadConfirmModal();
......
...@@ -11,6 +11,7 @@ RF.addReportFlg; ...@@ -11,6 +11,7 @@ RF.addReportFlg;
* init * init
*/ */
RF.init = function () { RF.init = function () {
COMMON.showLoading();
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
COMMON.checkQuickReport(function (result) { COMMON.checkQuickReport(function (result) {
......
...@@ -14,21 +14,13 @@ ...@@ -14,21 +14,13 @@
RL.init = function () { RL.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.showLoading(); COMMON.showLoading();
console.log("kdh check closeLoading RL.init1");
COMMON.checkAuth(false); COMMON.checkAuth(false);
console.log("kdh check closeLoading RL.init2");
console.log('ReportList init start');
console.log("kdh check closeLoading RL.init3");
COMMON.checkQuickReport(function(result) { COMMON.checkQuickReport(function(result) {
if (result) RL.isQuickReport = result.isQuickReport; if (result) RL.isQuickReport = result.isQuickReport;
} ); } );
console.log("kdh check closeLoading RL.init4");
RL.loadCommon(); RL.loadCommon();
console.log("kdh check closeLoading RL.init5");
RL.initTaskReportList(); RL.initTaskReportList();
console.log("kdh check closeLoading RL.init6");
COMMON.closeLoading(); COMMON.closeLoading();
console.log("kdh check closeLoading RL.init7");
}; };
/** /**
...@@ -75,33 +67,6 @@ ...@@ -75,33 +67,6 @@
} }
/** /**
* check quick report
*/
// RL.checkQuickReport = function () {
// if (sessionStorage.getItem("operationId")) {
// let params = {};
// params.sid = COMMON.getSid();
// params.operationId = sessionStorage.getItem("operationId");
// let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.IS_QUICK_REPORT;
// COMMON.cmsAjax(
// url,
// params,
// false,
// function (result) {
// RL.isQuickReport = result.isQuickReport;
// },
// function () {
// COMMON.showAlert('msgOperationEmpty');
// COMMON.avwScreenMove('index.html');
// },
// );
// } else {
// COMMON.showAlert('error');
// COMMON.avwScreenMove('index.html');
// }
// };
/**
* init task report list * init task report list
*/ */
RL.initTaskReportList = function () { RL.initTaskReportList = function () {
...@@ -111,7 +76,7 @@ ...@@ -111,7 +76,7 @@
params.operationId = sessionStorage.getItem("operationId"); params.operationId = sessionStorage.getItem("operationId");
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.TASK_REPORT_LIST; let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.TASK_REPORT_LIST;
$('#reportList').load(url, params, function () { $('#reportList').load(url, params, function () {
COMMON.closeLoading(); COMMON.closeLoading();
}); });
} else { } else {
COMMON.showAlert('error'); COMMON.showAlert('error');
......
...@@ -125,6 +125,7 @@ SendMessage.templateSelectedCallback = function (template) { ...@@ -125,6 +125,7 @@ SendMessage.templateSelectedCallback = function (template) {
* init data, action when screen onload * init data, action when screen onload
*/ */
SendMessage.init = function () { SendMessage.init = function () {
COMMON.showLoading();
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
......
...@@ -7,6 +7,7 @@ var SETTINGS = {}; ...@@ -7,6 +7,7 @@ var SETTINGS = {};
// Init function of page // Init function of page
$(document).ready(function () { $(document).ready(function () {
COMMON.showLoading();
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
SETTINGS.getToken(); SETTINGS.getToken();
......
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