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
8fc5ddaf
Commit
8fc5ddaf
authored
Feb 18, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
チャット詳細実装
parent
b994ba6e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
153 additions
and
81 deletions
+153
-81
public/css/chat.css
+23
-0
public/index.html
+8
-3
public/js/chat-db.js
+30
-2
public/js/chat-ui.js
+90
-75
public/js/chat-websocket.js
+2
-1
No files found.
public/css/chat.css
View file @
8fc5ddaf
...
@@ -680,3 +680,25 @@ a.article:hover {
...
@@ -680,3 +680,25 @@ a.article:hover {
#errorEnd
{
#errorEnd
{
margin-top
:
15vh
;
margin-top
:
15vh
;
}
}
.collapsible
{
height
:
40px
;
background-color
:
#eee
;
color
:
#444
;
cursor
:
pointer
;
width
:
100%
;
border
:
none
;
text-align
:
left
;
outline
:
none
;
font-size
:
15px
;
}
.collapsible-active
,
.collapsible
:hover
{
background-color
:
#ccc
;
}
.collapsible-content
{
display
:
none
;
overflow
:
hidden
;
background-color
:
#f1f1f1
;
}
\ No newline at end of file
public/index.html
View file @
8fc5ddaf
...
@@ -236,10 +236,15 @@
...
@@ -236,10 +236,15 @@
</div>
</div>
<div
id=
"my_info"
class=
"inbox_user row"
>
<div
id=
"my_info"
class=
"inbox_user row"
>
</div>
</div>
<div
id=
"favorite_list"
class=
"inbox_user row"
>
<div
class=
"collapsible-content"
>
<div
id=
"favorite_list"
class=
"inbox_user row"
>
</div>
</div>
</div>
<div
id=
"my_group_list"
class=
"inbox_user row"
>
<div
class=
"collapsible-content"
>
<div
id=
"my_group_list"
class=
"inbox_user row"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -354,7 +359,7 @@
...
@@ -354,7 +359,7 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<nav
class=
"navbar navbar-expand navbar-dark fixed-bottom flex-md-nowrap p-2 bg-footer talign-center border footer-nav"
>
<nav
class=
"navbar navbar-expand navbar-dark fixed-bottom flex-md-nowrap p-2 bg-footer talign-center border footer-nav"
id=
"bottomNav"
>
<div
class=
"col-4"
>
<div
class=
"col-4"
>
<img
src=
"./icon/ic_communication_meeting_gray.png"
style=
"width: 35%;"
id=
"contactButton"
>
<img
src=
"./icon/ic_communication_meeting_gray.png"
style=
"width: 35%;"
id=
"contactButton"
>
</div>
</div>
...
...
public/js/chat-db.js
View file @
8fc5ddaf
...
@@ -13,11 +13,38 @@ CHAT_DB.getRoomList = function(input) {
...
@@ -13,11 +13,38 @@ CHAT_DB.getRoomList = function(input) {
};
};
//ロカールDBからログインしたユーザのデータを取得する。
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB
.
getMy
i
nfo
=
function
(
input
)
{
CHAT_DB
.
getMy
I
nfo
=
function
(
input
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyinfo
());
return
JSON
.
parse
(
android
.
getMyInfo
());
}
};
CHAT_DB
.
getMessages
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMessageList
(
roomId
));
}
};
CHAT_DB
.
getFavoriteUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsers
());
}
};
CHAT_DB
.
getFavoriteGroups
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteGroups
());
}
}
};
};
\ No newline at end of file
public/js/chat-ui.js
View file @
8fc5ddaf
...
@@ -73,7 +73,7 @@ $('#roomDeleteButton').on('click', function(e) {
...
@@ -73,7 +73,7 @@ $('#roomDeleteButton').on('click', function(e) {
$
(
'#messages'
).
html
(
''
);
$
(
'#messages'
).
html
(
''
);
$
(
'.titleRoomName'
).
text
(
roomName
).
data
(
'roomName'
,
roomName
);
$
(
'.titleRoomName'
).
text
(
roomName
).
data
(
'roomName'
,
roomName
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
"#message-search"
).
attr
(
"placeholder"
,
$
(
"#message-search"
).
attr
(
"placeholder"
)
+
getLocalizedString
(
"chat_search_placeholder"
));
$
(
"#message-search"
).
attr
(
"placeholder"
,
getLocalizedString
(
"chat_search_placeholder"
));
});
});
});
});
...
@@ -147,10 +147,11 @@ $('#messages').scroll(function(){
...
@@ -147,10 +147,11 @@ $('#messages').scroll(function(){
// ローディングアイコンを追加する
// ローディングアイコンを追加する
let
loader
=
$
(
'<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>'
)
let
loader
=
$
(
'<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>'
)
$
(
'#messages'
).
prepend
(
loader
)
$
(
'#messages'
).
prepend
(
loader
)
socket
.
emit
(
'getMessages'
,
$
(
this
).
children
().
length
,
function
()
{
loader
.
remove
();
// ローディングアイコンを削除する
// socket.emit('getMessages', $(this).children().length, function() {
loader
.
remove
();
// // ローディングアイコンを削除する
});
// loader.remove();
// });
}
}
}
}
});
});
...
@@ -390,18 +391,18 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -390,18 +391,18 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
$
(
'#newRoomName'
).
val
(
''
);
$
(
'#newRoomName'
).
val
(
''
);
$
(
'#userSelectionLength'
).
text
(
''
);
$
(
'#userSelectionLength'
).
text
(
''
);
CHAT
.
globalSelectedUserList
=
[];
CHAT
.
globalSelectedUserList
=
[];
$
(
'#bottomNav'
).
hide
();
$
(
'#backButton'
).
off
().
on
(
'click'
,
function
()
{
$
(
'#backButton'
).
off
().
on
(
'click'
,
function
()
{
//loadingIndicatorを表示
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
socket
.
emit
(
'leaveRoom'
,
function
()
{
CHAT
.
saveRoomInfo
();
CHAT
.
saveRoomInfo
();
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
socket
.
emit
(
'leaveRoom'
,
function
(
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
);
}
);
CHAT_UI
.
dismissLoadingIndicator
();
}
}
CHAT_UI
.
refreshRoomList
();
}
);
CHAT_UI
.
dismissLoadingIndicator
(
);
});
});
console
.
log
(
"show #pills-chat"
)
console
.
log
(
"show #pills-chat"
)
//loadingIndicatorを表示しない
//loadingIndicatorを表示しない
...
@@ -414,7 +415,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -414,7 +415,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
$
(
'#room-search'
).
val
(
''
);
$
(
'#room-search'
).
val
(
''
);
// set Title
// set Title
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
)
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
)
$
(
'#bottomNav'
).
show
();
$
(
'.titleRoomName'
).
text
(
roomListTitle
);
$
(
'.titleRoomName'
).
text
(
roomListTitle
);
$
(
'#newRoomName'
).
val
(
''
);
$
(
'#newRoomName'
).
val
(
''
);
$
(
'#userSelectionLength'
).
text
(
''
);
$
(
'#userSelectionLength'
).
text
(
''
);
...
@@ -430,12 +431,14 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -430,12 +431,14 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
$
(
'#my_info'
).
show
();
$
(
'#my_info'
).
show
();
$
(
'#room_list'
).
hide
();
$
(
'#room_list'
).
hide
();
$
(
'#room-search'
).
hide
();
$
(
'#room-search'
).
hide
();
$
(
'#bottomNav'
).
show
();
break
;
break
;
case
'#pills-user'
:
case
'#pills-user'
:
$
(
"#backButton"
).
show
();
$
(
"#backButton"
).
show
();
$
(
"#userSelectionDeleteBtn"
).
hide
();
$
(
"#userSelectionDeleteBtn"
).
hide
();
$
(
'#homeButton'
).
hide
();
$
(
'#homeButton'
).
hide
();
$
(
'#bottomNav'
).
hide
();
//loadingIndicatorを表示しない
//loadingIndicatorを表示しない
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
break
;
break
;
...
@@ -443,6 +446,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -443,6 +446,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
$
(
"#backButton"
).
show
();
$
(
"#backButton"
).
show
();
$
(
"#userSelectionDeleteBtn"
).
hide
();
$
(
"#userSelectionDeleteBtn"
).
hide
();
$
(
'#homeButton'
).
hide
();
$
(
'#homeButton'
).
hide
();
$
(
'#bottomNav'
).
hide
();
//loadingIndicatorを表示しない
//loadingIndicatorを表示しない
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
break
;
break
;
...
@@ -451,11 +455,13 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -451,11 +455,13 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
//loadingIndicatorを表示しない
//loadingIndicatorを表示しない
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#homeButton'
).
hide
();
$
(
'#homeButton'
).
hide
();
$
(
'#bottomNav'
).
hide
();
$
(
'.user_people'
).
css
(
"paddingLeft"
,
"0px"
);
$
(
'.user_people'
).
css
(
"paddingLeft"
,
"0px"
);
break
;
break
;
case
'#pills-communication'
:
// コミュニケーションのタブ
case
'#pills-communication'
:
// コミュニケーションのタブ
case
'#pills-setting'
:
// 設定のタブ
case
'#pills-setting'
:
// 設定のタブ
case
'#pills-profile'
:
// ユーザプロファイルのタブ
case
'#pills-profile'
:
// ユーザプロファイルのタブ
$
(
'#bottomNav'
).
hide
();
$
(
'.titleRoomName'
).
show
();
$
(
'.titleRoomName'
).
show
();
$
(
'.roomListIcon, .chatRoomIcon, #userSelectionConfirmBtn, #newRoomName, #userSelectionDeleteBtn'
).
hide
();
$
(
'.roomListIcon, .chatRoomIcon, #userSelectionConfirmBtn, #newRoomName, #userSelectionDeleteBtn'
).
hide
();
$
(
'#backButton'
).
hide
();
$
(
'#backButton'
).
hide
();
...
@@ -662,7 +668,6 @@ CHAT_UI.showConfirmView = function(isInvite) {
...
@@ -662,7 +668,6 @@ CHAT_UI.showConfirmView = function(isInvite) {
android
.
createChatRoom
(
"1"
,
userIdList
.
join
(
','
),
newRoomName
);
android
.
createChatRoom
(
"1"
,
userIdList
.
join
(
','
),
newRoomName
);
/*socket.emit('createNewRoom', userIdList, encodedRoomName, function(newRoomId) {
/*socket.emit('createNewRoom', userIdList, encodedRoomName, function(newRoomId) {
socket.emit('joinRoom', newRoomId, newRoomName, function () {
socket.emit('joinRoom', newRoomId, newRoomName, function () {
CHAT.saveRoomInfo(newRoomId, newRoomName);
CHAT.saveRoomInfo(newRoomId, newRoomName);
...
@@ -800,7 +805,7 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
...
@@ -800,7 +805,7 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
setLanguage
(
languageCode
);
setLanguage
(
languageCode
);
$
(
".titleRoomName"
).
text
(
getLocalizedString
(
"roomListTitle"
));
$
(
".titleRoomName"
).
text
(
getLocalizedString
(
"roomListTitle"
));
$
(
"#message-form"
).
attr
(
"placeholder"
,
getLocalizedString
(
"chat_placeholder"
));
$
(
"#message-form"
).
attr
(
"placeholder"
,
getLocalizedString
(
"chat_placeholder"
));
$
(
"#message-search"
).
attr
(
"placeholder"
,
$
(
"#message-search"
).
attr
(
"placeholder"
)
+
getLocalizedString
(
"chat_search_placeholder"
));
$
(
"#message-search"
).
attr
(
"placeholder"
,
getLocalizedString
(
"chat_search_placeholder"
));
$
(
"#exitRoom"
).
text
(
getLocalizedString
(
"exitRoom"
)).
append
(
"<i class='fas fa-door-open'></i>"
)
$
(
"#exitRoom"
).
text
(
getLocalizedString
(
"exitRoom"
)).
append
(
"<i class='fas fa-door-open'></i>"
)
$
(
"#participants"
).
text
(
getLocalizedString
(
"participants"
))
$
(
"#participants"
).
text
(
getLocalizedString
(
"participants"
))
...
@@ -843,53 +848,57 @@ CHAT_UI.waitForLoadingImage = function(div, callback) {
...
@@ -843,53 +848,57 @@ CHAT_UI.waitForLoadingImage = function(div, callback) {
}
}
$
(
'#contactButton'
).
on
(
'click'
,
function
(
event
){
$
(
'#contactButton'
).
on
(
'click'
,
function
(
event
){
CHAT_UI
.
refreshContactScreen
();
});
//loadingIndicatorを表示
CHAT_UI
.
refreshContactScreen
=
function
()
{
CHAT_UI
.
showLoadingIndicator
();
//loadingIndicatorを表示
$
(
'#pills-contact-tab'
).
tab
(
'show'
);
$
(
'#my_info'
).
html
(
''
);
$
(
'#favorite_list'
).
html
(
''
);
//画面タイトル設定
$
(
'#my_group_list'
).
html
(
''
);
let
contactListTitle
=
getLocalizedString
(
"contactListTitle"
);
CHAT_UI
.
showLoadingIndicator
();
$
(
'.titleRoomName'
).
text
(
contactListTitle
);
$
(
'#pills-contact-tab'
).
tab
(
'show'
);
// グループの様式を読み込む
const
groupTemplate
=
$
(
'#group-template'
).
html
();
// ユーザの様式を読み込む
const
userTemplate
=
$
(
'#user-template'
).
html
();
android
.
updateGroupInfo
();
//画面タイトル設定
android
.
updateMyInfo
();
let
contactListTitle
=
getLocalizedString
(
"contactListTitle"
);
$
(
'.titleRoomName'
).
text
(
contactListTitle
);
var
myInfo
=
CHAT
.
requestMyinfo
();
// グループの様式を読み込む
const
groupTemplate
=
$
(
'#group-template'
).
html
();
// ユーザの様式を読み込む
const
userTemplate
=
$
(
'#user-template'
).
html
();
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateGroupInfo
();
android
.
updateMyInfo
();
}
}
myInfo
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
myInfo
.
profileImagePath
)
//TODO get my Info
var
myInfo
=
CHAT_DB
.
getMyInfo
();
let
html
=
Mustache
.
render
(
userTemplate
,
{
id
:
myInfo
.
shopMemberId
,
profileImage
:
myInfo
.
profileImagePath
,
name
:
myInfo
.
shopMemberName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
console
.
log
(
myInfo
);
//TODO need onClick Action
console
.
log
(
'myInfoClick'
);
});
$
(
'#my_info'
).
append
(
obj
);
//TODO get favorite list
myInfo
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
myInfo
.
profileUrl
)
//TODO get my group user list
console
.
log
(
'LOAD DONE CONTACT SCREEN'
);
CHAT_UI
.
dismissLoadingIndicator
();
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
id
:
myInfo
.
shopMemberId
,
profileImage
:
myInfo
.
profileImagePath
,
name
:
myInfo
.
shopMemberName
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
(){
//TODO need onClick Action
console
.
log
(
'myInfoClick'
);
});
$
(
'#my_info'
).
append
(
obj
);
//TODO get favorite list
//TODO get my group user list
console
.
log
(
'LOAD DONE CONTACT SCREEN'
);
CHAT_UI
.
dismissLoadingIndicator
();
}
CHAT_UI
.
refreshRoomList
=
function
()
{
CHAT_UI
.
refreshRoomList
=
function
()
{
var
rooms
=
CHAT_DB
.
getRoomList
();
var
rooms
=
CHAT_DB
.
getRoomList
();
...
@@ -979,24 +988,22 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
...
@@ -979,24 +988,22 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
console
.
log
(
roomId
);
console
.
log
(
roomId
);
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateMessages
(
roomId
);
android
.
updateMessages
(
roomId
);
socket
.
emit
(
'joinRoom'
,
roomId
,
roomName
,
function
()
{
// socket.emit('joinRoom', roomId, roomName, function() {
});
// $('#messages').html('');
// $('.titleRoomName').text(roomName).data('roomName', roomName);
// $('#pills-chat-tab').tab('show');
// $("#message-search").attr("placeholder", $("#message-search").attr("placeholder")+getLocalizedString("chat_search_placeholder"));
// });
}
else
{
}
else
{
}
}
//var roomInfo = android.getMessages(roomId);
var
messages
=
CHAT_DB
.
getMessages
(
roomId
);
//ui.loadMessages();
console
.
log
(
messages
);
CHAT_UI
.
loadMessages
(
messages
,
roomId
,
roomName
)
};
};
CHAT_UI
.
loadMessages
=
function
(
messages
,
shopMemberId
,
users
,
roomId
,
roomName
)
{
CHAT_UI
.
loadMessages
=
function
(
messages
,
roomId
,
roomName
)
{
$
(
'#messages'
).
html
(
''
);
$
(
'#messages'
).
html
(
''
);
$
(
'.titleRoomName'
).
text
(
roomName
).
data
(
'roomName'
,
roomName
);
$
(
'.titleRoomName'
).
text
(
roomName
).
data
(
'roomName'
,
roomName
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
"#message-search"
).
attr
(
"placeholder"
,
$
(
"#message-search"
).
attr
(
"placeholder"
)
+
getLocalizedString
(
"chat_search_placeholder"
));
$
(
"#message-search"
).
attr
(
"placeholder"
,
getLocalizedString
(
"chat_search_placeholder"
));
let
jQueryMessages
=
$
(
'#messages'
);
let
jQueryMessages
=
$
(
'#messages'
);
// スクロールの変化を防ぐため以前画面の高さを保存する
// スクロールの変化を防ぐため以前画面の高さを保存する
let
beforeHeight
=
jQueryMessages
.
prop
(
'scrollHeight'
);
let
beforeHeight
=
jQueryMessages
.
prop
(
'scrollHeight'
);
...
@@ -1004,22 +1011,15 @@ CHAT_UI.loadMessages = function(messages, shopMemberId, users, roomId, roomName)
...
@@ -1004,22 +1011,15 @@ CHAT_UI.loadMessages = function(messages, shopMemberId, users, roomId, roomName)
let
workVal
=
""
;
let
workVal
=
""
;
messages
.
forEach
(
function
(
message
)
{
messages
.
forEach
(
function
(
message
)
{
let
template
=
$
(
'#message-template'
).
html
();
let
template
=
$
(
'#message-template'
).
html
();
if
(
message
.
s
hopMemberId
==
shopMemberId
)
{
if
(
message
.
s
elfFlg
==
1
)
{
template
=
$
(
'#message-template-me'
).
html
();
template
=
$
(
'#message-template-me'
).
html
();
}
}
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
time
.
tim
e
);
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
insertDat
e
);
if
(
users
!=
undefined
)
{
if
(
message
.
profileUrl
)
{
let
user
=
users
.
find
((
user
)
=>
user
.
loginId
==
message
.
loginId
)
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
message
.
profileUrl
)
// userProfilePathが使えるpathかをcheckして使えないpathの場合、default画像の経路に変更
if
(
user
)
{
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
user
.
profileImagePath
)
}
else
{
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
""
)
}
}
else
{
}
else
{
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
message
.
profileImagePath
)
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
""
)
}
}
// #36147
// #36147
...
@@ -1061,4 +1061,19 @@ CHAT_UI.loadMessages = function(messages, shopMemberId, users, roomId, roomName)
...
@@ -1061,4 +1061,19 @@ CHAT_UI.loadMessages = function(messages, shopMemberId, users, roomId, roomName)
// チャットに遷移する
// チャットに遷移する
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
};
};
\ No newline at end of file
var
coll
=
document
.
getElementsByClassName
(
"collapsible"
);
var
i
;
for
(
i
=
0
;
i
<
coll
.
length
;
i
++
)
{
coll
[
i
].
addEventListener
(
"click"
,
function
()
{
this
.
classList
.
toggle
(
"collapsible-active"
);
var
content
=
this
.
nextElementSibling
;
if
(
content
.
style
.
display
===
"block"
)
{
content
.
style
.
display
=
"none"
;
}
else
{
content
.
style
.
display
=
"block"
;
}
});
}
\ No newline at end of file
public/js/chat-websocket.js
View file @
8fc5ddaf
...
@@ -17,10 +17,11 @@ function connectSocket(isOnline) {
...
@@ -17,10 +17,11 @@ function connectSocket(isOnline) {
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOSの場合
//TODO IOSの場合
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
$
(
'.overlay'
).
removeClass
(
'active undismissable'
);
//
$('.overlay').removeClass('active undismissable');
// loadingIndicatorを表示
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
android
.
getLoginParameter
();
android
.
getLoginParameter
();
console
.
log
(
'init'
)
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#createChatRoom'
).
show
();
$
(
'#createChatRoom'
).
show
();
...
...
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