Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
design
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
abookCheck
design
Commits
31c31a10
Commit
31c31a10
authored
Aug 25, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#49170 implement action push message 'read'
parent
780e3a60
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
app/script/check-message-detail.js
+10
-2
app/script/check-message-list.js
+8
-3
app/script/check.js
+2
-1
No files found.
app/script/check-message-detail.js
View file @
31c31a10
...
...
@@ -13,10 +13,10 @@ CHK_MessageDetail.init = function() {
CHK_Footer
.
activeDashboardBottomNav
();
});
var
urlParam
=
CHK
.
getUrlParameter
();
if
(
typeof
urlParam
!==
'object'
||
typeof
urlParam
.
i
d
===
'undefined'
)
{
if
(
typeof
urlParam
!==
'object'
||
typeof
urlParam
.
pushMessageI
d
===
'undefined'
)
{
return
;
}
let
messageId
=
urlParam
.
i
d
;
let
messageId
=
urlParam
.
pushMessageI
d
;
CHK
.
loadJson
(
CHK
.
jsonPath
.
pushMessageList
,
function
(
json
)
{
var
messageList
=
json
.
pushMessageList
;
if
(
typeof
messageList
!==
'object'
)
{
...
...
@@ -26,6 +26,14 @@ CHK_MessageDetail.init = function() {
let
message
=
messageList
[
i
];
if
(
message
.
pushMessageId
==
messageId
)
{
CHK_MessageDetail
.
showMessage
(
message
);
if
(
!
message
.
readingFlg
)
{
//update reading flag
var
param
=
{};
param
.
cmd
=
CHK
.
getCommand
(
'actionPushMessage'
);
param
.
pushMessageId
=
messageId
;
param
.
pushMessageAction
=
'read'
;
CHK
.
sendABookCheckApi
(
param
);
}
break
;
}
}
...
...
app/script/check-message-list.js
View file @
31c31a10
...
...
@@ -9,8 +9,8 @@ CHK_MessageList.init = function() {
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
CHK_Footer
.
activeDashboardBottomNav
();
});
CHK
.
loadJson
(
CHK
.
jsonPath
.
pushMessageList
,
function
(
json
)
{
//CHK_MessageList.createMessageList(CHK_MessageList.dummyMessageList());
CHK
.
loadJson
(
CHK
.
jsonPath
.
pushMessageList
,
function
(
json
)
{
CHK_MessageList
.
createMessageList
(
json
.
pushMessageList
);
});
}
...
...
@@ -23,6 +23,11 @@ CHK_MessageList.refresh = function() {
CHK_MessageList
.
init
();
}
CHK_MessageList
.
clickMessage
=
function
(
pushMessageId
)
{
$
(
"#pushMessageId_"
+
pushMessageId
).
removeClass
(
'unread'
);
location
.
href
=
'message-detail.html?pushMessageId='
+
pushMessageId
;
}
CHK_MessageList
.
createMessageList
=
function
(
messageList
)
{
$
(
'#messageTable'
).
empty
();
if
(
typeof
messageList
!==
'object'
)
{
...
...
@@ -37,12 +42,12 @@ CHK_MessageList.createMessageList = function(messageList) {
var
mDate
=
message
.
pushSendDate
;
var
mSubtitle
=
message
.
operationName
;
var
unread
=
!
message
.
readingFlg
;
var
messageLi
=
$
(
'<li class="item list-unstyled rounded border mb-2"/>'
);
var
messageLi
=
$
(
'<li class="item list-unstyled rounded border mb-2"
id="pushMessageId_'
+
messageId
+
'"
/>'
);
if
(
unread
)
{
messageLi
.
addClass
(
'unread'
);
}
var
messageA
=
$
(
'<a class="d-block px-3 py-2 text-decoration-none text-dark"/>'
);
messageA
.
attr
(
'href'
,
'message-detail.html?id='
+
messageId
);
messageA
.
attr
(
'href'
,
"javascript:CHK_MessageList.clickMessage('"
+
messageId
+
"');"
);
var
titleDiv
=
$
(
'<div class="title">'
+
mTitle
+
'</div>'
);
var
subTitleMainDiv
=
$
(
'<div class="sub-title-wrap"></div>'
);
var
dateDiv
=
$
(
'<div class="fs-8 text-secondary mr-2"><div class="data">'
+
mDate
+
'</div></div>'
);
...
...
app/script/check.js
View file @
31c31a10
...
...
@@ -214,7 +214,8 @@ CHK.apiCmd = {
changeReport
:
"changeTaskReport"
,
//報告レポート変更
getGroupTreeInfo
:
"getGroupTreeInfo"
,
//担当グループ参照用 ログインユーザーが所属しているグループ取得
deleteProcess
:
"deleteProcess"
,
changeOperationGroupMaster
:
"changeOperationGroupMaster"
changeOperationGroupMaster
:
"changeOperationGroupMaster"
,
actionPushMessage
:
"actionPushMessage"
};
//CMS送信用コマンド
CHK
.
actCmd
=
{
...
...
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