pdfPrint.js 1.11 KB
Newer Older
1 2 3 4 5
/**
 * PDF PRINT function js
 *
 * @since cms:1.4.3.2&1.4.3.3 web:1.0
 **/
Kang Donghun committed
6 7 8

var PP = {};

9 10 11 12 13
PP.init = function () {
    //Check if user is logged in
    COMMON.checkAuth(false);

    console.log('PP.init');
Kang Donghun committed
14
    PP.loadCommon();
15

Kang Donghun committed
16 17 18
    PP.initPdfList();
};

19
PP.loadCommon = function () {
20
    $('#includedHeader').load('../common/html/header.html', function () {
Kang Donghun committed
21 22
        I18N.initi18n();
        HEADER.init();
23
    });
24
    $('#includedConfirmModal').load('../common/html/confirmModal.html', function () {
Kang Donghun committed
25
        I18N.initi18n();
26 27
    });
};
Kang Donghun committed
28

29
PP.initPdfList = function () {
Kang Donghun committed
30 31 32 33 34 35
    if (sessionStorage.OL_operationId) {
        let params = {};
        params.sid = COMMON.getSid();
        params.operationId = sessionStorage.OL_operationId;
        params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST;
        let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.QUICK_REPORT_PRINT;
36
        $('#pdfPrint').load(url, params);
Kang Donghun committed
37
    } else {
38 39
        COMMON.displayAlert('error');
        COMMON.avwScreenMove('reportList.html');
Kang Donghun committed
40
    }
41
};