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
bb64ab0d
Commit
bb64ab0d
authored
Mar 25, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
チャット画面UI
parent
ed4601f6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
32 deletions
+63
-32
public_new/chat.html
+0
-0
public_new/contact.html
+2
-2
public_new/css/chat.css
+6
-1
public_new/js/chat-ui.js
+41
-18
public_new/js/common.js
+4
-1
public_new/template/template_group_list.html
+1
-1
public_new/template/template_group_path.html
+2
-2
public_new/template/template_room_list.html
+7
-7
No files found.
public_new/chat.html
View file @
bb64ab0d
This diff is collapsed.
Click to expand it.
public_new/contact.html
View file @
bb64ab0d
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<div
class=
"col-4 pr-0"
>
<div
class=
"col-4 pr-0"
>
<div
class=
"nav-item"
>
<div
class=
"nav-item"
>
<div
class=
"nav_prev"
>
<div
class=
"nav_prev"
>
<a
href=
"#"
><span>
ホーム
</span></a>
<a
href=
"#"
class=
"home_btn"
><span>
ホーム
</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"chat_item_l"
>
<div
class=
"thubnail"
>
<div
class=
"thubnail"
>
<div
class=
"img_wrap"
><img
id=
"myImg"
src=
"img/noImage.png"
alt=
"サムネイル画像
"
/></div>
<div
class=
"img_wrap"
><img
id=
"myImg"
src=
"img/noImage.png"
onError=
"this.src='./img/noImage.png'
"
/></div>
</div>
</div>
</div>
</div>
<div
class=
"chat_item_m px-0"
>
<div
class=
"chat_item_m px-0"
>
...
...
public_new/css/chat.css
View file @
bb64ab0d
...
@@ -42,6 +42,11 @@ input[name="tab_item"] {
...
@@ -42,6 +42,11 @@ input[name="tab_item"] {
display
:
block
;
display
:
block
;
}
}
#tabGroup
:checked
~
#tab1_content
,
#tabDM
:checked
~
#tab2_content
{
display
:
block
;
}
.tabs
input
:checked
+
.tab_item
{
.tabs
input
:checked
+
.tab_item
{
background-color
:
#0070CA
;
background-color
:
#0070CA
;
color
:
#fff
;
color
:
#fff
;
...
@@ -127,7 +132,7 @@ input[name="tab_item"] {
...
@@ -127,7 +132,7 @@ input[name="tab_item"] {
}
}
.chat_item_l
.thubnail3
.img_wrap
:nth-child
(
2
)
img
,
.chat_item_l
.thubnail3
.img_wrap
:nth-child
(
3
)
img
{
.chat_item_l
.thubnail3
.img_wrap
:nth-child
(
2
)
img
,
.chat_item_l
.thubnail3
.img_wrap
:nth-child
(
3
)
img
{
width
:
25px
;
width
:
25px
;
height
:
25
px
;
height
:
30
px
;
}
}
.chat_item_l
.thubnail3
.img_wrap
:nth-child
(
3
)
{
.chat_item_l
.thubnail3
.img_wrap
:nth-child
(
3
)
{
width
:
25px
;
width
:
25px
;
...
...
public_new/js/chat-ui.js
View file @
bb64ab0d
...
@@ -1003,6 +1003,12 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -1003,6 +1003,12 @@ CHAT_UI.refreshContactScreen = function() {
}
}
CHAT_UI
.
refreshRoomList
=
function
(
roomType
)
{
CHAT_UI
.
refreshRoomList
=
function
(
roomType
)
{
if
(
roomType
==
chatRoomType
.
DM
)
{
$
(
'#tabDM'
).
prop
(
'checked'
,
true
);
}
else
{
$
(
'#tabGroup'
).
prop
(
'checked'
,
true
);
}
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
}
}
...
@@ -1011,18 +1017,22 @@ CHAT_UI.refreshRoomList = function(roomType) {
...
@@ -1011,18 +1017,22 @@ CHAT_UI.refreshRoomList = function(roomType) {
activeRoomId
=
null
;
activeRoomId
=
null
;
console
.
log
(
rooms
);
console
.
log
(
rooms
);
// #36146に対応
// #36146に対応
$
(
'.chat_list'
).
empty
();
$
(
'#groupChatList'
).
empty
();
$
(
'#dmChatList'
).
empty
();
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
if
(
rooms
.
length
===
0
)
{
if
(
rooms
.
length
===
0
)
{
console
.
log
(
'noRoom'
)
console
.
log
(
'noRoom'
)
// 検索結果がない場合のメッセージを追加
// 検索結果がない場合のメッセージを追加
if
(
!
keywordSearchMode
)
{
let
emptyListString
=
getLocalizedString
(
"roomListEmptyString"
)
let
emptyListString
=
getLocalizedString
(
"roomListEmptyString"
)
$
(
'#room_list'
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
switch
(
roomType
)
{
}
else
{
case
chatRoomType
.
GROUP
:
let
emptyListString
=
getLocalizedString
(
"searchRoomListEmptyString"
)
$
(
'#groupChatList'
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
$
(
'#room_list'
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
break
;
case
chatRoomType
.
DM
:
$
(
'#dmChatList'
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
break
;
default
:
}
}
}
}
...
@@ -1031,6 +1041,7 @@ CHAT_UI.refreshRoomList = function(roomType) {
...
@@ -1031,6 +1041,7 @@ CHAT_UI.refreshRoomList = function(roomType) {
,
function
(
text
)
{
,
function
(
text
)
{
template
=
text
;
template
=
text
;
});
});
console
.
log
(
rooms
);
rooms
.
forEach
(
function
(
room
)
{
rooms
.
forEach
(
function
(
room
)
{
room
.
profileImagePath
=
ASSET_PATH
+
'images/user-profile.png'
room
.
profileImagePath
=
ASSET_PATH
+
'images/user-profile.png'
if
(
room
.
message
)
{
if
(
room
.
message
)
{
...
@@ -1042,14 +1053,25 @@ CHAT_UI.refreshRoomList = function(roomType) {
...
@@ -1042,14 +1053,25 @@ CHAT_UI.refreshRoomList = function(roomType) {
//TODO 協業の場合処理追加必要
//TODO 協業の場合処理追加必要
if
(
room
.
messageType
==
messageType
.
TEXT
||
room
.
messageType
==
messageType
.
TEXT
)
displayMsg
=
room
.
message
;
if
(
room
.
messageType
==
messageType
.
TEXT
||
room
.
messageType
==
messageType
.
TEXT
)
displayMsg
=
room
.
message
;
if
(
room
.
messageType
==
messageType
.
IMAGE
||
room
.
messageType
==
messageType
.
SYSTEM
)
displayMsg
=
getLocalizedString
(
"image"
);
if
(
room
.
messageType
==
messageType
.
IMAGE
||
room
.
messageType
==
messageType
.
SYSTEM
)
displayMsg
=
getLocalizedString
(
"image"
);
var
attendUserName
=
[];
room
.
attendUsers
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
attendUserName
.
push
(
user
.
shopMemberName
);
});
var
thumbnailCount
=
room
.
attendUsers
.
length
>
4
?
4
:
room
.
attendUsers
.
length
;
if
(
room
.
chatRoomName
==
""
)
{
room
.
chatRoomName
=
attendUserName
.
join
(
', '
);
}
let
html
=
Mustache
.
render
(
template
,
{
let
html
=
Mustache
.
render
(
template
,
{
thumbnailCount
:
thumbnailCount
,
roomName
:
room
.
chatRoomName
,
roomName
:
room
.
chatRoomName
,
roomId
:
room
.
chatRoomId
,
roomId
:
room
.
chatRoomId
,
profileImage
:
room
.
profileImagePath
,
profileImage
:
room
.
profileImagePath
,
lastMessage
:
displayMsg
,
lastMessage
:
displayMsg
,
time
:
room
.
insertDate
?
CHAT_UTIL
.
formatDate
(
room
.
insertDate
).
createdAt
:
''
,
time
:
room
.
insertDate
?
CHAT_UTIL
.
formatDate
(
room
.
insertDate
).
createdAt
:
''
,
unreadMsgCnt
:
room
.
unreadCount
==
0
?
''
:
room
.
unreadCount
,
unreadMsgCnt
:
room
.
unreadCount
==
0
?
''
:
room
.
unreadCount
,
userCnt
:
room
.
userCount
userCnt
:
room
.
attendUsers
.
length
+
1
,
attendUsers
:
room
.
attendUsers
});
});
// Click event
// Click event
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
...
@@ -1058,13 +1080,15 @@ CHAT_UI.refreshRoomList = function(roomType) {
...
@@ -1058,13 +1080,15 @@ CHAT_UI.refreshRoomList = function(roomType) {
CHAT_UI.joinRoom(roomId,roomName);*/
CHAT_UI.joinRoom(roomId,roomName);*/
//TODO ルームに入る処理追加必要
//TODO ルームに入る処理追加必要
});
});
console
.
log
(
obj
);
// ルームグループごとに追加。
// ルームグループごとに追加。
switch
(
roomType
)
{
switch
(
roomType
)
{
case
chatRoomType
.
GROUP
:
case
chatRoomType
.
GROUP
:
console
.
log
(
roomType
);
$
(
'#groupChatList'
).
append
(
obj
);
$
(
'#groupChatList'
).
append
(
obj
);
break
;
break
;
case
chatRoomType
.
DM
:
case
chatRoomType
.
DM
:
console
.
log
(
roomType
);
$
(
'#dmChatList'
).
append
(
obj
);
$
(
'#dmChatList'
).
append
(
obj
);
break
;
break
;
default
:
default
:
...
@@ -1155,21 +1179,20 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
...
@@ -1155,21 +1179,20 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
};
};
$
(
'#
dmBtn
'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#
tabDM
'
).
on
(
'click'
,
function
(
e
)
{
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
});
});
$
(
'#
groupBtn
'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#
tabGroup
'
).
on
(
'click'
,
function
(
e
)
{
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
GROUP
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
GROUP
);
});
});
$
(
'#myGroupBtn'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#tabAllGroup'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#myGroupArea'
).
show
();
CHAT_UI
.
refreshAllGroupSearch
(
'0'
);
$
(
'#allGroupArea'
).
hide
();
});
});
$
(
'#tab
All
Group'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#tab
My
Group'
).
on
(
'click'
,
function
(
e
)
{
CHAT_UI
.
ref
esshAllGroupSearch
(
'0'
)
CHAT_UI
.
ref
reshContactScreen
();
});
});
CHAT_UI
.
favoriteUserChange
=
function
(
shopMemberId
,
star
)
{
CHAT_UI
.
favoriteUserChange
=
function
(
shopMemberId
,
star
)
{
...
@@ -1217,7 +1240,7 @@ CHAT_UI.insertFavoriteGroup = function(groupId) {
...
@@ -1217,7 +1240,7 @@ CHAT_UI.insertFavoriteGroup = function(groupId) {
};
};
//全グループ検索画面表示。
//全グループ検索画面表示。
CHAT_UI
.
ref
es
shAllGroupSearch
=
function
(
groupId
)
{
CHAT_UI
.
ref
re
shAllGroupSearch
=
function
(
groupId
)
{
$
(
'.cancel'
).
addClass
(
'none'
);
$
(
'.cancel'
).
addClass
(
'none'
);
$
(
'.search_form input'
).
removeClass
(
'focus'
);
$
(
'.search_form input'
).
removeClass
(
'focus'
);
...
@@ -1246,12 +1269,12 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
...
@@ -1246,12 +1269,12 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
//上位グループ、トップグループ遷移ボタンのイベント追加。
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
'undefined'
)
{
if
(
typeof
result
.
parentGroupId
!==
'undefined'
)
{
$
(
'#parentGroupBtn'
).
on
(
'click'
,
function
()
{
$
(
'#parentGroupBtn'
).
on
(
'click'
,
function
()
{
CHAT_UI
.
ref
es
shAllGroupSearch
(
result
.
parentGroupId
);
CHAT_UI
.
ref
re
shAllGroupSearch
(
result
.
parentGroupId
);
});
});
}
}
if
(
typeof
result
.
rootGroupId
!==
'undefined'
)
{
if
(
typeof
result
.
rootGroupId
!==
'undefined'
)
{
$
(
'#rootGroupBtn'
).
on
(
'click'
,
function
()
{
$
(
'#rootGroupBtn'
).
on
(
'click'
,
function
()
{
CHAT_UI
.
ref
es
shAllGroupSearch
(
result
.
rootGroupId
);
CHAT_UI
.
ref
re
shAllGroupSearch
(
result
.
rootGroupId
);
});
});
}
}
...
...
public_new/js/common.js
View file @
bb64ab0d
// アコーディオン
// アコーディオン
$
(
'.category'
).
on
(
'click'
,
function
()
{
$
(
'.category'
).
on
(
'click'
,
function
()
{
$
(
this
).
toggleClass
(
"open"
);
$
(
this
).
toggleClass
(
"open"
);
$
(
this
).
next
().
slideToggle
();
$
(
this
).
next
().
slideToggle
();
});
});
$
(
'.home_btn'
).
on
(
'click'
,
function
()
{
android
.
goHome
();
});
$
(
function
()
{
$
(
function
()
{
var
h
=
$
(
window
).
height
();
//画面の高さを取得
var
h
=
$
(
window
).
height
();
//画面の高さを取得
...
...
public_new/template/template_group_list.html
View file @
bb64ab0d
<li
class=
"d-flex align-items-center"
>
<li
class=
"d-flex align-items-center"
>
<a
href=
"#"
class=
"w-100"
onclick=
"CHAT_UI.ref
es
shAllGroupSearch({{id}});"
>
<a
href=
"#"
class=
"w-100"
onclick=
"CHAT_UI.ref
re
shAllGroupSearch({{id}});"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"chat_item_l"
>
<div
class=
"thubnail"
>
<div
class=
"thubnail"
>
...
...
public_new/template/template_group_path.html
View file @
bb64ab0d
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"CHAT_UI.refesshAllGroupSearch({{id}});"
><span>
{{name}}
</span></a>
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"CHAT_UI.refreshAllGroupSearch({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
\ No newline at end of file
public_new/template/template_room_list.html
View file @
bb64ab0d
...
@@ -2,11 +2,13 @@
...
@@ -2,11 +2,13 @@
<a
href=
"chat_room.html"
class=
"w-100"
>
<a
href=
"chat_room.html"
class=
"w-100"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"chat_item_l"
>
<div
class=
"thubnail4 thubnail"
>
<div
class=
"thubnail{{thumbnailCount}} thubnail"
>
<div
class=
"img_wrap"
><img
src=
"img/thumbnail.png"
alt=
"サムネイル画像"
/></div>
{{#attendUsers}}
<div
class=
"img_wrap"
><img
src=
"img/thumbnail.png"
alt=
"サムネイル画像"
/></div>
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/></div>
<div
class=
"img_wrap"
><img
src=
"img/thumbnail.png"
alt=
"サムネイル画像"
/></div>
{{/attendUsers}}
<div
class=
"img_wrap"
><img
src=
"img/thumbnail.png"
alt=
"サムネイル画像"
/></div>
{{^attendUsers}}
<div
class=
"img_wrap"
><img
src=
'./img/noImage.png'
/></div>
{{/attendUsers}}
</div>
</div>
</div>
</div>
<div
class=
"chat_item_m px-0"
>
<div
class=
"chat_item_m px-0"
>
...
@@ -15,9 +17,7 @@
...
@@ -15,9 +17,7 @@
<div
class=
"chat_item_t "
>
<div
class=
"chat_item_t "
>
<span
class=
"chat_item_ttl"
>
{{roomName}}
</span>
<span
class=
"chat_item_ttl"
>
{{roomName}}
</span>
</div>
</div>
<span
class=
"chat_item_num"
>
({{userCnt}})
</span>
<span
class=
"chat_item_num"
>
({{userCnt}})
</span>
</div>
</div>
<div
class=
"chat_item_desc"
>
<div
class=
"chat_item_desc"
>
{{lastMessage}}
{{lastMessage}}
...
...
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