Commit dfd2e484 by Takumi Imai

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

implement main title for message detail screen

See merge request !31
parents faf6c7bf cf764a60
......@@ -39,23 +39,10 @@
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></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="push-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">
......
......@@ -2,6 +2,9 @@ var PushMessageDetail = {};
PushMessageDetail.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageDetail/';
/**
* dummy json for test
*/
PushMessageDetail.dummyMessageDetailJson = {
pushMessageId: 1,
pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。",
......@@ -10,8 +13,27 @@ PushMessageDetail.dummyMessageDetailJson = {
pushSendLoginId: "agentec"
}
/**
* init when html loaded
*/
PushMessageDetail.init = function() {
//load common html
TEMPLATE.loadHearder("#includedHeader");
const navs = [
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'messageListTitle',
href: 'push-message-list.html',
},
{
titleLang: 'messageDetail',
},
];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageDetail", navs, null);
//request message detail data
let urlParam = COMMON.getUrlParameter();
if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') {
return;
......@@ -21,6 +43,11 @@ PushMessageDetail.init = function() {
});
}
/**
* request message data
* @param {string} pushMessageId
* @param {object} callback
*/
PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
let param = {
sid: COMMON.getSid(),
......@@ -36,6 +63,10 @@ PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
});
}
/**
* Show message data
* @param {object} message
*/
PushMessageDetail.showMessage = function(message) {
$('#content').text(message.pushMessage);
$('#sendDate').text(message.pushSendDate);
......
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