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() {
...
@@ -13,7 +13,7 @@ PushMessageList.init = function() {
I18N
.
initi18n
();
I18N
.
initi18n
();
});
});
PushMessageList
.
getMessageList
(
function
(
messageList
)
{
PushMessageList
.
getMessageList
(
function
(
messageList
)
{
PushMessageList
.
generateMessageListHtml
(
messageList
);
PushMessageList
.
generateMessageListHtml
(
messageList
.
pushMessageList
);
});
});
}
}
...
@@ -33,7 +33,7 @@ PushMessageList.getMessageList = function (callback) {
...
@@ -33,7 +33,7 @@ PushMessageList.getMessageList = function (callback) {
},
function
()
{
},
function
()
{
console
.
log
(
'PushMessageList.getMessageList error'
);
console
.
log
(
'PushMessageList.getMessageList error'
);
if
(
callback
)
{
if
(
callback
)
{
callback
(
PushMessageList
.
dummyMessageList
()
);
callback
(
PushMessageList
.
dummyMessageList
Json
);
}
}
});
});
};
};
...
@@ -64,12 +64,11 @@ PushMessageList.generateMessageListHtml = function(messageList) {
...
@@ -64,12 +64,11 @@ PushMessageList.generateMessageListHtml = function(messageList) {
var
mTitle
=
message
.
pushMessage
;
var
mTitle
=
message
.
pushMessage
;
var
mDate
=
message
.
pushSendDate
;
var
mDate
=
message
.
pushSendDate
;
var
mSubtitle
=
message
.
operationName
;
var
mSubtitle
=
message
.
operationName
;
var
unread
=
!
message
.
readingFlg
;
var
messageLi
=
$
(
'<li class="card mb-2" id="pushMessageId_'
+
messageId
+
'"/>'
);
var
messageLi
=
$
(
'<li class="card mb-2" id="pushMessageId_'
+
messageId
+
'"/>'
);
if
(
unread
)
{
if
(
message
.
readingFlg
)
{
messageLi
.
addClass
(
'unread'
);
}
else
{
messageLi
.
addClass
(
'read'
);
messageLi
.
addClass
(
'read'
);
}
else
{
messageLi
.
addClass
(
'unread'
);
}
}
var
messageA
=
$
(
'<a class="d-block px-3 py-2 text-decoration-none text-dark"/>'
);
var
messageA
=
$
(
'<a class="d-block px-3 py-2 text-decoration-none text-dark"/>'
);
messageA
.
attr
(
'href'
,
"javascript:PushMessageList.clickMessage('"
+
messageId
+
"');"
);
messageA
.
attr
(
'href'
,
"javascript:PushMessageList.clickMessage('"
+
messageId
+
"');"
);
...
@@ -87,24 +86,20 @@ PushMessageList.generateMessageListHtml = function(messageList) {
...
@@ -87,24 +86,20 @@ PushMessageList.generateMessageListHtml = function(messageList) {
};
};
/**
/**
* dummy message list for test
* dummy message list JSON for test
* @returns message List
*/
*/
PushMessageList
.
dummyMessageList
=
function
()
{
PushMessageList
.
dummyMessageListJson
=
{
var
messes
=
[];
pushMessageList
:
[{
messes
.
push
({
pushMessageId
:
1
,
pushMessageId
:
1
,
pushMessage
:
'メッセージ内容が入ります。'
,
pushMessage
:
'メッセージ内容が入ります。'
,
pushSendDate
:
'2022/07/06 14:14'
,
pushSendDate
:
'2022/07/06 14:14'
,
operationName
:
'作業名が入ります。'
,
operationName
:
'作業名が入ります。'
,
readingFlg
:
false
,
readingFlg
:
0
,
});
},
{
messes
.
push
({
pushMessageId
:
2
,
pushMessageId
:
2
,
pushMessage
:
'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。'
,
pushMessage
:
'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。'
,
pushSendDate
:
'xxxxxxxxxxxxxxxxxxxxxxxxxx'
,
pushSendDate
:
'xxxxxxxxxxxxxxxxxxxxxxxxxx'
,
operationName
:
'作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。'
,
operationName
:
'作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。'
,
readingFlg
:
true
,
readingFlg
:
1
,
});
}]
return
messes
;
};
}
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