Commit 8c4ec6ae by Takumi Imai

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

# Conflicts:
#	abweb/common/js/common.js
#	abweb/html/reportForm.html
#	abweb/js/reportForm/reportForm.js
parents 58721861 0639f7a5
......@@ -1118,6 +1118,33 @@ COMMON.checkLogin = function (option) {
return true;
};
/**
* check quick report
*/
COMMON.checkQuickReport = function (callback) {
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) {
if (callback) callback(result);
},
function () {
COMMON.showAlert('msgOperationEmpty');
COMMON.avwScreenMove('index.html');
},
);
} else {
COMMON.showAlert('error');
COMMON.avwScreenMove('index.html');
}
};
/*
* Operations for session storage [ end ]
*/
......
......@@ -42,6 +42,11 @@
<!-- report list -->
<div class="mb-5" id="report-form"></div>
<div id="includedMainTitle"></div>
<!-- report list -->
<div class="mb-5" id="report-form"></div>
<!-- confirm -->
<div id="includedConfirmModal"></div>
</div>
......
......@@ -31,6 +31,7 @@
$(document).ready(function() {
RL.init();
console.log("RL.isQuickReport : " + RL.isQuickReport);
COMMON.closeLoading();
});
</script>
</head>
......
......@@ -5,13 +5,21 @@
var RF = {};
RF.isQuickReport;
RF.addReportFlg;
/**
* init
*/
RF.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
COMMON.checkQuickReport(function (result) {
if (result) {
result.isQuickReport = RF.isQuickReport;
result.addReportFlg = RF.addReportFlg;
}
});
RF.loadCommon();
RF.initFormView();
};
......@@ -22,6 +30,7 @@ RF.init = function () {
RF.loadCommon = function () {
TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal');
RF.initBreadcrumb();
};
/**
......@@ -79,7 +88,7 @@ RF.initBreadcrumb = function () {
} else {
if (sessionStorage.getItem('pickUpType')) sessionStorage.removeItem('pickUpType');
if (addReportFlg && addReportFlg == 1) {
if (RF.addReportFlg && RF.addReportFlg == 1) {
navs = [
{
titleLang: CONSTANT.PAGE_NAME.OPERATION_LIST,
......@@ -105,7 +114,20 @@ RF.initBreadcrumb = function () {
];
}
}
TEMPLATE.loadMainNavsTitle('#includedMainTitle', CONSTANT.PAGE_NAME.REPORT_FORM, navs, null);
TEMPLATE.loadMainNavsTitle('#includedMainTitle', CONSTANT.PAGE_NAME.REPORT_FORM, navs, RF.loadMainTitleCallback);
};
/**
* load main title callcack
*/
RF.loadMainTitleCallback = function () {
//add dashboard setting item
if (RF.isQuickReport) {
var elmA = $('<div class="quickReportBtn" id="quickReportBtn" onclick="submitForm();">');
let elmImg = $('<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdfPrint">');
elmA.append(elmImg);
$('#mainTitleHeader').after(elmA);
}
};
/**
......@@ -135,7 +157,6 @@ 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 {
......
......@@ -6,6 +6,8 @@
var RL = {};
RL.isQuickReport;
/**
* init
*/
......@@ -17,7 +19,9 @@
console.log("kdh check closeLoading RL.init2");
console.log('ReportList init start');
console.log("kdh check closeLoading RL.init3");
RL.checkQuickReport();
COMMON.checkQuickReport(function(result) {
if (result) RL.isQuickReport = result.isQuickReport;
} );
console.log("kdh check closeLoading RL.init4");
RL.loadCommon();
console.log("kdh check closeLoading RL.init5");
......@@ -70,34 +74,32 @@
TEMPLATE.loadMainNavsTitle('#includedMainTitle', CONSTANT.PAGE_NAME.REPORT_LIST, navs, RL.loadMainTitleCallback);
}
RL.isQuickReport;
/**
* 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');
}
};
// 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
......@@ -124,7 +126,7 @@
//add dashboard setting item
if (RL.isQuickReport) {
var elmA = $('<div id="btnPdfPrint" onclick="RL.goPdfPrint();">');
let elmImg = $('<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdf出力">');
let elmImg = $('<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdfPrint">');
elmImg.attr('title', I18N.i18nText('reportList'));
elmA.append(elmImg);
$('#mainTitleHeader').after(elmA);
......
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