Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
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
abookCommunication
chat_webview
Commits
c264090c
Commit
c264090c
authored
Apr 12, 2021
by
Lee Daehyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
システムメッセージ日付追加
parent
89faf50a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
6 deletions
+87
-6
public_new/css/chat.css
+3
-0
public_new/js/chat-ui.js
+15
-1
public_new/js/chat-util.js
+34
-0
public_new/js/language_en.js
+11
-1
public_new/js/language_ja.js
+11
-1
public_new/js/language_ko.js
+11
-1
public_new/template/template_system_message.html
+2
-2
No files found.
public_new/css/chat.css
View file @
c264090c
...
...
@@ -742,6 +742,9 @@ input[name="tab_item"] {
border
:
none
;
font-size
:
18px
;
}
.dow
{
margin-left
:
10px
;
}
/**************************** modal *************************/
/* メニューモーダル */
...
...
public_new/js/chat-ui.js
View file @
c264090c
...
...
@@ -1193,7 +1193,8 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
let
filterObj
=
jQuery
.
parseHTML
(
filterHtml
);
$
(
'#filter'
).
append
(
filterObj
);
var
checkBeforeDate
=
""
;
var
beforeDate
=
""
;
messages
.
forEach
(
function
(
message
)
{
let
template
=
userMessageTemplate
;
if
(
message
.
shopMemberId
==
CHAT
.
globalLoginParameter
.
shopMemberId
)
{
...
...
@@ -1223,6 +1224,19 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
if
(
messageTime
.
createdAt
.
includes
(
':'
))
{
isToday
=
true
;
}
if
(
messageTime
.
createdAtDay
!=
checkBeforeDate
&&
checkBeforeDate
!=
""
)
{
let
messageDay
=
CHAT_UTIL
.
systemDay
(
beforeDate
);
let
html
=
Mustache
.
render
(
systemMessageTemplate
,
{
year
:
messageDay
.
year
+
getLocalizedString
(
'year'
),
month
:
messageDay
.
month
+
getLocalizedString
(
'month'
),
day
:
messageDay
.
day
+
getLocalizedString
(
'day'
),
dow
:
CHAT_UTIL
.
findDow
(
messageDay
.
dow
)
});
workVal
=
html
+
workVal
;
}
checkBeforeDate
=
messageTime
.
createdAtDay
;
beforeDate
=
message
.
insertDate
;
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
message
,
...
...
public_new/js/chat-util.js
View file @
c264090c
...
...
@@ -55,3 +55,37 @@ CHAT_UTIL.generateUUID = function() {
});
return
uuid
;
};
CHAT_UTIL
.
systemDay
=
function
(
date
)
{
let
createdAt
=
moment
(
date
);
createdAt
=
moment
(
date
,
'YYYYMMDDhhmmss'
);
const
createdAtDow
=
createdAt
.
format
(
'YYYY-MM-DD'
);
let
systemDay
=
new
Object
();
systemDay
.
year
=
createdAt
.
format
(
'YYYY'
);
systemDay
.
month
=
createdAt
.
format
(
'MM'
);
systemDay
.
day
=
createdAt
.
format
(
'DD'
);
systemDay
.
dow
=
moment
(
createdAtDow
).
day
();
return
systemDay
;
}
CHAT_UTIL
.
findDow
=
function
(
data
)
{
let
dow
=
""
;
if
(
data
==
0
)
{
dow
=
getLocalizedString
(
'sunday'
);
}
else
if
(
data
==
1
)
{
dow
=
getLocalizedString
(
'monday'
);
}
else
if
(
data
==
2
)
{
dow
=
getLocalizedString
(
'thusday'
);
}
else
if
(
data
==
3
)
{
dow
=
getLocalizedString
(
'wednesday'
);
}
else
if
(
data
==
4
)
{
dow
=
getLocalizedString
(
'thursday'
);
}
else
if
(
data
==
5
)
{
dow
=
getLocalizedString
(
'friday'
);
}
else
if
(
data
==
6
)
{
dow
=
getLocalizedString
(
'sunday'
);
}
return
dow
;
}
public_new/js/language_en.js
View file @
c264090c
...
...
@@ -78,5 +78,15 @@ $.lang.en = {
"archiveSaveUser"
:
"Save User"
,
"archiveAttendUser"
:
"Attend User"
,
"noResult"
:
"there is no search result."
,
"searchUserAndGroup"
:
"search user and group."
"searchUserAndGroup"
:
"search user and group."
,
"year"
:
"year"
,
"month"
:
"month"
,
"day"
:
"day"
,
"monday"
:
"monday"
,
"thusday"
:
"thusday"
,
"wednesday"
:
"wednesday"
,
"thursday"
:
"thursday"
,
"friday"
:
"friday"
,
"saturday"
:
"saturday"
,
"sunday"
:
"sunday"
}
public_new/js/language_ja.js
View file @
c264090c
...
...
@@ -78,5 +78,15 @@ $.lang.ja = {
"archiveSaveUser"
:
"保存ユーザー"
,
"archiveAttendUser"
:
"参加ユーザー"
,
"noResult"
:
"検索結果がありませんでした。"
,
"searchUserAndGroup"
:
"ユーザーとグループ検索"
"searchUserAndGroup"
:
"ユーザーとグループ検索"
,
"year"
:
"年"
,
"month"
:
"月"
,
"day"
:
"日"
,
"monday"
:
"月曜日"
,
"thusday"
:
"火曜日"
,
"wednesday"
:
"水曜日"
,
"thursday"
:
"木曜日"
,
"friday"
:
"金曜日"
,
"saturday"
:
"土曜日"
,
"sunday"
:
"日曜日"
}
public_new/js/language_ko.js
View file @
c264090c
...
...
@@ -78,5 +78,15 @@ $.lang.ko = {
"archiveSaveUser"
:
"저장 사용자"
,
"archiveAttendUser"
:
"참여자"
,
"noResult"
:
"검색결과가 존재하지않습니다"
,
"searchUserAndGroup"
:
"유저,그룹 검색"
"searchUserAndGroup"
:
"유저,그룹 검색"
,
"year"
:
"년"
,
"month"
:
"월"
,
"day"
:
"일"
,
"monday"
:
"월요일"
,
"thusday"
:
"화요일"
,
"wednesday"
:
"수요일"
,
"thursday"
:
"목요일"
,
"friday"
:
"금요일"
,
"saturday"
:
"토요일"
,
"sunday"
:
"일요일"
}
public_new/template/template_system_message.html
View file @
c264090c
<div
class=
"sys_msg text-center"
>
2021/03/04
</div>
\ No newline at end of file
<div
class=
"sys_msg text-center"
>
{{year}}{{month}}{{day}}
<span
class=
"dow"
>
{{dow}}
</span></div>
\ No newline at end of file
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