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
5ce6e415
Commit
5ce6e415
authored
Jul 14, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed for chat room socket connection url
parent
51c13e76
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
50 additions
and
54 deletions
+50
-54
public_new/js/Models/userinfo.js
+4
-4
public_new/js/sockets/chat-websocket-message.js
+0
-1
public_new/js/sockets/chat-websocket.js
+1
-1
public_new/js/views/chats/chat-room-message.js
+8
-3
public_new/js/views/chats/chat-room.js
+0
-8
public_new/js/views/chats/management/chat-management-common.js
+1
-1
public_new/js/views/collaboration/collaboration.js
+1
-1
public_new/js/views/collaboration/share.js
+8
-8
public_new/js/views/contact/contact.js
+1
-1
public_new/js/views/contact/namecard.js
+26
-26
No files found.
public_new/js/Models/userinfo.js
View file @
5ce6e415
...
...
@@ -8,15 +8,15 @@ NativeBridgeDataSource.getMyUserInfo = function () {
var
CurrentUserInfo
=
class
{
sid
;
loginI
d
;
loginI
D
;
shopName
;
shopMemberI
d
;
shopMemberI
D
;
languageCode
;
constructor
(
userInfo
)
{
this
.
sid
=
userInfo
.
sid
;
this
.
loginI
d
=
userInfo
.
loginId
;
this
.
loginI
D
=
userInfo
.
loginId
;
this
.
shopName
=
userInfo
.
shopName
;
this
.
shopMemberI
d
=
userInfo
.
shopMemberId
;
this
.
shopMemberI
D
=
userInfo
.
shopMemberId
;
if
(
userInfo
.
languageCode
==
undefined
)
{
userInfo
.
languageCode
=
"jp"
;
}
...
...
public_new/js/sockets/chat-websocket-message.js
View file @
5ce6e415
...
...
@@ -2,7 +2,6 @@ var bindOnNewMessage = function () {
// New Message
// #36170
socket
.
on
(
SOCKET_KEY
.
NEW_MESSAGE
,
function
(
message
,
roomId
,
roomName
)
{
console
.
log
(
message
);
const
systemMessageTemplate
=
getTemplate
(
TemplateURL
.
SYSTEM_MESSAGE
);
const
unwrappedMessageInfo
=
decodeMessage
(
message
.
text
);
...
...
public_new/js/sockets/chat-websocket.js
View file @
5ce6e415
...
...
@@ -215,7 +215,7 @@ CHAT_SOCKET.initialJoin = function () {
currentUserInfo
.
shopName
,
roomInfo
.
roomID
,
roomInfo
.
roomName
,
currentUserInfo
.
shopMembeID
currentUserInfo
.
shopMembe
r
ID
);
CHAT_SOCKET
.
emitJoin
(
joinInfo
,
false
,
false
);
};
public_new/js/views/chats/chat-room-message.js
View file @
5ce6e415
...
...
@@ -48,6 +48,14 @@ ChatRoom.renderMessageForSearchMessage = function (message) {
/***********************
* Send Messages
***********************/
// Input recognize
$
(
"#messageInput"
).
on
(
"keypress"
,
function
(
event
)
{
if
(
event
.
which
==
13
)
{
// Enterキーの処理
$
(
"#messageSend"
).
click
();
}
});
ChatRoom
.
sendMessage
=
function
(
e
)
{
const
messageTextBox
=
$
(
"#messageInput"
);
const
message
=
...
...
@@ -112,9 +120,6 @@ ChatRoom.configureRoomMenu = function () {
};
ChatRoom
.
appendAttendedUsers
=
function
(
roomID
)
{
console
.
log
(
"peacekim:: ChatRoom.appendAttendedUsers start with RoomID: "
+
roomID
);
const
topUserListTemplate
=
getTemplate
(
TemplateURL
.
CHATROOM_USER_LIST
);
const
filterUserListTemplate
=
getTemplate
(
TemplateURL
.
CHATROOM_USER_FILTER_LIST
...
...
public_new/js/views/chats/chat-room.js
View file @
5ce6e415
...
...
@@ -117,14 +117,6 @@ $(window).on("scroll", function () {
startPos
=
winScrollTop
;
});
//メッセージ送信
$
(
"#messageInput"
).
on
(
"keypress"
,
function
(
event
)
{
if
(
event
.
which
==
13
)
{
// Enterキーの処理
$
(
"#messageSend"
).
click
();
}
});
//上にスクロールすると新しいメッセージを呼ぶ処理。
$
(
"#messages"
).
scroll
(
function
()
{
if
(
$
(
this
).
scrollTop
()
===
0
)
{
...
...
public_new/js/views/chats/management/chat-management-common.js
View file @
5ce6e415
...
...
@@ -38,7 +38,7 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
// 参加ユーザ名でルーム名を生成
let
newRoomName
=
currentUserInfo
.
loginI
d
+
","
+
userNameList
.
join
(
","
);
currentUserInfo
.
loginI
D
+
","
+
userNameList
.
join
(
","
);
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userIdList
.
join
(
","
),
...
...
public_new/js/views/collaboration/collaboration.js
View file @
5ce6e415
...
...
@@ -340,7 +340,7 @@ CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (
};
Namecard
.
makeNameCardInCollaboration
=
function
(
shopMemberId
)
{
if
(
currentUserInfo
.
shopMemberI
d
==
shopMemberId
)
{
if
(
currentUserInfo
.
shopMemberI
D
==
shopMemberId
)
{
return
;
}
var
nameCardInfo
=
NativeBridgeDataSource
.
getNameCardData
(
shopMemberId
);
...
...
public_new/js/views/collaboration/share.js
View file @
5ce6e415
...
...
@@ -196,7 +196,7 @@ document.addEventListener("DOMContentLoaded", function () {
fw
.
sendToMsg
(
"others"
,
"HOST_CHANGE_RESPONSE"
,
{
isAndroid
:
deviceInfo
.
isAndroid
(),
isAble
:
androidVersion
>=
ANDROID_SDK_VERSION
.
O
,
loginId
:
currentUserInfo
.
loginI
d
,
loginId
:
currentUserInfo
.
loginI
D
,
});
}
}
else
if
(
data
.
type
===
"HOST_CHANGE_RESPONSE"
)
{
...
...
@@ -279,7 +279,7 @@ document.addEventListener("DOMContentLoaded", function () {
}
else
if
(
data
.
type
===
"HOST_REQUEST_DONE"
)
{
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
}
else
if
(
data
.
type
===
"HOST_REQUEST_REJECT"
)
{
if
(
data
.
payload
.
hostId
==
currentUserInfo
.
loginI
d
)
{
if
(
data
.
payload
.
hostId
==
currentUserInfo
.
loginI
D
)
{
alert
(
"REJECT for owner user"
);
}
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
...
...
@@ -722,7 +722,7 @@ function applyForHostChange() {
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
fw
.
sendToMsg
(
"others"
,
"CHANGE_HOST_APPLY"
,
{
hostId
:
currentUserInfo
.
loginI
d
,
hostId
:
currentUserInfo
.
loginI
D
,
});
}
...
...
@@ -739,7 +739,7 @@ function hostSearchInterval() {
let
hostName
=
""
;
function
hostSearch
()
{
if
(
g_isMainMan
)
{
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
d
).
addClass
(
"host"
);
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
D
).
addClass
(
"host"
);
$
(
".host_contents"
).
removeClass
(
"none"
);
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
$
(
".photo_select_button"
).
removeClass
(
"none"
);
...
...
@@ -750,7 +750,7 @@ function hostSearchInterval() {
}
if
(
deviceInfo
.
isiOS
())
isIos
=
true
;
}
else
{
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
d
).
removeClass
(
"host"
);
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
D
).
removeClass
(
"host"
);
$
(
".host_contents"
).
addClass
(
"none"
);
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
$
(
".photo_select_button"
).
addClass
(
"none"
);
...
...
@@ -773,12 +773,12 @@ function hostSearchInterval() {
}
else
{
if
(
hostName
==
""
)
{
if
(
!
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
d
).
hasClass
(
!
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
D
).
hasClass
(
"host"
)
&&
coview_api
.
getRoomUsers
()
)
{
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
d
).
addClass
(
"host"
);
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginI
D
).
addClass
(
"host"
);
}
}
else
{
if
(
...
...
@@ -1084,6 +1084,6 @@ function toggleCapture() {
function
toggleCaptureRequest
()
{
fw
.
sendToMsg
(
"others"
,
"CAPTURE_REQUEST"
,
{
name
:
currentUserInfo
.
loginI
d
,
name
:
currentUserInfo
.
loginI
D
,
});
}
public_new/js/views/contact/contact.js
View file @
5ce6e415
...
...
@@ -103,7 +103,7 @@ Contact.renderGroupList = function (url, groupName, groupID, isFavorite) {
});
};
Contact
.
ppendUserList
=
function
(
userList
)
{
Contact
.
a
ppendUserList
=
function
(
userList
)
{
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
});
...
...
public_new/js/views/contact/namecard.js
View file @
5ce6e415
var
Namecard
=
{};
Namecard
.
makeNameCard
=
function
(
shopMemberI
d
)
{
if
(
currentUserInfo
.
shopMemberI
d
==
shopMemberId
)
{
Namecard
.
makeNameCard
=
function
(
shopMemberI
D
)
{
if
(
currentUserInfo
.
shopMemberI
D
==
shopMemberID
)
{
return
;
}
const
nameCardInfo
=
NativeBridgeDataSource
.
getNameCardData
(
shopMemberI
d
);
const
nameCardInfo
=
NativeBridgeDataSource
.
getNameCardData
(
shopMemberI
D
);
const
namecardTemplate
=
getTemplate
(
TemplateURL
.
USER_NAME_CARD
);
nameCardInfo
.
profileUrl
=
Common
.
getProfileImgUrl
(
nameCardInfo
.
profileUrl
);
...
...
@@ -29,16 +29,16 @@ Namecard.makeNameCard = function (shopMemberId) {
};
// template_user_name_card.html
Namecard
.
startChat
=
function
(
userShopMemberI
d
,
userName
)
{
Namecard
.
startChat
=
function
(
userShopMemberI
D
,
userName
)
{
Common
.
showLoadingIndicator
();
var
userI
d
List
=
[];
userI
dList
.
push
(
userShopMemberId
);
var
userI
D
List
=
[];
userI
DList
.
push
(
userShopMemberID
);
// 参加ユーザ名でルーム名を生成
let
newRoomName
=
currentUserInfo
.
loginI
d
+
","
+
userName
;
let
newRoomName
=
currentUserInfo
.
loginI
D
+
","
+
userName
;
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userI
d
List
.
join
(
","
),
userI
D
List
.
join
(
","
),
newRoomName
,
MakeRoomFlag
.
NAME_CARD
,
false
...
...
@@ -46,13 +46,13 @@ Namecard.startChat = function (userShopMemberId, userName) {
};
// template_user_name_card.html
Namecard
.
startVoice
=
function
(
userShopMemberI
d
,
userName
)
{
Namecard
.
startVoice
=
function
(
userShopMemberI
D
,
userName
)
{
Common
.
showLoadingIndicator
();
let
userIDList
=
[];
userIDList
.
push
(
userShopMemberI
d
);
userIDList
.
push
(
userShopMemberI
D
);
// 参加ユーザ名でルーム名を生成
let
newRoomName
=
currentUserInfo
.
loginI
d
+
","
+
userName
;
let
newRoomName
=
currentUserInfo
.
loginI
D
+
","
+
userName
;
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userIDList
.
join
(
","
),
...
...
@@ -66,44 +66,44 @@ Namecard.startVoice = function (userShopMemberId, userName) {
// >> chat-room.js
// >> contact.js
// template_user_list.html
Namecard
.
favoriteUserChange
=
function
(
shopMemberI
d
,
star
)
{
Namecard
.
favoriteUserChange
=
function
(
shopMemberI
D
,
star
)
{
if
(
$
(
star
).
hasClass
(
"active"
))
{
Namecard
.
removeFavoriteUser
(
shopMemberI
d
);
Namecard
.
removeFavoriteUser
(
shopMemberI
D
);
}
else
if
(
$
(
star
).
hasClass
(
"disable"
))
{
Namecard
.
insertFavoriteUser
(
shopMemberI
d
);
Namecard
.
insertFavoriteUser
(
shopMemberI
D
);
}
};
// modal_collabo_profile.html
// collaboration.js
// template_user_name_card.html
Namecard
.
removeFavoriteUser
=
function
(
shopMemberI
d
)
{
Namecard
.
removeFavoriteUser
=
function
(
shopMemberI
D
)
{
Common
.
showLoadingIndicator
();
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
const
result
=
NativeBridgeDataSource
.
removeFavoriteUser
(
shopMemberI
d
);
const
result
=
NativeBridgeDataSource
.
removeFavoriteUser
(
shopMemberI
D
);
if
(
result
)
{
$
(
".shopmember_"
+
shopMemberI
d
).
removeClass
(
"active"
);
$
(
".shopmember_"
+
shopMemberI
d
).
addClass
(
"disable"
);
$
(
".shopmember_"
+
shopMemberI
D
).
removeClass
(
"active"
);
$
(
".shopmember_"
+
shopMemberI
D
).
addClass
(
"disable"
);
}
else
{
$
(
".shopmember_"
+
shopMemberI
d
).
addClass
(
"active"
);
$
(
".shopmember_"
+
shopMemberI
d
).
removeClass
(
"disable"
);
$
(
".shopmember_"
+
shopMemberI
D
).
addClass
(
"active"
);
$
(
".shopmember_"
+
shopMemberI
D
).
removeClass
(
"disable"
);
}
Common
.
dismissLoadingIndicator
();
};
// template_user_name_card.html (USER_NAME_CARD)
// >> Namecard.makeNameCard()
Namecard
.
insertFavoriteUser
=
function
(
shopMemberI
d
)
{
Namecard
.
insertFavoriteUser
=
function
(
shopMemberI
D
)
{
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
const
result
=
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberI
d
);
const
result
=
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberI
D
);
if
(
result
)
{
$
(
".shopmember_"
+
shopMemberI
d
).
removeClass
(
"disable"
);
$
(
".shopmember_"
+
shopMemberI
d
).
addClass
(
"active"
);
$
(
".shopmember_"
+
shopMemberI
D
).
removeClass
(
"disable"
);
$
(
".shopmember_"
+
shopMemberI
D
).
addClass
(
"active"
);
}
else
{
$
(
".shopmember_"
+
shopMemberI
d
).
addClass
(
"disable"
);
$
(
".shopmember_"
+
shopMemberI
d
).
removeClass
(
"active"
);
$
(
".shopmember_"
+
shopMemberI
D
).
addClass
(
"disable"
);
$
(
".shopmember_"
+
shopMemberI
D
).
removeClass
(
"active"
);
}
Common
.
dismissLoadingIndicator
();
};
...
...
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