Commit cf764a60 by NGUYEN HOANG SON

implement main navs title html

parent faf6c7bf
...@@ -39,23 +39,10 @@ ...@@ -39,23 +39,10 @@
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- message detail --> <!-- message detail -->
<main> <main>
<div class="container"> <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="row">
<div class="col-12"> <div class="col-12">
<div class="card p-4"> <div class="card p-4">
......
...@@ -2,6 +2,9 @@ var PushMessageDetail = {}; ...@@ -2,6 +2,9 @@ var PushMessageDetail = {};
PushMessageDetail.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageDetail/'; PushMessageDetail.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageDetail/';
/**
* dummy json for test
*/
PushMessageDetail.dummyMessageDetailJson = { PushMessageDetail.dummyMessageDetailJson = {
pushMessageId: 1, pushMessageId: 1,
pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。", pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。",
...@@ -10,8 +13,27 @@ PushMessageDetail.dummyMessageDetailJson = { ...@@ -10,8 +13,27 @@ PushMessageDetail.dummyMessageDetailJson = {
pushSendLoginId: "agentec" pushSendLoginId: "agentec"
} }
/**
* init when html loaded
*/
PushMessageDetail.init = function() { PushMessageDetail.init = function() {
//load common html
TEMPLATE.loadHearder("#includedHeader"); 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(); let urlParam = COMMON.getUrlParameter();
if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') { if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') {
return; return;
...@@ -21,6 +43,11 @@ PushMessageDetail.init = function() { ...@@ -21,6 +43,11 @@ PushMessageDetail.init = function() {
}); });
} }
/**
* request message data
* @param {string} pushMessageId
* @param {object} callback
*/
PushMessageDetail.getMessageDetail = function(pushMessageId, callback) { PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
...@@ -36,6 +63,10 @@ PushMessageDetail.getMessageDetail = function(pushMessageId, callback) { ...@@ -36,6 +63,10 @@ PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
}); });
} }
/**
* Show message data
* @param {object} message
*/
PushMessageDetail.showMessage = function(message) { PushMessageDetail.showMessage = function(message) {
$('#content').text(message.pushMessage); $('#content').text(message.pushMessage);
$('#sendDate').text(message.pushSendDate); $('#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