Commit ca5f31c0 by NGUYEN HOANG SON

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

# Conflicts:
#	abvw/common/json/lang/lang-en.json
#	abvw/common/json/lang/lang-ja.json
#	abvw/common/json/lang/lang-ko.json
parents a355c43b a72fed61
......@@ -62,6 +62,12 @@
"confirmation":"confirmation",
"confirmYes":"Yes",
"confirmNo":"No",
"messageListEmpty":"No Messages",
"messageDetail":"Message Details",
"operationName":"Operation Name",
"sendDate":"Send Date",
"sender":"Sender",
"content":"Content",
"buttonOperationSelect":"Operation",
"labelSendTypeTitle":"Type",
"labelSendTypeGroup":"Group",
......
......@@ -62,6 +62,12 @@
"confirmation":"確認",
"confirmYes":"はい",
"confirmNo":"いいえ",
"messageListEmpty":"メッセージがありません。",
"messageDetail":"メッセージ詳細",
"operationName":"作業名",
"sendDate":"送信日時",
"sender":"送信者",
"content":"内容",
"buttonOperationSelect":"作業名",
"labelSendTypeTitle":"送信先",
"labelSendTypeGroup":"グループ内",
......
......@@ -62,6 +62,12 @@
"confirmation":"confirmation",
"confirmYes":"Yes",
"confirmNo":"No",
"messageListEmpty":"No Messages",
"messageDetail":"Message Details",
"operationName":"Operation Name",
"sendDate":"Send Date",
"sender":"Sender",
"content":"Content",
"buttonOperationSelect":"Operation",
"labelSendTypeTitle":"Type",
"labelSendTypeGroup":"Group",
......
<!DOCTYPE html>
<html lang="ja-JP">
<head>
<meta charset="utf-8">
<title>ダッシュボード</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- main css -->
<link rel="stylesheet" type="text/css" href="../common/css/newdash/app.css">
<link rel="stylesheet" type="text/css" href="../common/css/newdash/header.css">
<link rel="stylesheet" type="text/css" href="../common/css/newdash/style.css">
<!-- vender css -->
<link rel="stylesheet" type="text/css" href="../common/css/newdash/fontawesome_relative_path.css">
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/web/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/newdash/app.js"></script>
<script type="text/javascript" src="../common/js/newdash/common.js"></script>
<script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/pushMessageDetail/push-message-detail.js"></script>
</head>
<body onload="PushMessageDetail.init();">
<!-- header -->
<div id="includedHeader"></div>
<!-- message detail -->
<main>
<div class="container">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="dashboard.html" class="text-decoration-none text-underline lang" lang="dashboard"></a></li>
<li class="breadcrumb-item"><a href="message-list.html" class="text-decoration-none text-underline lang" lang="messageListTitle"></a></li>
<li class="breadcrumb-item active lang" lang="messageDetail" aria-current="page"><span></span></li>
</ol>
</nav>
<!-- title -->
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 lang" lang="messageDetail"></h1>
<!-- message detail -->
<div class="row">
<div class="col-12">
<div class="card p-4">
<table>
<colgroup>
<col span="1" class="w-100px">
</colgroup>
<tbody>
<tr class="border-bottom">
<th class="fs-9 p-2 text-secondary lang" lang="operationName"></th>
<td class="p-2" id="operationName"></td>
</tr>
<tr class="border-bottom">
<th class="fs-9 p-2 text-secondary lang" lang="sendDate"></th>
<td class="p-2" id="sendDate"></td>
</tr>
<tr class="border-bottom">
<th class="fs-9 p-2 text-secondary lang" lang="sender"></th>
<td class="p-2" id="sender"></td>
</tr>
<tr class="border-bottom">
<th class="fs-9 p-2 text-secondary lang" lang="content"></th>
<td class="p-2" id="content"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ja-JP">
<head>
<meta charset="utf-8">
<title>ダッシュボード</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- main css -->
<link rel="stylesheet" type="text/css" href="../common/css/newdash/app.css">
<link rel="stylesheet" type="text/css" href="../common/css/newdash/header.css">
<link rel="stylesheet" type="text/css" href="../common/css/newdash/style.css">
<!-- vender css -->
<link rel="stylesheet" type="text/css" href="../common/css/newdash/fontawesome_relative_path.css">
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="/abvw/common/js/web/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/newdash/app.js"></script>
<script type="text/javascript" src="../common/js/newdash/common.js"></script>
<script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/pushMessageList/push-message-list.js"></script>
</head>
<body onload="PushMessageList.init();">
<!-- header -->
<div id="includedHeader"></div>
<!-- message list -->
<main>
<div class="container">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="dashboard.html" class="text-decoration-none text-underline lang" lang="dashboard"></a></li>
<li class="breadcrumb-item active lang" lang="messageListTitle" aria-current="page"><span></span></li>
</ol>
</nav>
<!-- title -->
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 lang" lang="messageListTitle"></h1>
<!-- message -->
<ul class="card-list message-list p-0" id="messageList">
<li class="card mb-2 not-found d-none">
<div class="text-dark mb-1 px-3 py-5 text-center m-auto">
<img src="../common/img/icon_not_found.svg" alt="メッセージがありません。" class="not-found-img mb-2">
<div class="fs-9 text-secondary font-weight-bold lang" lang="messageListEmpty"></div>
</div>
</li>
</ul>
</div>
</main>
</body>
</html>
\ No newline at end of file
var PushMessageDetail = {};
PushMessageDetail.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageDetail/';
PushMessageDetail.dummyMessageDetailJson = {
pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。",
pushSendDate: "2022/07/06 14:14",
operationName: "絞り検索",
pushSendLoginId: "agentec"
}
PushMessageDetail.init = function() {
$("#includedHeader").load("../common/header.html" , function() {
I18N.initi18n();
});
let urlParam = COMMON.getUrlParameter();
if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') {
return;
}
PushMessageDetail.getMessageDetail(urlParam.pushMessageId, function(message) {
PushMessageDetail.showMessage(message);
});
}
PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
let param = {
sid: COMMON.getSid(),
pushMessageId: pushMessageId
};
const url = PushMessageDetail.baseApiUrl;
COMMON.cmsAjax(url, param, false, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('PushMessageDetail.getMessageDetail error');
if (callback) {
callback(PushMessageDetail.dummyMessageDetailJson);
}
});
}
PushMessageDetail.showMessage = function(message) {
$('#content').text(message.pushMessage);
$('#sendDate').text(message.pushSendDate);
$('#operationName').text(message.operationName);
$('#sender').text(message.pushSendLoginId);
}
/**
* Push Message List JS in push-message-list.html
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var PushMessageList = {};
PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageList/';
/**
* Init when html onload
*/
PushMessageList.init = function() {
$("#includedHeader").load("../common/header.html" , function() {
I18N.initi18n();
});
PushMessageList.getMessageList(function(messageList) {
PushMessageList.generateMessageListHtml(messageList.pushMessageList);
});
}
/**
* get Message List from CMS
* @param {function} callback
*/
PushMessageList.getMessageList = function (callback) {
let param = {
sid: COMMON.getSid(),
};
const url = PushMessageList.baseApiUrl;
COMMON.cmsAjax(url, param, false, function (json) {
if (callback) {
callback(json);
}
}, function() {
console.log('PushMessageList.getMessageList error');
if (callback) {
callback(PushMessageList.dummyMessageListJson);
}
});
};
/**
* handle click message event
* @param {string} pushMessageId
*/
PushMessageList.clickMessage = function(pushMessageId) {
COMMON.goUrlWithCurrentParams('push-message-detail.html', {pushMessageId: pushMessageId});
}
/**
* generate message list html
* @param {array} messageList
* @returns
*/
PushMessageList.generateMessageListHtml = function(messageList) {
if (typeof messageList === 'undefined' || messageList.length < 1) {
//show not found
$('#messageList .not-found').removeClass('d-none');
return;
}
$('#messageList .not-found').addClass('d-none');
for (var i = 0; i < messageList.length; i++) {
let message = messageList[i];
var messageId = message.pushMessageId;
var mTitle = message.pushMessage;
var mDate = message.pushSendDate;
var mSubtitle = message.operationName;
var messageLi = $('<li class="card mb-2" id="pushMessageId_' + messageId + '"/>');
if (message.readingFlg) {
messageLi.addClass('read');
} else {
messageLi.addClass('unread');
}
var messageA = $('<a class="d-block px-3 py-2 text-decoration-none text-dark"/>');
messageA.attr('href', "javascript:PushMessageList.clickMessage('" + messageId +"');");
var titleDiv = $('<div class="fs-12 text-truncate">' + mTitle + '</div>');
var subTitleMainDiv = $('<div class="d-flex justify-content-between align-items-center"></div>');
var subTitleDiv = $('<div class="fs-10 text-truncate">' + mSubtitle + '</div>');
var dateDiv = $('<div class="fs-8 text-secondary text-nowrap">' + mDate + '</div>');
subTitleMainDiv.append(subTitleDiv);
subTitleMainDiv.append(dateDiv);
messageA.append(titleDiv);
messageA.append(subTitleMainDiv);
messageLi.append(messageA);
$('#messageList').append(messageLi);
}
};
/**
* dummy message list JSON for test
*/
PushMessageList.dummyMessageListJson = {
pushMessageList: [{
pushMessageId: 1,
pushMessage: 'メッセージ内容が入ります。',
pushSendDate: '2022/07/06 14:14',
operationName: '作業名が入ります。',
readingFlg: 0,
}, {
pushMessageId: 2,
pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。',
pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。',
readingFlg: 1,
}]
};
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