Commit 6e93f382 by NGUYEN HOANG SON

update lang alert

sort message list by send date
parent e926cb25
...@@ -118,8 +118,8 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) { ...@@ -118,8 +118,8 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
*/ */
COMMON.showAlert = function (messageCode, options = {}) { COMMON.showAlert = function (messageCode, options = {}) {
const defaultParams = { const defaultParams = {
titleCode: 'confirmation', titleCode: 'alert',
confirmNoCode: 'confirmNo' confirmNoCode: 'close'
} }
const params = Object.assign(options, defaultParams); const params = Object.assign(options, defaultParams);
let message = ''; let message = '';
......
...@@ -118,5 +118,7 @@ ...@@ -118,5 +118,7 @@
"periodicInspectionPeriod": "Periodic Inspection Period", "periodicInspectionPeriod": "Periodic Inspection Period",
"msgSendPushMessageSuccess":"we sent a push message", "msgSendPushMessageSuccess":"we sent a push message",
"error": "Error", "error": "Error",
"msgSendPushMessageConfirm": "Do you want to send message?" "msgSendPushMessageConfirm": "Do you want to send message?",
"alert":"Alert",
"close":"Close"
} }
\ No newline at end of file
...@@ -116,5 +116,7 @@ ...@@ -116,5 +116,7 @@
"periodicInspectionPeriod": "定期点検期間", "periodicInspectionPeriod": "定期点検期間",
"msgSendPushMessageSuccess":"プッシュメッセージ送信しました。", "msgSendPushMessageSuccess":"プッシュメッセージ送信しました。",
"error": "エラー", "error": "エラー",
"msgSendPushMessageConfirm": "Do you want to send message?" "msgSendPushMessageConfirm": "Do you want to send message?",
"alert":"Alert",
"close":"閉じる"
} }
\ No newline at end of file
...@@ -115,5 +115,7 @@ ...@@ -115,5 +115,7 @@
"periodicInspectionPeriod": "정기점검기간", "periodicInspectionPeriod": "정기점검기간",
"msgSendPushMessageSuccess":"푸시메시지를 보냈습니다.", "msgSendPushMessageSuccess":"푸시메시지를 보냈습니다.",
"error": "에러", "error": "에러",
"msgSendPushMessageConfirm": "Do you want to send message?" "msgSendPushMessageConfirm": "Do you want to send message?",
"alert":"Alert",
"close":"Close"
} }
\ No newline at end of file
...@@ -18,7 +18,7 @@ PushMessageList.init = function () { ...@@ -18,7 +18,7 @@ PushMessageList.init = function () {
href: 'dashboard.html', href: 'dashboard.html',
}, },
{ {
titleLang: 'messageListTitle', titleLang: 'pushMessageList',
}, },
]; ];
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pushMessageList', navs, null); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pushMessageList', navs, null);
...@@ -71,6 +71,12 @@ PushMessageList.generateMessageListHtml = function (messageList) { ...@@ -71,6 +71,12 @@ PushMessageList.generateMessageListHtml = function (messageList) {
$('#messageList .not-found').removeClass('d-none'); $('#messageList .not-found').removeClass('d-none');
return; return;
} }
//sort message list by send date
messageList.sort(function (a, b) {
if (a.pushSendDate > b.pushSendDate) return -1;
if (a.pushSendDate < b.pushSendDate) return 1;
return 0;
});
$('#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];
......
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