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
dfb81284
Commit
dfb81284
authored
Apr 19, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
メッセージ日付修正
parent
4f50adf9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
public_new/css/chat.css
+2
-2
public_new/js/chat-ui.js
+8
-2
public_new/template/template_my_message.html
+5
-0
No files found.
public_new/css/chat.css
View file @
dfb81284
...
...
@@ -634,7 +634,7 @@ input[name="tab_item"] {
background-color
:
#0070ca
;
color
:
#fff
;
margin
:
0
;
margin-left
:
8
0px
;
margin-left
:
11
0px
;
font-size
:
18px
;
word-break
:
break-word
;
}
...
...
@@ -652,7 +652,7 @@ input[name="tab_item"] {
/* 日付 */
.room_right
.date
{
position
:
absolute
;
width
:
8
0px
;
width
:
11
0px
;
text-align
:
right
;
top
:
0px
;
left
:
-10px
;
...
...
public_new/js/chat-ui.js
View file @
dfb81284
...
...
@@ -1142,6 +1142,7 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
};
CHAT_UI
.
loadMessages
=
function
(
roomId
,
roomName
)
{
var
now
=
new
Date
();
if
(
IS_ONLINE
==
'true'
)
{
CHAT_UI
.
refreshForOnline
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
...
...
@@ -1243,11 +1244,14 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
message
.
message
=
replacePath
;
/* if (message.message contain) {
}*/
var
isOtherYear
=
false
;
var
isToday
=
false
;
if
(
messageTime
.
createdAt
.
includes
(
':'
))
{
isToday
=
true
;
}
if
(
now
.
getFullYear
()
!=
message
.
insertDate
.
substring
(
0
,
4
))
{
isOtherYear
=
true
;
}
if
(
messageTime
.
createdAtDay
!=
checkBeforeDate
&&
checkBeforeDate
!=
""
)
{
let
messageDay
=
CHAT_UTIL
.
systemDay
(
beforeDate
);
let
html
=
Mustache
.
render
(
systemMessageTemplate
,
{
...
...
@@ -1261,7 +1265,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
}
checkBeforeDate
=
messageTime
.
createdAtDay
;
beforeDate
=
message
.
insertDate
;
console
.
log
(
messageTime
);
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
message
,
from
:
message
.
loginId
,
...
...
@@ -1269,7 +1273,9 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
profileImage
:
message
.
profileUrl
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
,
createdAtYear
:
message
.
insertDate
.
substring
(
0
,
4
)
+
getLocalizedString
(
'year'
)
+
' '
,
unreadCount
:
message
.
unreadCount
,
isOtherYear
:
isOtherYear
,
isToday
:
isToday
});
html
=
message
.
message
.
includes
(
'attachedImages'
)
||
message
.
message
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
...
...
public_new/template/template_my_message.html
View file @
dfb81284
...
...
@@ -4,7 +4,12 @@
<div
class=
"date d-flex flex-column"
><span></span><span>
{{createdAtTime}}
</span></div>
{{/isToday}}
{{^isToday}}
{{#isOtherYear}}
<div
class=
"date d-flex flex-column"
><span>
{{createdAtYear}} {{createdAtDay}}
</span><span>
{{createdAtTime}}
</span></div>
{{/isOtherYear}}
{{^isOtherYear}}
<div
class=
"date d-flex flex-column"
><span>
{{createdAtDay}}
</span><span>
{{createdAtTime}}
</span></div>
{{/isOtherYear}}
{{/isToday}}
{{#unreadCount}}
<div
class=
"unread d-flex align-items-end"
><span>
{{unreadCount}}
</span></div>
...
...
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