Commit b00b28e6 by NGUYEN HOANG SON

implement message list not found html

parent 2ce6ad94
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
"distanceSupportTitle":"DistanceSupport", "distanceSupportTitle":"DistanceSupport",
"chatTitle":"Chat", "chatTitle":"Chat",
"makeDashboardAsHome":"Make dashboard your home screen", "makeDashboardAsHome":"Make dashboard your home screen",
"btnKeep":"Keep" "btnKeep":"Keep",
"messageListEmpty":"No Messages"
} }
\ No newline at end of file
...@@ -53,5 +53,6 @@ ...@@ -53,5 +53,6 @@
"distanceSupportTitle":"遠隔支援", "distanceSupportTitle":"遠隔支援",
"chatTitle":"チャット", "chatTitle":"チャット",
"makeDashboardAsHome":"ダッシュボードをホーム画面にする", "makeDashboardAsHome":"ダッシュボードをホーム画面にする",
"btnKeep":"保存" "btnKeep":"保存",
"messageListEmpty":"メッセージがありません。"
} }
\ No newline at end of file
...@@ -53,5 +53,6 @@ ...@@ -53,5 +53,6 @@
"distanceSupportTitle":"DistanceSupport", "distanceSupportTitle":"DistanceSupport",
"chatTitle":"Chat", "chatTitle":"Chat",
"makeDashboardAsHome":"Make dashboard your home screen", "makeDashboardAsHome":"Make dashboard your home screen",
"btnKeep":"Keep" "btnKeep":"Keep",
"messageListEmpty":"No Messages"
} }
\ No newline at end of file
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
<!-- message --> <!-- message -->
<ul class="card-list message-list p-0" id="messageList"> <ul class="card-list message-list p-0" id="messageList">
<li class="card mb-2 not-found"> <li class="card mb-2 not-found d-none">
<div class="text-dark mb-1 px-3 py-5 text-center m-auto"> <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"> <img src="../common/img/icon_not_found.svg" alt="メッセージがありません。" class="not-found-img mb-2">
<div class="fs-9 text-secondary font-weight-bold">メッセージがありません。</div> <div class="fs-9 text-secondary font-weight-bold lang" lang="messageListEmpty"></div>
</div> </div>
</li> </li>
</ul> </ul>
......
...@@ -6,14 +6,14 @@ var PushMessageList = {}; ...@@ -6,14 +6,14 @@ var PushMessageList = {};
PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageList/'; PushMessageList.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'pushMessageList/';
/** /**
* Init screen when html onload * Init when html onload
*/ */
PushMessageList.init = function() { PushMessageList.init = function() {
$("#includedHeader").load("../common/header.html" , function() { $("#includedHeader").load("../common/header.html" , function() {
I18N.initi18n(); I18N.initi18n();
}); });
PushMessageList.getMessageList(function(messageList) { PushMessageList.getMessageList(function(messageList) {
PushMessageList.createMessageList(messageList); PushMessageList.generateMessageListHtml(messageList);
}); });
} }
...@@ -31,7 +31,7 @@ PushMessageList.getMessageList = function (callback) { ...@@ -31,7 +31,7 @@ PushMessageList.getMessageList = function (callback) {
callback(json); callback(json);
} }
}, function() { }, function() {
console.log('PushMessageList.getMessageList'); console.log('PushMessageList.getMessageList error');
if (callback) { if (callback) {
callback(PushMessageList.dummyMessageList()); callback(PushMessageList.dummyMessageList());
} }
...@@ -51,12 +51,12 @@ PushMessageList.clickMessage = function(pushMessageId) { ...@@ -51,12 +51,12 @@ PushMessageList.clickMessage = function(pushMessageId) {
* @param {array} messageList * @param {array} messageList
* @returns * @returns
*/ */
PushMessageList.createMessageList = function(messageList) { PushMessageList.generateMessageListHtml = function(messageList) {
if (typeof messageList === 'undefined' || messageList.length < 1) { if (typeof messageList === 'undefined' || messageList.length < 1) {
//show not found
$('#messageList .not-found').removeClass('d-none'); $('#messageList .not-found').removeClass('d-none');
return; return;
} }
//console.log("messageList.length" + messageList.length);
$('#messageList .not-found').addClass('d-none'); $('#messageList .not-found').addClass('d-none');
for (var i = 0; i < messageList.length; i++) { for (var i = 0; i < messageList.length; i++) {
let message = messageList[i]; let message = messageList[i];
...@@ -101,9 +101,9 @@ PushMessageList.dummyMessageList = function() { ...@@ -101,9 +101,9 @@ PushMessageList.dummyMessageList = function() {
}); });
messes.push({ messes.push({
pushMessageId: 2, pushMessageId: 2,
pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。', pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。',
pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx', pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。', operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。',
readingFlg: true, readingFlg: true,
}); });
return messes; return messes;
......
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