Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
70ab8d42
Commit
70ab8d42
authored
Oct 26, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement dummy message list json
parent
b00b28e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
abvw/js/pushMessageList/push-message-list.js
+13
-18
No files found.
abvw/js/pushMessageList/push-message-list.js
View file @
70ab8d42
...
...
@@ -13,7 +13,7 @@ PushMessageList.init = function() {
I18N
.
initi18n
();
});
PushMessageList
.
getMessageList
(
function
(
messageList
)
{
PushMessageList
.
generateMessageListHtml
(
messageList
);
PushMessageList
.
generateMessageListHtml
(
messageList
.
pushMessageList
);
});
}
...
...
@@ -33,7 +33,7 @@ PushMessageList.getMessageList = function (callback) {
},
function
()
{
console
.
log
(
'PushMessageList.getMessageList error'
);
if
(
callback
)
{
callback
(
PushMessageList
.
dummyMessageList
()
);
callback
(
PushMessageList
.
dummyMessageList
Json
);
}
});
};
...
...
@@ -64,12 +64,11 @@ PushMessageList.generateMessageListHtml = function(messageList) {
var
mTitle
=
message
.
pushMessage
;
var
mDate
=
message
.
pushSendDate
;
var
mSubtitle
=
message
.
operationName
;
var
unread
=
!
message
.
readingFlg
;
var
messageLi
=
$
(
'<li class="card mb-2" id="pushMessageId_'
+
messageId
+
'"/>'
);
if
(
unread
)
{
messageLi
.
addClass
(
'unread'
);
}
else
{
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
+
"');"
);
...
...
@@ -87,24 +86,20 @@ PushMessageList.generateMessageListHtml = function(messageList) {
};
/**
* dummy message list for test
* @returns message List
* dummy message list JSON for test
*/
PushMessageList
.
dummyMessageList
=
function
()
{
var
messes
=
[];
messes
.
push
({
PushMessageList
.
dummyMessageListJson
=
{
pushMessageList
:
[{
pushMessageId
:
1
,
pushMessage
:
'メッセージ内容が入ります。'
,
pushSendDate
:
'2022/07/06 14:14'
,
operationName
:
'作業名が入ります。'
,
readingFlg
:
false
,
});
messes
.
push
({
readingFlg
:
0
,
},
{
pushMessageId
:
2
,
pushMessage
:
'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。'
,
pushSendDate
:
'xxxxxxxxxxxxxxxxxxxxxxxxxx'
,
operationName
:
'作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。'
,
readingFlg
:
true
,
});
return
messes
;
}
readingFlg
:
1
,
}]
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment