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
d05043cb
Commit
d05043cb
authored
3 years ago
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added console logs
parent
22eccd64
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
501 additions
and
16 deletions
+501
-16
public_new/collaboration.html
+1
-0
public_new/js/common/common.js
+11
-1
public_new/js/common/native-bridge-delegate.js
+44
-0
public_new/js/libs/moment.js
+4
-4
public_new/js/sockets/chat-websocket-message.js
+50
-0
public_new/js/sockets/chat-websocket.js
+16
-0
public_new/js/views/chats/chat-room-message.js
+41
-4
public_new/js/views/chats/chat-room-search.js
+26
-0
public_new/js/views/chats/chat-room.js
+8
-1
public_new/js/views/chats/management/chat-management-common.js
+16
-0
public_new/js/views/collaboration/collaboration-add-user.js
+25
-0
public_new/js/views/collaboration/collaboration.js
+25
-0
public_new/js/views/collaboration/fermi-web-socket-bridge.js
+42
-4
public_new/js/views/collaboration/fermi-web-socket-message-handler.js
+78
-0
public_new/js/views/collaboration/share-bind-button-action.js
+18
-0
public_new/js/views/collaboration/share-event-listener.js
+78
-2
public_new/js/views/collaboration/share.js
+6
-0
public_new/js/views/contact/namecard.js
+12
-0
No files found.
public_new/collaboration.html
View file @
d05043cb
...
@@ -161,6 +161,7 @@
...
@@ -161,6 +161,7 @@
<script
src=
"./js/views/contact/namecard.js"
></script>
<script
src=
"./js/views/contact/namecard.js"
></script>
<script>
<script>
console
.
log
(
"peacekim:: start collaobrtion html script"
);
$
(
"#footer_collabo"
).
load
(
"./footer_collabo.html"
);
$
(
"#footer_collabo"
).
load
(
"./footer_collabo.html"
);
$
(
"#modal_collabo_host_request"
).
load
(
"./modal_collabo_host_request.html"
);
$
(
"#modal_collabo_host_request"
).
load
(
"./modal_collabo_host_request.html"
);
$
(
"#modal_collabo_change_host"
).
load
(
"./modal_collabo_change_host.html"
);
$
(
"#modal_collabo_change_host"
).
load
(
"./modal_collabo_change_host.html"
);
...
...
This diff is collapsed.
Click to expand it.
public_new/js/common/common.js
View file @
d05043cb
...
@@ -39,6 +39,8 @@ $(".home_btn").on("click", function () {
...
@@ -39,6 +39,8 @@ $(".home_btn").on("click", function () {
});
});
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
console
.
log
(
"peacekim:: DOMContentLoaded on common.js"
);
// ローディング表示
// ローディング表示
$
(
"footer a"
).
click
(
function
(
event
)
{
$
(
"footer a"
).
click
(
function
(
event
)
{
const
a
=
$
(
this
);
const
a
=
$
(
this
);
...
@@ -73,7 +75,7 @@ document.addEventListener("DOMContentLoaded", function () {
...
@@ -73,7 +75,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
});
document
.
addEventListener
(
"readystatechange"
,
()
=>
{
document
.
addEventListener
(
"readystatechange"
,
()
=>
{
console
.
log
(
"peacekim:: document.readyState: "
+
document
.
readyState
);
switch
(
document
.
readyState
)
{
switch
(
document
.
readyState
)
{
case
"interactive"
:
case
"interactive"
:
break
;
break
;
...
@@ -90,16 +92,19 @@ var Common = {};
...
@@ -90,16 +92,19 @@ var Common = {};
//loadingIndicatorを表示
//loadingIndicatorを表示
Common
.
showLoadingIndicator
=
function
()
{
Common
.
showLoadingIndicator
=
function
()
{
console
.
log
(
"peacekim:: Common.showLoadingIndicator"
);
NativeBridgeDelegate
.
showLoadingIndicator
();
NativeBridgeDelegate
.
showLoadingIndicator
();
};
};
//loadingIndicatorを表示しない
//loadingIndicatorを表示しない
Common
.
dismissLoadingIndicator
=
function
()
{
Common
.
dismissLoadingIndicator
=
function
()
{
console
.
log
(
"peacekim:: Common.dismissLoadingIndicator"
);
NativeBridgeDelegate
.
hideLoadingIndicator
();
NativeBridgeDelegate
.
hideLoadingIndicator
();
};
};
Common
.
refreshForOnline
=
function
()
{
Common
.
refreshForOnline
=
function
()
{
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
console
.
log
(
"peacekim:: Common.refreshForOnline"
);
serverInfo
.
isOnline
=
true
;
serverInfo
.
isOnline
=
true
;
$
(
".footer_item a"
).
removeClass
(
"ui-state-disabled"
);
$
(
".footer_item a"
).
removeClass
(
"ui-state-disabled"
);
if
(
typeof
ChatList
!=
"undefined"
)
{
if
(
typeof
ChatList
!=
"undefined"
)
{
...
@@ -114,6 +119,7 @@ Common.refreshForOnline = function () {
...
@@ -114,6 +119,7 @@ Common.refreshForOnline = function () {
};
};
Common
.
refreshForOffline
=
function
()
{
Common
.
refreshForOffline
=
function
()
{
console
.
log
(
"peacekim:: Common.refreshForOffline"
);
serverInfo
.
isOnline
=
false
;
serverInfo
.
isOnline
=
false
;
$
(
".footer_item a"
).
addClass
(
"ui-state-disabled"
);
$
(
".footer_item a"
).
addClass
(
"ui-state-disabled"
);
if
(
typeof
ChatList
!=
"undefined"
)
{
if
(
typeof
ChatList
!=
"undefined"
)
{
...
@@ -133,6 +139,7 @@ Common.refreshForOffline = function () {
...
@@ -133,6 +139,7 @@ Common.refreshForOffline = function () {
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
// 存在する場合はプロフィール画像取得用APIのURLを生成して返す
// 存在する場合はプロフィール画像取得用APIのURLを生成して返す
Common
.
getProfileImgUrl
=
function
(
path
)
{
Common
.
getProfileImgUrl
=
function
(
path
)
{
console
.
log
(
"peacekim:: Common.getProfileImgUrl"
);
if
(
path
==
undefined
||
path
==
""
)
{
if
(
path
==
undefined
||
path
==
""
)
{
return
"./img/noImage.png"
;
return
"./img/noImage.png"
;
}
else
if
(
path
.
includes
(
"/mnt"
))
{
}
else
if
(
path
.
includes
(
"/mnt"
))
{
...
@@ -153,6 +160,9 @@ Common.getProfileImgUrl = function (path) {
...
@@ -153,6 +160,9 @@ Common.getProfileImgUrl = function (path) {
};
};
Common
.
startCollaboration
=
function
(
collaborationType
)
{
Common
.
startCollaboration
=
function
(
collaborationType
)
{
console
.
log
(
"peacekim:: Common.startCollaboration type: "
+
collaborationType
);
if
(
deviceInfo
.
isAndroid
())
{
if
(
deviceInfo
.
isAndroid
())
{
if
(
if
(
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
...
...
This diff is collapsed.
Click to expand it.
public_new/js/common/native-bridge-delegate.js
View file @
d05043cb
This diff is collapsed.
Click to expand it.
public_new/js/libs/moment.js
View file @
d05043cb
...
@@ -288,10 +288,10 @@
...
@@ -288,10 +288,10 @@
}
}
function
warn
(
msg
)
{
function
warn
(
msg
)
{
if
(
hooks
.
suppressDeprecationWarnings
===
false
&&
//
if (hooks.suppressDeprecationWarnings === false &&
(
typeof
console
!==
'undefined'
)
&&
console
.
warn
)
{
//
(typeof console !== 'undefined') && console.warn) {
console
.
warn
(
'Deprecation warning: '
+
msg
);
//
console.warn('Deprecation warning: ' + msg);
}
//
}
}
}
function
deprecate
(
msg
,
fn
)
{
function
deprecate
(
msg
,
fn
)
{
...
...
This diff is collapsed.
Click to expand it.
public_new/js/sockets/chat-websocket-message.js
View file @
d05043cb
...
@@ -2,6 +2,14 @@ CHAT_SOCKET.bindOnNewMessage = function () {
...
@@ -2,6 +2,14 @@ CHAT_SOCKET.bindOnNewMessage = function () {
// New Message
// New Message
// #36170
// #36170
socket
.
on
(
SOCKET_KEY
.
NEW_MESSAGE
,
function
(
message
,
roomID
,
roomName
)
{
socket
.
on
(
SOCKET_KEY
.
NEW_MESSAGE
,
function
(
message
,
roomID
,
roomName
)
{
console
.
log
(
"peacekim:: on SOCKET_KEY.NEW_MESSAGE message: "
+
message
+
", roomID: "
+
roomID
+
", roomName: "
+
roomName
);
const
systemMessageTemplate
=
getTemplate
(
TemplateURL
.
SYSTEM_MESSAGE
);
const
systemMessageTemplate
=
getTemplate
(
TemplateURL
.
SYSTEM_MESSAGE
);
const
unwrappedMessageInfo
=
CHAT_SOCKET
.
decodeMessage
(
message
.
text
);
const
unwrappedMessageInfo
=
CHAT_SOCKET
.
decodeMessage
(
message
.
text
);
...
@@ -60,6 +68,18 @@ CHAT_SOCKET.addCollaborationMessage = function (
...
@@ -60,6 +68,18 @@ CHAT_SOCKET.addCollaborationMessage = function (
insertDate
,
insertDate
,
createdAt
createdAt
)
{
)
{
console
.
log
(
"peacekim:: CHAT_SOCKET.addCollaborationMessage messageInfo: "
+
messageInfo
+
", userId: "
+
userID
+
", roomName: "
+
roomName
+
", insertDate: "
+
insertDate
+
", createdAt: "
+
createdAt
);
const
collaborationType
=
CHAT_UTIL
.
getCollaborationType
(
messageInfo
[
2
]);
const
collaborationType
=
CHAT_UTIL
.
getCollaborationType
(
messageInfo
[
2
]);
const
meetingID
=
CHAT_SOCKET
.
getMeetingID
(
collaborationType
,
messageInfo
);
const
meetingID
=
CHAT_SOCKET
.
getMeetingID
(
collaborationType
,
messageInfo
);
const
userInCollaboration
=
JSON
.
parse
(
const
userInCollaboration
=
JSON
.
parse
(
...
@@ -88,6 +108,12 @@ CHAT_SOCKET.addCollaborationMessage = function (
...
@@ -88,6 +108,12 @@ CHAT_SOCKET.addCollaborationMessage = function (
};
};
CHAT_SOCKET
.
getMeetingID
=
function
(
collaborationType
,
messageInfo
)
{
CHAT_SOCKET
.
getMeetingID
=
function
(
collaborationType
,
messageInfo
)
{
console
.
log
(
"peacekim:: CHAT_SOCKET.getMeetingID collaborationType: "
+
collaborationType
+
", messageInfo: "
+
messageInfo
);
if
(
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
return
messageInfo
[
3
];
return
messageInfo
[
3
];
}
else
{
}
else
{
...
@@ -104,6 +130,20 @@ CHAT_SOCKET.renderCollaborationMessage = function (
...
@@ -104,6 +130,20 @@ CHAT_SOCKET.renderCollaborationMessage = function (
meetingID
,
meetingID
,
createdAt
createdAt
)
{
)
{
console
.
log
(
"peacekim:: CHAT_SOCKET.renderCollaborationMessage roomName: "
+
roomName
+
", userList: "
+
userList
+
", insertDate: "
+
insertDate
+
", collaborationType: "
+
collaborationType
+
", meetingID: "
+
meetingID
+
", createdAt: "
+
createdAt
);
let
messageTime
=
CHAT_UTIL
.
formatDate
(
createdAt
);
let
messageTime
=
CHAT_UTIL
.
formatDate
(
createdAt
);
return
Mustache
.
render
(
template
,
{
return
Mustache
.
render
(
template
,
{
roomName
:
roomName
,
roomName
:
roomName
,
...
@@ -121,6 +161,14 @@ CHAT_SOCKET.renderCollaborationMessage = function (
...
@@ -121,6 +161,14 @@ CHAT_SOCKET.renderCollaborationMessage = function (
};
};
CHAT_SOCKET
.
addTextMessage
=
function
(
messageText
,
message
,
socketID
)
{
CHAT_SOCKET
.
addTextMessage
=
function
(
messageText
,
message
,
socketID
)
{
console
.
log
(
"peacekim:: CHAT_SOCKET.addTextMessage messageText: "
+
messageText
+
", message: "
+
message
+
", socketID: "
+
socketID
);
const
messageTextWithSID
=
CHAT_SOCKET
.
insertSID
(
messageText
);
const
messageTextWithSID
=
CHAT_SOCKET
.
insertSID
(
messageText
);
const
messageSender
=
JSON
.
parse
(
const
messageSender
=
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
message
.
userId
)
NativeBridgeDataSource
.
getUserInfoList
(
message
.
userId
)
...
@@ -174,6 +222,7 @@ CHAT_SOCKET.getUserInfoList = function (userID) {
...
@@ -174,6 +222,7 @@ CHAT_SOCKET.getUserInfoList = function (userID) {
};
};
CHAT_SOCKET
.
cleanUpCollaborationMessage
=
function
()
{
CHAT_SOCKET
.
cleanUpCollaborationMessage
=
function
()
{
console
.
log
(
"peacekim:: CHAT_SOCKET.cleanUpCollaborationMessage"
);
$
(
".collabo_area.start"
).
each
(
function
(
index
,
collaborationMessage
)
{
$
(
".collabo_area.start"
).
each
(
function
(
index
,
collaborationMessage
)
{
$
(
collaborationMessage
).
removeClass
(
"start"
);
$
(
collaborationMessage
).
removeClass
(
"start"
);
$
(
collaborationMessage
).
addClass
(
"end"
);
$
(
collaborationMessage
).
addClass
(
"end"
);
...
@@ -188,6 +237,7 @@ CHAT_SOCKET.cleanUpCollaborationMessage = function () {
...
@@ -188,6 +237,7 @@ CHAT_SOCKET.cleanUpCollaborationMessage = function () {
};
};
CHAT_SOCKET
.
insertSID
=
function
(
text
)
{
CHAT_SOCKET
.
insertSID
=
function
(
text
)
{
console
.
log
(
"peacekim:: CHAT_SOCKET.insertSID text: "
+
text
);
let
replacePath
=
text
;
let
replacePath
=
text
;
replacePath
=
replacePath
.
replaceAll
(
replacePath
=
replacePath
.
replaceAll
(
"?fileName="
,
"?fileName="
,
...
...
This diff is collapsed.
Click to expand it.
public_new/js/sockets/chat-websocket.js
View file @
d05043cb
...
@@ -10,6 +10,7 @@ CHAT_SOCKET.socketCheck = function () {
...
@@ -10,6 +10,7 @@ CHAT_SOCKET.socketCheck = function () {
};
};
CHAT_SOCKET
.
connectSocket
=
function
()
{
CHAT_SOCKET
.
connectSocket
=
function
()
{
console
.
log
(
"peacekim:: CHAT_SOCKET.connectSocket"
);
if
(
serverInfo
.
isOnline
==
true
)
{
if
(
serverInfo
.
isOnline
==
true
)
{
socket
=
io
(
serverInfo
.
chatURL
);
socket
=
io
(
serverInfo
.
chatURL
);
setSocketAction
();
setSocketAction
();
...
@@ -47,6 +48,7 @@ function setSocketAction() {
...
@@ -47,6 +48,7 @@ function setSocketAction() {
var
bindOnConnect
=
function
()
{
var
bindOnConnect
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
CONNECT
,
function
()
{
socket
.
on
(
SOCKET_KEY
.
CONNECT
,
function
()
{
console
.
log
(
"peacekim:: on SOCKET_KEY.CONNECT"
);
// socketが接続されたらチャット画面で画面を更新する
// socketが接続されたらチャット画面で画面を更新する
$
(
".overlay"
).
removeClass
(
"active undismissable"
);
$
(
".overlay"
).
removeClass
(
"active undismissable"
);
});
});
...
@@ -54,6 +56,7 @@ var bindOnConnect = function () {
...
@@ -54,6 +56,7 @@ var bindOnConnect = function () {
var
bindOnDisconnect
=
function
()
{
var
bindOnDisconnect
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
DISCONNECT
,
function
()
{
socket
.
on
(
SOCKET_KEY
.
DISCONNECT
,
function
()
{
console
.
log
(
"peacekim:: on SOCKET_KEY.DISCONNECT"
);
//socketが切断されたら黒画面で画面を更新する
//socketが切断されたら黒画面で画面を更新する
$
(
".overlay"
).
addClass
(
"active undismissable"
);
$
(
".overlay"
).
addClass
(
"active undismissable"
);
Common
.
dismissLoadingIndicator
();
Common
.
dismissLoadingIndicator
();
...
@@ -62,6 +65,7 @@ var bindOnDisconnect = function () {
...
@@ -62,6 +65,7 @@ var bindOnDisconnect = function () {
var
bindOnConnectError
=
function
()
{
var
bindOnConnectError
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
CONNECT_ERROR
,
function
()
{
socket
.
on
(
SOCKET_KEY
.
CONNECT_ERROR
,
function
()
{
console
.
log
(
"peacekim:: on SOCKET_KEY.CONNECT_ERROR"
);
Common
.
dismissLoadingIndicator
();
Common
.
dismissLoadingIndicator
();
});
});
};
};
...
@@ -69,6 +73,7 @@ var bindOnConnectError = function () {
...
@@ -69,6 +73,7 @@ var bindOnConnectError = function () {
var
bindOnNewNotification
=
function
()
{
var
bindOnNewNotification
=
function
()
{
// Notification
// Notification
socket
.
on
(
SOCKET_KEY
.
NEW_NOTIFICATION
,
function
(
keyword
,
event
)
{
socket
.
on
(
SOCKET_KEY
.
NEW_NOTIFICATION
,
function
(
keyword
,
event
)
{
console
.
log
(
"peacekim:: on SOCKET_KEY.NEW_NOTIFICATION"
);
const
notificationString
=
getLocalizedString
(
event
,
keyword
);
const
notificationString
=
getLocalizedString
(
event
,
keyword
);
$
(
"#messageNotification"
)
$
(
"#messageNotification"
)
.
finish
()
.
finish
()
...
@@ -83,6 +88,12 @@ var bindOnNewNotification = function () {
...
@@ -83,6 +88,12 @@ var bindOnNewNotification = function () {
var
bindOnRefreshGroupList
=
function
()
{
var
bindOnRefreshGroupList
=
function
()
{
// Update Group List(Invite)
// Update Group List(Invite)
socket
.
on
(
SOCKET_KEY
.
REFRESH_GROUPLIST
,
function
(
groups
,
isInvite
)
{
socket
.
on
(
SOCKET_KEY
.
REFRESH_GROUPLIST
,
function
(
groups
,
isInvite
)
{
console
.
log
(
"peacekim:: on SOCKET_KEY.REFRESH_GROUPLIST isInvite: "
+
isInvite
+
", groups: "
+
groups
);
const
groupListElement
=
$
(
"#group_list"
);
const
groupListElement
=
$
(
"#group_list"
);
groupListElement
.
html
(
""
);
groupListElement
.
html
(
""
);
...
@@ -100,6 +111,7 @@ var bindOnRefreshGroupList = function () {
...
@@ -100,6 +111,7 @@ var bindOnRefreshGroupList = function () {
var
bindOnShowServerError
=
function
()
{
var
bindOnShowServerError
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
SHOW_SERVER_ERROR
,
function
(
message
)
{
socket
.
on
(
SOCKET_KEY
.
SHOW_SERVER_ERROR
,
function
(
message
)
{
console
.
log
(
"peacekim:: on SOCKET_KEY.SHOW_SERVER_ERROR, message: "
+
message
);
// #36215
// #36215
if
(
message
.
includes
(
"SC_FORBIDDEN"
))
{
if
(
message
.
includes
(
"SC_FORBIDDEN"
))
{
alert
(
"SC_FORBIDDEN"
);
alert
(
"SC_FORBIDDEN"
);
...
@@ -131,6 +143,7 @@ var bindOnShowServerError = function () {
...
@@ -131,6 +143,7 @@ var bindOnShowServerError = function () {
var
bindOnRetryJoinProcess
=
function
()
{
var
bindOnRetryJoinProcess
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
RETRY_JOIN_PROCESS
,
function
()
{
socket
.
on
(
SOCKET_KEY
.
RETRY_JOIN_PROCESS
,
function
()
{
console
.
log
(
"peacekim:: on SOCKET_KEY.RETRY_JOIN_PROCESS"
);
currentUserInfo
.
configureLanguage
();
currentUserInfo
.
configureLanguage
();
// webでのsocket connect
// webでのsocket connect
CHAT_SOCKET
.
emitJoin
(
params
,
true
,
true
);
CHAT_SOCKET
.
emitJoin
(
params
,
true
,
true
);
...
@@ -143,6 +156,7 @@ CHAT_SOCKET.emitJoin = function (
...
@@ -143,6 +156,7 @@ CHAT_SOCKET.emitJoin = function (
needsHandlingError
needsHandlingError
)
{
)
{
socket
.
emit
(
SOCKET_KEY
.
JOIN
,
joinInfo
,
function
(
err
)
{
socket
.
emit
(
SOCKET_KEY
.
JOIN
,
joinInfo
,
function
(
err
)
{
console
.
log
(
"peacekim:: emit SOCKET_KEY.JOIN"
);
if
(
err
)
{
if
(
err
)
{
if
(
needsHandlingError
)
{
if
(
needsHandlingError
)
{
errorHandlingForEmitJoin
();
errorHandlingForEmitJoin
();
...
@@ -180,6 +194,7 @@ var bindOnRefreshUserListInGroup = function () {
...
@@ -180,6 +194,7 @@ var bindOnRefreshUserListInGroup = function () {
socket
.
on
(
socket
.
on
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
,
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
,
function
(
users
,
groupId
,
isInvite
)
{
function
(
users
,
groupId
,
isInvite
)
{
console
.
log
(
"peacekim:: on SOCKET_KEY.REFRESH_USERLIST_INGROUP"
);
console
.
debug
(
console
.
debug
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
+
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
+
"message received but it does nothing."
"message received but it does nothing."
...
@@ -214,6 +229,7 @@ CHAT_SOCKET.saveRoomInfo = function (roomID, roomName) {
...
@@ -214,6 +229,7 @@ CHAT_SOCKET.saveRoomInfo = function (roomID, roomName) {
};
};
CHAT_SOCKET
.
initialJoin
=
function
()
{
CHAT_SOCKET
.
initialJoin
=
function
()
{
console
.
log
(
"peacekim:: CHAT_SOCKET.initialJoin"
);
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
const
joinInfo
=
new
JoinInfo
(
const
joinInfo
=
new
JoinInfo
(
currentUserInfo
.
sid
,
currentUserInfo
.
sid
,
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/chats/chat-room-message.js
View file @
d05043cb
...
@@ -8,6 +8,7 @@ const collaborationMessageTemplate = getTemplate(
...
@@ -8,6 +8,7 @@ const collaborationMessageTemplate = getTemplate(
* Search Messages
* Search Messages
***********************/
***********************/
ChatRoom
.
appendSearchMessages
=
function
(
messages
,
unwrappedWorkVal
=
""
)
{
ChatRoom
.
appendSearchMessages
=
function
(
messages
,
unwrappedWorkVal
=
""
)
{
console
.
log
(
"peacekim:: ChatRoom.appendSearchMessages mesage: "
+
messages
);
let
workVal
=
unwrappedWorkVal
;
let
workVal
=
unwrappedWorkVal
;
messages
.
forEach
(
function
(
message
)
{
messages
.
forEach
(
function
(
message
)
{
let
html
=
ChatRoom
.
renderMessageForSearchMessage
(
message
);
let
html
=
ChatRoom
.
renderMessageForSearchMessage
(
message
);
...
@@ -17,6 +18,9 @@ ChatRoom.appendSearchMessages = function (messages, unwrappedWorkVal = "") {
...
@@ -17,6 +18,9 @@ ChatRoom.appendSearchMessages = function (messages, unwrappedWorkVal = "") {
};
};
ChatRoom
.
renderMessageForSearchMessage
=
function
(
message
)
{
ChatRoom
.
renderMessageForSearchMessage
=
function
(
message
)
{
console
.
log
(
"peacekim:: ChatRoom.renderMessageForSearchMessage mesage: "
+
messages
);
let
template
=
ChatRoom
.
getChatMessageTemplate
(
let
template
=
ChatRoom
.
getChatMessageTemplate
(
message
.
messageType
,
message
.
messageType
,
message
.
shopMemberId
message
.
shopMemberId
...
@@ -50,6 +54,7 @@ ChatRoom.renderMessageForSearchMessage = function (message) {
...
@@ -50,6 +54,7 @@ ChatRoom.renderMessageForSearchMessage = function (message) {
***********************/
***********************/
// Input recognize
// Input recognize
$
(
"#messageInput"
).
on
(
"keypress"
,
function
(
event
)
{
$
(
"#messageInput"
).
on
(
"keypress"
,
function
(
event
)
{
console
.
log
(
"peacekim:: ChatRoom - messageInput keypressed"
);
if
(
event
.
which
==
13
)
{
if
(
event
.
which
==
13
)
{
// Enterキーの処理
// Enterキーの処理
$
(
"#messageSend"
).
click
();
$
(
"#messageSend"
).
click
();
...
@@ -57,6 +62,7 @@ $("#messageInput").on("keypress", function (event) {
...
@@ -57,6 +62,7 @@ $("#messageInput").on("keypress", function (event) {
});
});
ChatRoom
.
sendMessage
=
function
(
e
)
{
ChatRoom
.
sendMessage
=
function
(
e
)
{
console
.
log
(
"peacekim:: ChatRoom - sendMessage"
);
const
messageTextBox
=
$
(
"#messageInput"
);
const
messageTextBox
=
$
(
"#messageInput"
);
const
message
=
const
message
=
messageTextBox
.
val
().
length
>
0
messageTextBox
.
val
().
length
>
0
...
@@ -75,6 +81,12 @@ ChatRoom.sendMessage = function (e) {
...
@@ -75,6 +81,12 @@ ChatRoom.sendMessage = function (e) {
* Load Messages
* Load Messages
***********************/
***********************/
ChatRoom
.
loadMessages
=
function
(
joinRoomID
,
joinRoomName
)
{
ChatRoom
.
loadMessages
=
function
(
joinRoomID
,
joinRoomName
)
{
console
.
log
(
"peacekim:: ChatRoom.loadMessages joinRoomID: "
+
joinRoomID
+
", joinRoomName: "
+
joinRoomName
);
let
roomID
=
joinRoomID
.
toString
().
replace
(
/
[
'"
]
+/g
,
""
);
let
roomID
=
joinRoomID
.
toString
().
replace
(
/
[
'"
]
+/g
,
""
);
roomName
=
joinRoomName
;
roomName
=
joinRoomName
;
// 画面更新
// 画面更新
...
@@ -98,7 +110,6 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
...
@@ -98,7 +110,6 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
let
messages
=
NativeBridgeDataSource
.
getMessagesByRoomID
(
roomID
);
let
messages
=
NativeBridgeDataSource
.
getMessagesByRoomID
(
roomID
);
ChatRoom
.
prependMessage
(
messages
);
ChatRoom
.
prependMessage
(
messages
);
window
.
addEventListener
(
window
.
addEventListener
(
"load"
,
"load"
,
function
(
event
)
{
function
(
event
)
{
...
@@ -109,6 +120,7 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
...
@@ -109,6 +120,7 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
};
};
ChatRoom
.
configureRoomMenu
=
function
()
{
ChatRoom
.
configureRoomMenu
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.configureRoomMenu"
);
if
(
roomInfo
.
roomType
==
ChatRoomType
.
DM
)
{
if
(
roomInfo
.
roomType
==
ChatRoomType
.
DM
)
{
$
(
"#roomMenu"
).
removeClass
(
"none"
);
$
(
"#roomMenu"
).
removeClass
(
"none"
);
}
else
{
}
else
{
...
@@ -117,6 +129,7 @@ ChatRoom.configureRoomMenu = function () {
...
@@ -117,6 +129,7 @@ ChatRoom.configureRoomMenu = function () {
};
};
ChatRoom
.
appendAttendedUsers
=
function
(
roomID
)
{
ChatRoom
.
appendAttendedUsers
=
function
(
roomID
)
{
console
.
log
(
"peacekim:: ChatRoom.appendAttendedUsers roomID: "
+
roomID
);
const
topUserListTemplate
=
getTemplate
(
TemplateURL
.
CHATROOM_USER_LIST
);
const
topUserListTemplate
=
getTemplate
(
TemplateURL
.
CHATROOM_USER_LIST
);
const
filterUserListTemplate
=
getTemplate
(
const
filterUserListTemplate
=
getTemplate
(
TemplateURL
.
CHATROOM_USER_FILTER_LIST
TemplateURL
.
CHATROOM_USER_FILTER_LIST
...
@@ -143,6 +156,9 @@ ChatRoom.appendAttendedUsers = function (roomID) {
...
@@ -143,6 +156,9 @@ ChatRoom.appendAttendedUsers = function (roomID) {
};
};
ChatRoom
.
prependMessage
=
function
(
messages
)
{
ChatRoom
.
prependMessage
=
function
(
messages
)
{
console
.
log
(
"peacekim:: ChatRoom.appendAttendedUsers prependMessage: "
+
messages
);
const
now
=
new
Date
();
const
now
=
new
Date
();
const
messageElement
=
$
(
"#messages"
);
const
messageElement
=
$
(
"#messages"
);
...
@@ -167,9 +183,9 @@ ChatRoom.prependMessage = function (messages) {
...
@@ -167,9 +183,9 @@ ChatRoom.prependMessage = function (messages) {
// 日付ラーベル表示
// 日付ラーベル表示
if
(
if
(
messageCreatedTime
!=
checkBeforeDate
messageCreatedTime
!=
checkBeforeDate
&&
&&
checkBeforeDate
!=
""
checkBeforeDate
!=
""
&&
&&
!
isToday
!
isToday
)
{
)
{
const
html
=
ChatRoom
.
renderDateLabelMessage
(
beforeDate
);
const
html
=
ChatRoom
.
renderDateLabelMessage
(
beforeDate
);
messageElement
.
append
(
html
);
messageElement
.
append
(
html
);
...
@@ -187,6 +203,10 @@ ChatRoom.prependMessage = function (messages) {
...
@@ -187,6 +203,10 @@ ChatRoom.prependMessage = function (messages) {
};
};
ChatRoom
.
appendInitialDateMessage
=
function
(
messages
)
{
ChatRoom
.
appendInitialDateMessage
=
function
(
messages
)
{
console
.
log
(
"peacekim:: ChatRoom.appendAttendedUsers appendInitialDateMessage: "
+
messages
);
if
(
$
(
".chat_message"
).
length
!=
0
&&
messages
.
length
!=
0
)
{
if
(
$
(
".chat_message"
).
length
!=
0
&&
messages
.
length
!=
0
)
{
$
(
"#initial-date-message"
).
detach
();
$
(
"#initial-date-message"
).
detach
();
const
html
=
ChatRoom
.
renderDateLabelMessage
(
const
html
=
ChatRoom
.
renderDateLabelMessage
(
...
@@ -241,6 +261,14 @@ ChatRoom.renderMessage = function (message, isToday, isOtherYear) {
...
@@ -241,6 +261,14 @@ ChatRoom.renderMessage = function (message, isToday, isOtherYear) {
};
};
ChatRoom
.
renderCollaborationMessage
=
function
(
message
,
isToday
,
isOtherYear
)
{
ChatRoom
.
renderCollaborationMessage
=
function
(
message
,
isToday
,
isOtherYear
)
{
console
.
log
(
"peacekim:: ChatRoom.renderCollaborationMessage message: "
+
message
+
" isToday: "
+
isToday
+
" isOtherYear: "
+
isOtherYear
);
const
collaborationInfo
=
JSON
.
parse
(
message
.
message
);
const
collaborationInfo
=
JSON
.
parse
(
message
.
message
);
const
userInCollaboration
=
JSON
.
parse
(
const
userInCollaboration
=
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
collaborationInfo
.
userList
)
NativeBridgeDataSource
.
getUserInfoList
(
collaborationInfo
.
userList
)
...
@@ -282,6 +310,7 @@ ChatRoom.getMeetingID = function (meetingID) {
...
@@ -282,6 +310,7 @@ ChatRoom.getMeetingID = function (meetingID) {
};
};
ChatRoom
.
getDisplayUserList
=
function
(
userList
)
{
ChatRoom
.
getDisplayUserList
=
function
(
userList
)
{
console
.
log
(
"peacekim:: ChatRoom.getDisplayUserList userList: "
+
userList
);
userList
.
forEach
(
function
(
user
)
{
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
});
});
...
@@ -289,6 +318,14 @@ ChatRoom.getDisplayUserList = function (userList) {
...
@@ -289,6 +318,14 @@ ChatRoom.getDisplayUserList = function (userList) {
};
};
ChatRoom
.
renderChatMessage
=
function
(
message
,
isToday
,
isOtherYear
)
{
ChatRoom
.
renderChatMessage
=
function
(
message
,
isToday
,
isOtherYear
)
{
console
.
log
(
"peacekim:: ChatRoom.renderChatMessage message: "
+
message
+
" isToday: "
+
isToday
+
" isOtherYear: "
+
isOtherYear
);
const
template
=
ChatRoom
.
getChatMessageTemplate
(
const
template
=
ChatRoom
.
getChatMessageTemplate
(
message
.
messageType
,
message
.
messageType
,
message
.
shopMemberId
message
.
shopMemberId
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/chats/chat-room-search.js
View file @
d05043cb
ChatRoom
.
bindSearchUI
=
function
()
{
ChatRoom
.
bindSearchUI
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI"
);
const
chatSearchForm
=
$
(
".chat_room_src_form"
);
const
chatSearchForm
=
$
(
".chat_room_src_form"
);
const
chatSearchInput
=
$
(
'.chat_room_src_form input[type="search"]'
);
const
chatSearchInput
=
$
(
'.chat_room_src_form input[type="search"]'
);
const
searchMessage
=
$
(
"#searchMessage"
);
const
searchMessage
=
$
(
"#searchMessage"
);
// 検索アイコン押下イベント
// 検索アイコン押下イベント
$
(
".nav_item_wrap .search_menu"
).
click
(
function
()
{
$
(
".nav_item_wrap .search_menu"
).
click
(
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .nav_item_wrap .search_menu clicked"
);
$
(
".nav_item_wrap"
).
addClass
(
"none"
);
$
(
".nav_item_wrap"
).
addClass
(
"none"
);
$
(
".footer-wrap"
).
addClass
(
"none"
);
$
(
".footer-wrap"
).
addClass
(
"none"
);
chatSearchForm
.
removeClass
(
"none"
);
chatSearchForm
.
removeClass
(
"none"
);
...
@@ -20,6 +24,9 @@ ChatRoom.bindSearchUI = function () {
...
@@ -20,6 +24,9 @@ ChatRoom.bindSearchUI = function () {
});
});
$
(
".chat_room_src_form .cancel"
).
click
(
function
()
{
$
(
".chat_room_src_form .cancel"
).
click
(
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .chat_room_src_form .cancel clicked"
);
$
(
".nav_item_wrap"
).
removeClass
(
"none"
);
$
(
".nav_item_wrap"
).
removeClass
(
"none"
);
$
(
".footer-wrap"
).
removeClass
(
"none"
);
$
(
".footer-wrap"
).
removeClass
(
"none"
);
chatSearchForm
.
addClass
(
"none"
);
chatSearchForm
.
addClass
(
"none"
);
...
@@ -37,6 +44,9 @@ ChatRoom.bindSearchUI = function () {
...
@@ -37,6 +44,9 @@ ChatRoom.bindSearchUI = function () {
});
});
chatSearchInput
.
click
(
function
()
{
chatSearchInput
.
click
(
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .chat_room_src_form input[type=search] clicked"
);
if
(
searchMessage
.
hasClass
(
"onfocus"
))
{
if
(
searchMessage
.
hasClass
(
"onfocus"
))
{
searchMessage
.
removeClass
(
"onfocus"
);
searchMessage
.
removeClass
(
"onfocus"
);
searchMessage
.
blur
();
searchMessage
.
blur
();
...
@@ -47,12 +57,18 @@ ChatRoom.bindSearchUI = function () {
...
@@ -47,12 +57,18 @@ ChatRoom.bindSearchUI = function () {
});
});
searchMessage
.
blur
(
function
()
{
searchMessage
.
blur
(
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .chat_room_src_form input[type=search] blured"
);
searchMessage
.
removeClass
(
"onfocus"
);
searchMessage
.
removeClass
(
"onfocus"
);
});
});
// チャットルーム
// チャットルーム
// メッセージ検索イベント
// メッセージ検索イベント
chatSearchInput
.
keyup
(
function
(
e
)
{
chatSearchInput
.
keyup
(
function
(
e
)
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .chat_room_src_form input[type=search] key up"
);
let
workVal
=
""
;
let
workVal
=
""
;
const
keyword
=
chatSearchInput
.
val
();
const
keyword
=
chatSearchInput
.
val
();
const
enterKeyPressed
=
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
;
const
enterKeyPressed
=
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
;
...
@@ -76,6 +92,9 @@ ChatRoom.bindSearchUI = function () {
...
@@ -76,6 +92,9 @@ ChatRoom.bindSearchUI = function () {
// iOSキーボード変換検知用
// iOSキーボード変換検知用
chatSearchInput
.
on
(
"compositionend"
,
function
()
{
chatSearchInput
.
on
(
"compositionend"
,
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .chat_room_src_form input[type=search] compositionend"
);
if
(
deviceInfo
.
isiOS
())
{
if
(
deviceInfo
.
isiOS
())
{
let
workVal
=
""
;
let
workVal
=
""
;
var
keyword
=
chatSearchInput
.
val
();
var
keyword
=
chatSearchInput
.
val
();
...
@@ -87,13 +106,18 @@ ChatRoom.bindSearchUI = function () {
...
@@ -87,13 +106,18 @@ ChatRoom.bindSearchUI = function () {
// フィルタ選択イベント
// フィルタ選択イベント
$
(
document
).
on
(
"click"
,
"#filter .img_wrap"
,
function
(
event
)
{
$
(
document
).
on
(
"click"
,
"#filter .img_wrap"
,
function
(
event
)
{
console
.
log
(
"peacekim:: ChatRoom.bindSearchUI .filter .img_wrap clicked"
);
// チェックアイコン追加
// チェックアイコン追加
$
(
this
).
toggleClass
(
"filter"
);
$
(
this
).
toggleClass
(
"filter"
);
});
});
};
};
ChatRoom
.
bindUserFilteredMessage
=
function
()
{
ChatRoom
.
bindUserFilteredMessage
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindUserFilteredMessage"
);
$
(
document
).
on
(
"click"
,
".filter_img"
,
function
(
event
)
{
$
(
document
).
on
(
"click"
,
".filter_img"
,
function
(
event
)
{
console
.
log
(
"peacekim:: ChatRoom.bindUserFilteredMessage on document click"
);
const
keyword
=
$
(
'.chat_room_src_form input[type="search"]'
).
val
();
const
keyword
=
$
(
'.chat_room_src_form input[type="search"]'
).
val
();
$
(
".overlay_src_msg"
).
empty
();
$
(
".overlay_src_msg"
).
empty
();
let
checkedUserList
=
ChatRoom
.
getCheckedUserList
();
let
checkedUserList
=
ChatRoom
.
getCheckedUserList
();
...
@@ -110,6 +134,7 @@ ChatRoom.bindUserFilteredMessage = function () {
...
@@ -110,6 +134,7 @@ ChatRoom.bindUserFilteredMessage = function () {
// メッセージ検索
// メッセージ検索
ChatRoom
.
searchMessage
=
function
(
keyword
,
workVal
)
{
ChatRoom
.
searchMessage
=
function
(
keyword
,
workVal
)
{
console
.
log
(
"peacekim:: ChatRoom.searchMessage"
);
$
(
".overlay_src_msg"
).
empty
();
$
(
".overlay_src_msg"
).
empty
();
let
checkedUserList
=
ChatRoom
.
getCheckedUserList
();
let
checkedUserList
=
ChatRoom
.
getCheckedUserList
();
const
messages
=
NativeBridgeDataSource
.
searchMessages
(
const
messages
=
NativeBridgeDataSource
.
searchMessages
(
...
@@ -126,6 +151,7 @@ ChatRoom.searchMessage = function (keyword, workVal) {
...
@@ -126,6 +151,7 @@ ChatRoom.searchMessage = function (keyword, workVal) {
};
};
ChatRoom
.
getCheckedUserList
=
function
()
{
ChatRoom
.
getCheckedUserList
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.getCheckedUserList"
);
let
checkedUserList
=
[];
let
checkedUserList
=
[];
$
(
".img_wrap.filter"
).
each
(
function
(
user
)
{
$
(
".img_wrap.filter"
).
each
(
function
(
user
)
{
const
selectedUser
=
$
(
".img_wrap.filter"
)[
user
];
const
selectedUser
=
$
(
".img_wrap.filter"
)[
user
];
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/chats/chat-room.js
View file @
d05043cb
...
@@ -37,6 +37,7 @@ window.onscroll = function () {
...
@@ -37,6 +37,7 @@ window.onscroll = function () {
};
};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
console
.
log
(
"peacekim:: chat-room DOMContentLoaded"
);
// 検索イベントバインディング
// 検索イベントバインディング
ChatRoom
.
bindSearchUI
();
ChatRoom
.
bindSearchUI
();
...
@@ -86,6 +87,7 @@ ChatRoom.bindResize = function () {
...
@@ -86,6 +87,7 @@ ChatRoom.bindResize = function () {
};
};
ChatRoom
.
bindMessageInput
=
function
()
{
ChatRoom
.
bindMessageInput
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.bindMessageInput"
);
$
(
"#messageInput"
).
focusin
(
function
(
e
)
{
$
(
"#messageInput"
).
focusin
(
function
(
e
)
{
beforeHeight
=
window
.
innerHeight
;
beforeHeight
=
window
.
innerHeight
;
beforeWidth
=
window
.
innerWidth
;
beforeWidth
=
window
.
innerWidth
;
...
@@ -133,6 +135,7 @@ ChatRoom.bindUserListDisplayToggle = function () {
...
@@ -133,6 +135,7 @@ ChatRoom.bindUserListDisplayToggle = function () {
// 画像の読み込みが全て終わったタイミングでコールバック実行
// 画像の読み込みが全て終わったタイミングでコールバック実行
// FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。
// FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。
ChatRoom
.
waitForLoadingVideo
=
function
(
div
,
callback
)
{
ChatRoom
.
waitForLoadingVideo
=
function
(
div
,
callback
)
{
console
.
log
(
"peacekim:: ChatRoom.waitForLoadingVideo"
);
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
// var imgs = document.getElementsByTagName("video");
// var imgs = document.getElementsByTagName("video");
let
video
=
div
.
find
(
"video"
);
let
video
=
div
.
find
(
"video"
);
...
@@ -151,6 +154,7 @@ ChatRoom.waitForLoadingVideo = function (div, callback) {
...
@@ -151,6 +154,7 @@ ChatRoom.waitForLoadingVideo = function (div, callback) {
};
};
ChatRoom
.
waitForLoadingImage
=
function
(
div
,
callback
)
{
ChatRoom
.
waitForLoadingImage
=
function
(
div
,
callback
)
{
console
.
log
(
"peacekim:: ChatRoom.waitForLoadingImage"
);
let
imgs
=
div
.
find
(
"img"
);
let
imgs
=
div
.
find
(
"img"
);
let
count
=
imgs
.
length
;
let
count
=
imgs
.
length
;
if
(
count
==
0
)
callback
();
if
(
count
==
0
)
callback
();
...
@@ -171,9 +175,9 @@ ChatRoom.waitForLoadingImage = function (div, callback) {
...
@@ -171,9 +175,9 @@ ChatRoom.waitForLoadingImage = function (div, callback) {
};
};
ChatRoom
.
scrollToBottom
=
function
(
animated
=
true
)
{
ChatRoom
.
scrollToBottom
=
function
(
animated
=
true
)
{
console
.
log
(
"peacekim:: ChatRoom.scrollToBottom"
);
const
messages
=
$
(
".room_contents"
);
const
messages
=
$
(
".room_contents"
);
const
scrollHeight
=
messages
.
prop
(
"scrollHeight"
);
const
scrollHeight
=
messages
.
prop
(
"scrollHeight"
);
$
(
"html, body"
).
animate
(
$
(
"html, body"
).
animate
(
{
{
scrollTop
:
scrollHeight
,
scrollTop
:
scrollHeight
,
...
@@ -182,11 +186,13 @@ ChatRoom.scrollToBottom = function (animated = true) {
...
@@ -182,11 +186,13 @@ ChatRoom.scrollToBottom = function (animated = true) {
function
()
{
function
()
{
initialLoading
=
false
;
initialLoading
=
false
;
Common
.
dismissLoadingIndicator
();
Common
.
dismissLoadingIndicator
();
console
.
log
(
"peacekim:: ChatRoom.scrollToBottom animate completed"
);
}
}
);
);
};
};
ChatRoom
.
refreshForOnline
=
function
()
{
ChatRoom
.
refreshForOnline
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.refreshForOnline"
);
$
(
"#videoUploadButton"
).
removeClass
(
"ui-state-disabled"
);
$
(
"#videoUploadButton"
).
removeClass
(
"ui-state-disabled"
);
$
(
"#imageInputButton"
).
removeClass
(
"ui-state-disabled"
);
$
(
"#imageInputButton"
).
removeClass
(
"ui-state-disabled"
);
$
(
"#messageSend"
).
prop
(
"disabled"
,
false
);
$
(
"#messageSend"
).
prop
(
"disabled"
,
false
);
...
@@ -202,6 +208,7 @@ ChatRoom.refreshForOnline = function () {
...
@@ -202,6 +208,7 @@ ChatRoom.refreshForOnline = function () {
};
};
ChatRoom
.
refreshForOffline
=
function
()
{
ChatRoom
.
refreshForOffline
=
function
()
{
console
.
log
(
"peacekim:: ChatRoom.refreshForOffline"
);
$
(
"#videoUploadButton"
).
addClass
(
"ui-state-disabled"
);
$
(
"#videoUploadButton"
).
addClass
(
"ui-state-disabled"
);
$
(
"#imageInputButton"
).
addClass
(
"ui-state-disabled"
);
$
(
"#imageInputButton"
).
addClass
(
"ui-state-disabled"
);
$
(
"#messageSend"
).
prop
(
"disabled"
,
true
);
$
(
"#messageSend"
).
prop
(
"disabled"
,
true
);
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/chats/management/chat-management-common.js
View file @
d05043cb
...
@@ -4,6 +4,7 @@ var ChatManagementCommon = {};
...
@@ -4,6 +4,7 @@ var ChatManagementCommon = {};
ChatManagementCommon
.
selectedUserList
=
new
Array
();
ChatManagementCommon
.
selectedUserList
=
new
Array
();
ChatManagementCommon
.
showMakeRoomConfirmView
=
function
()
{
ChatManagementCommon
.
showMakeRoomConfirmView
=
function
()
{
console
.
log
(
"peacekim:: ChatManagementCommon.showMakeRoomConfirmView"
);
$
(
"#selectedUserList"
).
html
(
""
);
$
(
"#selectedUserList"
).
html
(
""
);
const
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_CONFIRM_USER_LIST
);
const
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_CONFIRM_USER_LIST
);
...
@@ -23,6 +24,7 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
...
@@ -23,6 +24,7 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
$
(
"#makeRoomBtn"
)
$
(
"#makeRoomBtn"
)
.
off
()
.
off
()
.
on
(
"click"
,
function
()
{
.
on
(
"click"
,
function
()
{
console
.
log
(
"peacekim:: ChatManagementCommon - makeRoomBtn clicked"
);
// #36130に対応
// #36130に対応
const
trimmedRoomName
=
$
(
"#newRoomName"
).
val
().
trim
();
const
trimmedRoomName
=
$
(
"#newRoomName"
).
val
().
trim
();
if
(
trimmedRoomName
.
length
==
0
)
{
if
(
trimmedRoomName
.
length
==
0
)
{
...
@@ -128,6 +130,7 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
...
@@ -128,6 +130,7 @@ ChatManagementCommon.showMakeRoomConfirmView = function () {
};
};
ChatManagementCommon.showAddUserConfirmView = function () {
ChatManagementCommon.showAddUserConfirmView = function () {
console.log("peacekim:: ChatManagementCommon.showAddUserConfirmView");
$("#selectedUserList").html("");
$("#selectedUserList").html("");
const userTemplate = getTemplate(TemplateURL.ADD_USER_CONFIRM_USER_LIST);
const userTemplate = getTemplate(TemplateURL.ADD_USER_CONFIRM_USER_LIST);
...
@@ -146,6 +149,9 @@ ChatManagementCommon.showAddUserConfirmView = function () {
...
@@ -146,6 +149,9 @@ ChatManagementCommon.showAddUserConfirmView = function () {
$("#addUserBtn")
$("#addUserBtn")
.off()
.off()
.on("click", function () {
.on("click", function () {
console.log(
"peacekim:: ChatManagementCommon.showAddUserConfirmView addUserBtn clicked"
);
Common.showLoadingIndicator();
Common.showLoadingIndicator();
let userIdList = new Array();
let userIdList = new Array();
selectedUserList.forEach(function (user) {
selectedUserList.forEach(function (user) {
...
@@ -156,6 +162,10 @@ ChatManagementCommon.showAddUserConfirmView = function () {
...
@@ -156,6 +162,10 @@ ChatManagementCommon.showAddUserConfirmView = function () {
};
};
ChatManagementCommon.checkForMakeChat = function (checkMemberID) {
ChatManagementCommon.checkForMakeChat = function (checkMemberID) {
console.log(
"peacekim:: ChatManagementCommon.checkForMakeChat check memberID: " +
checkMemberID
);
let findObj = ChatManagementCommon.selectedUserList.find(function (
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberID
shopMemberID
) {
) {
...
@@ -184,6 +194,12 @@ ChatManagementCommon.checkForMakeChat = function (checkMemberID) {
...
@@ -184,6 +194,12 @@ ChatManagementCommon.checkForMakeChat = function (checkMemberID) {
};
};
ChatManagementCommon.updateCheckBox = function (checkMemberID, checked) {
ChatManagementCommon.updateCheckBox = function (checkMemberID, checked) {
console.log(
"peacekim:: ChatManagementCommon.updateCheckBox check memberID: " +
checkMemberID +
", checked: " +
checked
);
$(".checkbox" + checkMemberID)
$(".checkbox" + checkMemberID)
.prop("checked", checked)
.prop("checked", checked)
.trigger("change");
.trigger("change");
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/collaboration-add-user.js
View file @
d05043cb
CollaborationUI
.
initialBindAddUserButton
=
function
()
{
CollaborationUI
.
initialBindAddUserButton
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.initialBindAddUserButton"
);
// ユーザー招待メンバー検索
// ユーザー招待メンバー検索
$
(
".add_user_btn"
).
click
(
function
()
{
$
(
".add_user_btn"
).
click
(
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.initialBindAddUserButton add_user_btn clicked"
);
CollaborationUI
.
bindEnableScroll
();
CollaborationUI
.
bindEnableScroll
();
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
ChatManagementCommon
.
selectedUserList
=
[];
ChatManagementCommon
.
selectedUserList
=
[];
...
@@ -8,6 +10,7 @@ CollaborationUI.initialBindAddUserButton = function () {
...
@@ -8,6 +10,7 @@ CollaborationUI.initialBindAddUserButton = function () {
$
(
"#addUserConfirmBtnInCollaboration"
)
$
(
"#addUserConfirmBtnInCollaboration"
)
.
off
()
.
off
()
.
on
(
"click"
,
function
()
{
.
on
(
"click"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.initialBindAddUserButton addUserConfirmBtnInCollaboration clicked"
);
$
(
"#addUserInCollaboration"
).
modal
(
"hide"
);
$
(
"#addUserInCollaboration"
).
modal
(
"hide"
);
const
selectedUserList
=
const
selectedUserList
=
ChatManagementCommon
.
selectedUserList
.
join
(
","
);
ChatManagementCommon
.
selectedUserList
.
join
(
","
);
...
@@ -18,14 +21,17 @@ CollaborationUI.initialBindAddUserButton = function () {
...
@@ -18,14 +21,17 @@ CollaborationUI.initialBindAddUserButton = function () {
};
};
$
(
"#tabMyGroupOnAddUserInCollaboration"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#tabMyGroupOnAddUserInCollaboration"
).
on
(
"click"
,
function
(
e
)
{
console
.
log
(
"peacekim:: CollaborationUI.initialBindAddUserButton tabMyGroupOnAddUserInCollaboration clicked"
);
CollaborationUI
.
refreshMyGroupForAddUserInCollaboration
();
CollaborationUI
.
refreshMyGroupForAddUserInCollaboration
();
});
});
$
(
"#tabAllGroupOnAddUserInCollaboration"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#tabAllGroupOnAddUserInCollaboration"
).
on
(
"click"
,
function
(
e
)
{
console
.
log
(
"peacekim:: CollaborationUI.initialBindAddUserButton tabAllGroupOnAddUserInCollaboration clicked"
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
"0"
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
"0"
);
});
});
CollaborationUI
.
refreshMyGroupForAddUserInCollaboration
=
function
()
{
CollaborationUI
.
refreshMyGroupForAddUserInCollaboration
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.initialBindAddUserButton refreshMyGroupForAddUserInCollaboration"
);
if
(
ChatManagementCommon
.
selectedUserList
.
length
>
0
)
{
if
(
ChatManagementCommon
.
selectedUserList
.
length
>
0
)
{
$
(
".select_member_num"
).
text
(
ChatManagementCommon
.
selectedUserList
.
length
);
$
(
".select_member_num"
).
text
(
ChatManagementCommon
.
selectedUserList
.
length
);
}
else
{
}
else
{
...
@@ -49,6 +55,7 @@ CollaborationUI.refreshMyGroupForAddUserInCollaboration = function () {
...
@@ -49,6 +55,7 @@ CollaborationUI.refreshMyGroupForAddUserInCollaboration = function () {
};
};
CollaborationUI
.
appendFavoriteGroupList
=
function
()
{
CollaborationUI
.
appendFavoriteGroupList
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.appendFavoriteGroupList"
);
// グループの様式を読み込む
// グループの様式を読み込む
const
groupTemplate
=
getTemplate
(
const
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST_IN_COLLABORATION
TemplateURL
.
ADD_USER_GROUP_LIST_IN_COLLABORATION
...
@@ -67,6 +74,7 @@ CollaborationUI.appendFavoriteGroupList = function () {
...
@@ -67,6 +74,7 @@ CollaborationUI.appendFavoriteGroupList = function () {
};
};
CollaborationUI
.
appendFavoriteUserList
=
function
()
{
CollaborationUI
.
appendFavoriteUserList
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.appendFavoriteUserList"
);
// ユーザの様式を読み込む
// ユーザの様式を読み込む
const
userTemplate
=
getTemplate
(
const
userTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_USER_LIST_IN_COLLABORATION
TemplateURL
.
ADD_USER_USER_LIST_IN_COLLABORATION
...
@@ -92,6 +100,7 @@ CollaborationUI.appendFavoriteUserList = function () {
...
@@ -92,6 +100,7 @@ CollaborationUI.appendFavoriteUserList = function () {
};
};
CollaborationUI
.
appendMyGroupList
=
function
()
{
CollaborationUI
.
appendMyGroupList
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.appendMyGroupList"
);
const
groupUserTemplate
=
getTemplate
(
const
groupUserTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_USER_LIST_IN_COLLABORATION
TemplateURL
.
ADD_USER_GROUP_USER_LIST_IN_COLLABORATION
);
);
...
@@ -119,6 +128,7 @@ CollaborationUI.appendMyGroupList = function () {
...
@@ -119,6 +128,7 @@ CollaborationUI.appendMyGroupList = function () {
};
};
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
=
function
(
groupID
)
{
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
=
function
(
groupID
)
{
console
.
log
(
"peacekim:: CollaborationUI.refreshAllGroupForAddUserInCollaboration"
);
$
(
".content"
).
removeClass
(
"none"
);
$
(
".content"
).
removeClass
(
"none"
);
$
(
"#tabAllGroupOnAddUserInCollaboration"
).
prop
(
"checked"
,
true
);
$
(
"#tabAllGroupOnAddUserInCollaboration"
).
prop
(
"checked"
,
true
);
...
@@ -153,13 +163,17 @@ CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (groupID) {
...
@@ -153,13 +163,17 @@ CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (groupID) {
};
};
CollaborationUI
.
bindOnClickParentGroup
=
function
(
parentGroupID
)
{
CollaborationUI
.
bindOnClickParentGroup
=
function
(
parentGroupID
)
{
console
.
log
(
"peacekim:: CollaborationUI.bindOnClickParentGroup"
);
$
(
"#parentGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
$
(
"#parentGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindOnClickParentGroup parentGroupBtnForAddUserInCollaboration clicked"
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
parentGroupID
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
parentGroupID
);
});
});
};
};
CollaborationUI
.
bindOnClickRootGroup
=
function
(
rootGroupID
)
{
CollaborationUI
.
bindOnClickRootGroup
=
function
(
rootGroupID
)
{
console
.
log
(
"peacekim:: CollaborationUI.bindOnClickRootGroup"
);
$
(
"#rootGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
$
(
"#rootGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindOnClickRootGroup rootGroupBtnForAddUserInCollaboration clicked"
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
rootGroupID
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
rootGroupID
);
});
});
};
};
...
@@ -168,6 +182,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function (
...
@@ -168,6 +182,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function (
rootGroupID
,
rootGroupID
,
groupID
groupID
)
{
)
{
console
.
log
(
"peacekim:: CollaborationUI.displayRootGroupAndParentGroupIfNeeded"
);
if
(
typeof
rootGroupID
!==
"undefined"
&&
paramGroupID
==
0
)
{
if
(
typeof
rootGroupID
!==
"undefined"
&&
paramGroupID
==
0
)
{
groupID
=
rootGroupID
;
groupID
=
rootGroupID
;
}
}
...
@@ -182,6 +197,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function (
...
@@ -182,6 +197,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function (
};
};
CollaborationUI
.
appendGroupPath
=
function
(
groupPathList
)
{
CollaborationUI
.
appendGroupPath
=
function
(
groupPathList
)
{
console
.
log
(
"peacekim:: CollaborationUI.appendGroupPath groupPathList: "
+
groupPathList
);
const
groupPathTemplate
=
getTemplate
(
const
groupPathTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_PATH_IN_COLLABORATION
TemplateURL
.
ADD_USER_GROUP_PATH_IN_COLLABORATION
);
);
...
@@ -201,6 +217,7 @@ CollaborationUI.appendGroupPath = function (groupPathList) {
...
@@ -201,6 +217,7 @@ CollaborationUI.appendGroupPath = function (groupPathList) {
};
};
CollaborationUI
.
appendChildGroups
=
function
(
chidGroups
)
{
CollaborationUI
.
appendChildGroups
=
function
(
chidGroups
)
{
console
.
log
(
"peacekim:: CollaborationUI.appendChildGroups chidGroups: "
+
chidGroups
);
const
groupTemplate
=
getTemplate
(
const
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST_IN_COLLABORATION
TemplateURL
.
ADD_USER_GROUP_LIST_IN_COLLABORATION
);
);
...
@@ -217,6 +234,7 @@ CollaborationUI.appendChildGroups = function (chidGroups) {
...
@@ -217,6 +234,7 @@ CollaborationUI.appendChildGroups = function (chidGroups) {
};
};
CollaborationUI
.
appendUsers
=
function
(
userList
)
{
CollaborationUI
.
appendUsers
=
function
(
userList
)
{
console
.
log
(
"peacekim:: CollaborationUI.appendUsers userList: "
+
userList
);
const
userTemplate
=
getTemplate
(
const
userTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_USER_LIST_IN_COLLABORATION
TemplateURL
.
ADD_USER_USER_LIST_IN_COLLABORATION
);
);
...
@@ -244,6 +262,7 @@ CollaborationUI.appendRootGroupAndParentGroupIfNeeded = function (
...
@@ -244,6 +262,7 @@ CollaborationUI.appendRootGroupAndParentGroupIfNeeded = function (
parentGroupID
,
parentGroupID
,
groupID
groupID
)
{
)
{
console
.
log
(
"peacekim:: CollaborationUI.appendRootGroupAndParentGroupIfNeeded"
);
if
(
typeof
parentGroupID
!==
"undefined"
)
{
if
(
typeof
parentGroupID
!==
"undefined"
)
{
CollaborationUI
.
bindOnClickParentGroup
(
parentGroupID
);
CollaborationUI
.
bindOnClickParentGroup
(
parentGroupID
);
}
}
...
@@ -256,6 +275,7 @@ CollaborationUI.appendRootGroupAndParentGroupIfNeeded = function (
...
@@ -256,6 +275,7 @@ CollaborationUI.appendRootGroupAndParentGroupIfNeeded = function (
};
};
CollaborationUI
.
confirmInviteUserListInCollaboration
=
function
()
{
CollaborationUI
.
confirmInviteUserListInCollaboration
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.confirmInviteUserListInCollaboration"
);
const
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
const
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
if
(
selectedUsers
!=
""
)
{
if
(
selectedUsers
!=
""
)
{
$
(
"#selectedUserListinCollaboration"
).
html
(
""
);
$
(
"#selectedUserListinCollaboration"
).
html
(
""
);
...
@@ -280,18 +300,22 @@ CollaborationUI.confirmInviteUserListInCollaboration = function () {
...
@@ -280,18 +300,22 @@ CollaborationUI.confirmInviteUserListInCollaboration = function () {
};
};
CollaborationUI
.
bindCancelAddUserButton
=
function
()
{
CollaborationUI
.
bindCancelAddUserButton
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindCancelAddUserButton"
);
$
(
"#cancelAddUserBtn"
)
$
(
"#cancelAddUserBtn"
)
.
off
()
.
off
()
.
on
(
"click"
,
function
()
{
.
on
(
"click"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindCancelAddUserButton cancelAddUserBtn clicked"
);
$
(
"#modalAddUserConfirm"
).
modal
(
"hide"
);
$
(
"#modalAddUserConfirm"
).
modal
(
"hide"
);
$
(
"#addUserInCollaboration"
).
modal
(
"show"
);
$
(
"#addUserInCollaboration"
).
modal
(
"show"
);
});
});
};
};
CollaborationUI
.
bindAddUserButton
=
function
(
selectedUsers
)
{
CollaborationUI
.
bindAddUserButton
=
function
(
selectedUsers
)
{
console
.
log
(
"peacekim:: CollaborationUI.bindAddUserButton"
);
$
(
"#addUserBtn"
)
$
(
"#addUserBtn"
)
.
off
()
.
off
()
.
on
(
"click"
,
function
()
{
.
on
(
"click"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindAddUserButton addUserBtn clicked"
);
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
let
userIDList
=
selectedUsers
.
map
((
user
)
=>
user
.
shopMemberId
);
let
userIDList
=
selectedUsers
.
map
((
user
)
=>
user
.
shopMemberId
);
const
commaJoinedUserIDList
=
userIDList
.
join
(
","
);
const
commaJoinedUserIDList
=
userIDList
.
join
(
","
);
...
@@ -308,6 +332,7 @@ CollaborationUI.bindAddUserButton = function (selectedUsers) {
...
@@ -308,6 +332,7 @@ CollaborationUI.bindAddUserButton = function (selectedUsers) {
};
};
CollaborationUI
.
toggleCategory
=
function
(
category
)
{
CollaborationUI
.
toggleCategory
=
function
(
category
)
{
console
.
log
(
"peacekim:: CollaborationUI.toggleCategory"
);
$
(
category
).
toggleClass
(
"open"
);
$
(
category
).
toggleClass
(
"open"
);
$
(
category
).
next
().
slideToggle
();
$
(
category
).
next
().
slideToggle
();
};
};
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/collaboration.js
View file @
d05043cb
var
CollaborationUI
=
{};
var
CollaborationUI
=
{};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
console
.
log
(
"peacekim:: DOMContentLoaded on collaboration js"
);
CollaborationUI
.
bindDisableScroll
();
CollaborationUI
.
bindDisableScroll
();
// メニューオーバーレイ表示
// メニューオーバーレイ表示
...
@@ -78,6 +79,7 @@ CollaborationUI.bindInviteButton = function () {
...
@@ -78,6 +79,7 @@ CollaborationUI.bindInviteButton = function () {
* Scroll Controls
* Scroll Controls
********************************/
********************************/
CollaborationUI
.
bindDisableScroll
=
function
()
{
CollaborationUI
.
bindDisableScroll
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindDisableScroll"
);
document
.
addEventListener
(
"mousewheel"
,
CollaborationUI
.
scrollControl
,
{
document
.
addEventListener
(
"mousewheel"
,
CollaborationUI
.
scrollControl
,
{
passive
:
false
,
passive
:
false
,
});
});
...
@@ -88,6 +90,7 @@ CollaborationUI.bindDisableScroll = function () {
...
@@ -88,6 +90,7 @@ CollaborationUI.bindDisableScroll = function () {
// スクロール禁止解除
// スクロール禁止解除
CollaborationUI
.
bindEnableScroll
=
function
()
{
CollaborationUI
.
bindEnableScroll
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.bindEnableScroll"
);
document
.
removeEventListener
(
"mousewheel"
,
CollaborationUI
.
scrollControl
,
{
document
.
removeEventListener
(
"mousewheel"
,
CollaborationUI
.
scrollControl
,
{
passive
:
false
,
passive
:
false
,
});
});
...
@@ -97,6 +100,7 @@ CollaborationUI.bindEnableScroll = function () {
...
@@ -97,6 +100,7 @@ CollaborationUI.bindEnableScroll = function () {
};
};
CollaborationUI
.
scrollControl
=
function
(
event
)
{
CollaborationUI
.
scrollControl
=
function
(
event
)
{
console
.
log
(
"peacekim:: CollaborationUI.scrollControl"
);
if
(
event
.
cancelable
)
{
if
(
event
.
cancelable
)
{
event
.
preventDefault
();
event
.
preventDefault
();
}
}
...
@@ -106,6 +110,10 @@ CollaborationUI.scrollControl = function (event) {
...
@@ -106,6 +110,10 @@ CollaborationUI.scrollControl = function (event) {
* NameCard in Collaboration
* NameCard in Collaboration
********************************/
********************************/
CollaborationUI
.
makeNameCard
=
function
(
shopMemberID
)
{
CollaborationUI
.
makeNameCard
=
function
(
shopMemberID
)
{
console
.
log
(
"peacekim:: CollaborationUI.makeNameCard shopMemberID: "
+
shopMemberID
);
if
(
currentUserInfo
.
shopMemberID
==
shopMemberID
)
{
if
(
currentUserInfo
.
shopMemberID
==
shopMemberID
)
{
return
;
return
;
}
}
...
@@ -143,6 +151,10 @@ CollaborationUI.makeNameCard = function (shopMemberID) {
...
@@ -143,6 +151,10 @@ CollaborationUI.makeNameCard = function (shopMemberID) {
};
};
CollaborationUI
.
removeFavoriteUserInCollaboration
=
function
(
shopMemberID
)
{
CollaborationUI
.
removeFavoriteUserInCollaboration
=
function
(
shopMemberID
)
{
console
.
log
(
"peacekim:: CollaborationUI.removeFavoriteUserInCollaboration shopMemberID: "
+
shopMemberID
);
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
NativeBridgeDataSource
.
removeFavoriteUser
(
shopMemberID
);
NativeBridgeDataSource
.
removeFavoriteUser
(
shopMemberID
);
...
@@ -150,12 +162,17 @@ CollaborationUI.removeFavoriteUserInCollaboration = function (shopMemberID) {
...
@@ -150,12 +162,17 @@ CollaborationUI.removeFavoriteUserInCollaboration = function (shopMemberID) {
};
};
CollaborationUI
.
insertFavoriteUserInCollaboration
=
function
(
shopMemberID
)
{
CollaborationUI
.
insertFavoriteUserInCollaboration
=
function
(
shopMemberID
)
{
console
.
log
(
"peacekim:: CollaborationUI.insertFavoriteUserInCollaboration shopMemberID: "
+
shopMemberID
);
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberID
);
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberID
);
Common
.
dismissLoadingIndicator
();
Common
.
dismissLoadingIndicator
();
};
};
CollaborationUI
.
refreshForOffline
=
function
()
{
CollaborationUI
.
refreshForOffline
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.refreshForOffline"
);
serverInfo
.
isOnline
=
false
;
serverInfo
.
isOnline
=
false
;
if
(
typeof
coview_api
==
"undefined"
)
{
if
(
typeof
coview_api
==
"undefined"
)
{
return
;
return
;
...
@@ -173,14 +190,22 @@ CollaborationUI.refreshForOffline = function () {
...
@@ -173,14 +190,22 @@ CollaborationUI.refreshForOffline = function () {
};
};
CollaborationUI
.
showLoadingIndicator
=
function
()
{
CollaborationUI
.
showLoadingIndicator
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.showLoadingIndicator"
);
$
(
"#loadingIndicator"
).
addClass
(
"full_active"
);
$
(
"#loadingIndicator"
).
addClass
(
"full_active"
);
};
};
CollaborationUI
.
hideLoadingIndicator
=
function
()
{
CollaborationUI
.
hideLoadingIndicator
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.hideLoadingIndicator"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
};
};
CollaborationUI
.
displayAddUserButtonIfNeeded
=
function
()
{
CollaborationUI
.
displayAddUserButtonIfNeeded
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.displayAddUserButtonIfNeeded"
+
", roomInfo.roomType == ChatRoomType.DM: "
+
roomInfo
.
roomType
==
ChatRoomType
.
DM
);
if
(
roomInfo
.
roomType
==
ChatRoomType
.
DM
)
{
if
(
roomInfo
.
roomType
==
ChatRoomType
.
DM
)
{
$
(
".add_user_btn"
).
removeClass
(
"none"
);
$
(
".add_user_btn"
).
removeClass
(
"none"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/fermi-web-socket-bridge.js
View file @
d05043cb
...
@@ -2,20 +2,26 @@ var FermiWebSocketBridge = {};
...
@@ -2,20 +2,26 @@ var FermiWebSocketBridge = {};
// call from modal_collabo_profile.html
// call from modal_collabo_profile.html
FermiWebSocketBridge
.
requestHostChange
=
function
(
loginID
)
{
FermiWebSocketBridge
.
requestHostChange
=
function
(
loginID
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.requestHostChange loginID: "
+
loginID
);
fw
.
sendToMsg
(
"others"
,
"HOST_CHANGE_REQUEST"
,
{
fw
.
sendToMsg
(
"others"
,
"HOST_CHANGE_REQUEST"
,
{
loginId
:
loginID
,
loginId
:
loginID
,
});
});
};
};
FermiWebSocketBridge
.
shareFileHost
=
function
(
collaborationType
)
{
FermiWebSocketBridge
.
shareFileHost
=
function
(
collaborationType
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.shareFileHost collaborationType: "
+
collaborationType
);
fw
.
sendToMsg
(
"others"
,
"SHARE_FILE_HOST"
,
{
fw
.
sendToMsg
(
"others"
,
"SHARE_FILE_HOST"
,
{
// TODO: Peacekim check collaboration type as coviewType
collaborationType
:
collaborationType
,
collaborationType
:
collaborationType
,
});
});
};
};
FermiWebSocketBridge
.
hostChangeResponse
=
function
()
{
FermiWebSocketBridge
.
hostChangeResponse
=
function
()
{
// TODO: peacekim:: check loginID is for fw or not
console
.
log
(
"peacekim:: FermiWebSocketBridge.hostChangeResponse"
);
fw
.
sendToMsg
(
"others"
,
"HOST_CHANGE_RESPONSE"
,
{
fw
.
sendToMsg
(
"others"
,
"HOST_CHANGE_RESPONSE"
,
{
isAndroid
:
deviceInfo
.
isAndroid
(),
isAndroid
:
deviceInfo
.
isAndroid
(),
isAble
:
deviceInfo
.
androidVersion
>=
ANDROID_SDK_VERSION
.
O
,
isAble
:
deviceInfo
.
androidVersion
>=
ANDROID_SDK_VERSION
.
O
,
...
@@ -25,6 +31,9 @@ FermiWebSocketBridge.hostChangeResponse = function () {
...
@@ -25,6 +31,9 @@ FermiWebSocketBridge.hostChangeResponse = function () {
// PIP_END_REQUEST
// PIP_END_REQUEST
FermiWebSocketBridge
.
pipEndRequest
=
function
(
loginID
)
{
FermiWebSocketBridge
.
pipEndRequest
=
function
(
loginID
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.pipEndRequest loginID: "
+
loginID
);
fw
.
sendToMsg
(
"others"
,
"PIP_END_REQUEST"
,
{
fw
.
sendToMsg
(
"others"
,
"PIP_END_REQUEST"
,
{
loginId
:
loginID
,
loginId
:
loginID
,
});
});
...
@@ -32,6 +41,9 @@ FermiWebSocketBridge.pipEndRequest = function (loginID) {
...
@@ -32,6 +41,9 @@ FermiWebSocketBridge.pipEndRequest = function (loginID) {
// HOST_REQUEST_REJECT
// HOST_REQUEST_REJECT
FermiWebSocketBridge
.
hostRequestReject
=
function
(
hostID
)
{
FermiWebSocketBridge
.
hostRequestReject
=
function
(
hostID
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.hostRequestReject hostID: "
+
hostID
);
fw
.
sendToMsg
(
"others"
,
"HOST_REQUEST_REJECT"
,
{
fw
.
sendToMsg
(
"others"
,
"HOST_REQUEST_REJECT"
,
{
hostId
:
hostID
,
hostId
:
hostID
,
});
});
...
@@ -39,6 +51,9 @@ FermiWebSocketBridge.hostRequestReject = function (hostID) {
...
@@ -39,6 +51,9 @@ FermiWebSocketBridge.hostRequestReject = function (hostID) {
// HOST_REQUEST_DONE
// HOST_REQUEST_DONE
FermiWebSocketBridge
.
hostRequestDone
=
function
(
hostID
)
{
FermiWebSocketBridge
.
hostRequestDone
=
function
(
hostID
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.hostRequestDone hostID: "
+
hostID
);
fw
.
sendToMsg
(
"others"
,
"HOST_REQUEST_DONE"
,
{
fw
.
sendToMsg
(
"others"
,
"HOST_REQUEST_DONE"
,
{
hostId
:
hostID
,
hostId
:
hostID
,
});
});
...
@@ -46,6 +61,12 @@ FermiWebSocketBridge.hostRequestDone = function (hostID) {
...
@@ -46,6 +61,12 @@ FermiWebSocketBridge.hostRequestDone = function (hostID) {
// GET_COLLABORATION_TYPE_RESPONSE
// GET_COLLABORATION_TYPE_RESPONSE
FermiWebSocketBridge
.
getCollaborationTypeResponse
=
function
(
loginID
)
{
FermiWebSocketBridge
.
getCollaborationTypeResponse
=
function
(
loginID
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.getCollaborationTypeResponse hostID: "
+
loginID
+
", meetingID: "
+
meetingID
);
fw
.
sendToMsg
(
"others"
,
"GET_COLLABORATION_TYPE_RESPONSE"
,
{
fw
.
sendToMsg
(
"others"
,
"GET_COLLABORATION_TYPE_RESPONSE"
,
{
loginId
:
loginID
,
loginId
:
loginID
,
collaborationType
:
globalUserInfo
.
collaborationType
,
collaborationType
:
globalUserInfo
.
collaborationType
,
...
@@ -55,6 +76,10 @@ FermiWebSocketBridge.getCollaborationTypeResponse = function (loginID) {
...
@@ -55,6 +76,10 @@ FermiWebSocketBridge.getCollaborationTypeResponse = function (loginID) {
// GET_COLLABORATION_TYPE
// GET_COLLABORATION_TYPE
FermiWebSocketBridge
.
getCollaborationType
=
function
()
{
FermiWebSocketBridge
.
getCollaborationType
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.getCollaborationType globalUserInfo.loginId: "
+
globalUserInfo
.
loginId
);
fw
.
sendToMsg
(
"others"
,
"GET_COLLABORATION_TYPE"
,
{
fw
.
sendToMsg
(
"others"
,
"GET_COLLABORATION_TYPE"
,
{
loginId
:
globalUserInfo
.
loginId
,
loginId
:
globalUserInfo
.
loginId
,
});
});
...
@@ -62,8 +87,11 @@ FermiWebSocketBridge.getCollaborationType = function () {
...
@@ -62,8 +87,11 @@ FermiWebSocketBridge.getCollaborationType = function () {
// CAPTURE_REQUEST
// CAPTURE_REQUEST
FermiWebSocketBridge
.
captureRequest
=
function
()
{
FermiWebSocketBridge
.
captureRequest
=
function
()
{
// todo: peacekim:: check if it's okay for loginID
console
.
log
(
// instead of globalUserInfo.loginId
"peacekim:: FermiWebSocketBridge.captureRequest globalUserInfo.loginId: "
+
globalUserInfo
.
loginId
);
fw
.
sendToMsg
(
"others"
,
"CAPTURE_REQUEST"
,
{
fw
.
sendToMsg
(
"others"
,
"CAPTURE_REQUEST"
,
{
name
:
globalUserInfo
.
loginId
,
name
:
globalUserInfo
.
loginId
,
});
});
...
@@ -74,6 +102,12 @@ FermiWebSocketBridge.changeCollaboration = function (
...
@@ -74,6 +102,12 @@ FermiWebSocketBridge.changeCollaboration = function (
collaborationType
,
collaborationType
,
newMeetingID
newMeetingID
)
{
)
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.changeCollaboration collaborationType: "
+
collaborationType
+
", newMeetingID: "
+
newMeetingID
);
fw
.
sendToMsg
(
"others"
,
"CHANGE_COLLABORATION"
,
{
fw
.
sendToMsg
(
"others"
,
"CHANGE_COLLABORATION"
,
{
collaborationType
:
collaborationType
,
collaborationType
:
collaborationType
,
newMeetingId
:
newMeetingID
,
newMeetingId
:
newMeetingID
,
...
@@ -82,6 +116,10 @@ FermiWebSocketBridge.changeCollaboration = function (
...
@@ -82,6 +116,10 @@ FermiWebSocketBridge.changeCollaboration = function (
// CHANGE_HOST_APPLY
// CHANGE_HOST_APPLY
FermiWebSocketBridge
.
changeHostApply
=
function
()
{
FermiWebSocketBridge
.
changeHostApply
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketBridge.changeHostApply globalUserInfo.loginId: "
+
globalUserInfo
.
loginId
);
fw
.
sendToMsg
(
"others"
,
"CHANGE_HOST_APPLY"
,
{
fw
.
sendToMsg
(
"others"
,
"CHANGE_HOST_APPLY"
,
{
hostId
:
globalUserInfo
.
loginId
,
hostId
:
globalUserInfo
.
loginId
,
});
});
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/fermi-web-socket-message-handler.js
View file @
d05043cb
var
FermiWebSocketMessageHandler
=
{};
var
FermiWebSocketMessageHandler
=
{};
FermiWebSocketMessageHandler
.
bindWebSocketMessage
=
function
()
{
FermiWebSocketMessageHandler
.
bindWebSocketMessage
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.bindWebSocketMessage"
);
fw
.
socket
.
on
(
"message"
,
async
function
(
data
)
{
fw
.
socket
.
on
(
"message"
,
async
function
(
data
)
{
console
.
log
(
"peacekim:: fw socket message received, isMainman: "
+
g_isMainMan
+
", data.payload.loginId == globalUserInfo.loginId: "
+
(
data
.
payload
.
loginId
==
globalUserInfo
.
loginId
)
);
if
(
g_isMainMan
)
{
if
(
g_isMainMan
)
{
FermiWebSocketMessageHandler
.
handleMessagesToHost
(
data
);
FermiWebSocketMessageHandler
.
handleMessagesToHost
(
data
);
}
else
if
(
data
.
payload
.
loginId
==
globalUserInfo
.
loginId
)
{
}
else
if
(
data
.
payload
.
loginId
==
globalUserInfo
.
loginId
)
{
...
@@ -14,6 +22,10 @@ FermiWebSocketMessageHandler.bindWebSocketMessage = function () {
...
@@ -14,6 +22,10 @@ FermiWebSocketMessageHandler.bindWebSocketMessage = function () {
};
};
FermiWebSocketMessageHandler
.
handleMessagesToHost
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
handleMessagesToHost
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.handleMessagesToHost message: "
+
data
.
type
);
// HOSTの場合
// HOSTの場合
switch
(
data
.
type
)
{
switch
(
data
.
type
)
{
case
"CAPTURE_REQUEST"
:
case
"CAPTURE_REQUEST"
:
...
@@ -39,6 +51,10 @@ FermiWebSocketMessageHandler.handleMessagesToHost = function (data) {
...
@@ -39,6 +51,10 @@ FermiWebSocketMessageHandler.handleMessagesToHost = function (data) {
};
};
FermiWebSocketMessageHandler
.
handleMessagesToSelf
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
handleMessagesToSelf
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.handleMessagesToSelf message: "
+
data
.
type
);
// 自分自身の場合
// 自分自身の場合
switch
(
data
.
type
)
{
switch
(
data
.
type
)
{
case
"HOST_CHANGE_REQUEST"
:
case
"HOST_CHANGE_REQUEST"
:
...
@@ -58,6 +74,10 @@ FermiWebSocketMessageHandler.handleMessagesToSelf = function (data) {
...
@@ -58,6 +74,10 @@ FermiWebSocketMessageHandler.handleMessagesToSelf = function (data) {
};
};
FermiWebSocketMessageHandler
.
handleMessagesToAll
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
handleMessagesToAll
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.handleMessagesToAll message: "
+
data
.
type
);
switch
(
data
.
type
)
{
switch
(
data
.
type
)
{
case
"CHANGE_COLLABORATION"
:
case
"CHANGE_COLLABORATION"
:
FermiWebSocketMessageHandler
.
changeCollaboration
(
data
);
FermiWebSocketMessageHandler
.
changeCollaboration
(
data
);
...
@@ -100,6 +120,12 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
...
@@ -100,6 +120,12 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
// CHANGE_COLLABORATION
// CHANGE_COLLABORATION
FermiWebSocketMessageHandler
.
changeCollaboration
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
changeCollaboration
=
function
(
data
)
{
const
newMeetingID
=
data
.
payload
.
newMeetingId
;
const
newMeetingID
=
data
.
payload
.
newMeetingId
;
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.changeCollaboration newMeetingID: "
+
newMeetingID
+
", collaborationType: "
+
data
.
payload
.
collaborationType
);
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
NativeBridgeDelegate
.
exitMeetingRoom
();
NativeBridgeDelegate
.
finishPIPMode
(
true
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
...
@@ -132,6 +158,7 @@ FermiWebSocketMessageHandler.changeCollaboration = function (data) {
...
@@ -132,6 +158,7 @@ FermiWebSocketMessageHandler.changeCollaboration = function (data) {
// SHARE_FILE
// SHARE_FILE
FermiWebSocketMessageHandler
.
shareFile
=
function
()
{
FermiWebSocketMessageHandler
.
shareFile
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.shareFile"
);
CollaborationUI
.
updateScreen
(
COLLABORATION_TYPE
.
CAMERA
);
CollaborationUI
.
updateScreen
(
COLLABORATION_TYPE
.
CAMERA
);
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
FermiWebSocketBridge
.
shareFileHost
(
COLLABORATION_TYPE
.
CAMERA
);
FermiWebSocketBridge
.
shareFileHost
(
COLLABORATION_TYPE
.
CAMERA
);
...
@@ -139,12 +166,17 @@ FermiWebSocketMessageHandler.shareFile = function () {
...
@@ -139,12 +166,17 @@ FermiWebSocketMessageHandler.shareFile = function () {
// SHARE_FILE_HOST
// SHARE_FILE_HOST
FermiWebSocketMessageHandler
.
shareFileHost
=
function
()
{
FermiWebSocketMessageHandler
.
shareFileHost
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.shareFileHost"
);
CollaborationUI
.
updateScreen
(
COLLABORATION_TYPE
.
CAMERA
);
CollaborationUI
.
updateScreen
(
COLLABORATION_TYPE
.
CAMERA
);
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
};
};
// CAPTURE_REQUEST
// CAPTURE_REQUEST
FermiWebSocketMessageHandler
.
captureRequest
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
captureRequest
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.captureRequest name: "
+
data
.
payload
.
name
);
const
name
=
data
.
payload
.
name
;
const
name
=
data
.
payload
.
name
;
if
(
confirm
(
name
+
getLocalizedString
(
"request_capture"
))
==
false
)
{
if
(
confirm
(
name
+
getLocalizedString
(
"request_capture"
))
==
false
)
{
return
;
return
;
...
@@ -169,11 +201,16 @@ FermiWebSocketMessageHandler.captureRequest = function (data) {
...
@@ -169,11 +201,16 @@ FermiWebSocketMessageHandler.captureRequest = function (data) {
// HOST_CHANGE_REQUEST
// HOST_CHANGE_REQUEST
FermiWebSocketMessageHandler
.
hostChangeRequest
=
function
()
{
FermiWebSocketMessageHandler
.
hostChangeRequest
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.hostChangeRequest"
);
FermiWebSocketBridge
.
requestHostChange
();
FermiWebSocketBridge
.
requestHostChange
();
};
};
// HOST_CHANGE_RESPONSE
// HOST_CHANGE_RESPONSE
FermiWebSocketMessageHandler
.
hostChangeResponse
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
hostChangeResponse
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.hostChangeResponse loginID: "
+
data
.
payload
.
loginId
);
const
isAndroid
=
data
.
payload
.
isAndroid
;
const
isAndroid
=
data
.
payload
.
isAndroid
;
const
isAble
=
data
.
payload
.
isAble
;
const
isAble
=
data
.
payload
.
isAble
;
if
(
if
(
...
@@ -193,6 +230,7 @@ FermiWebSocketMessageHandler.hostChangeResponse = function (data) {
...
@@ -193,6 +230,7 @@ FermiWebSocketMessageHandler.hostChangeResponse = function (data) {
// PIP_END_REQUEST
// PIP_END_REQUEST
FermiWebSocketMessageHandler
.
pipEndRequest
=
function
()
{
FermiWebSocketMessageHandler
.
pipEndRequest
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.pipEndRequest"
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
if
(
deviceInfo
.
isAndroid
())
{
if
(
deviceInfo
.
isAndroid
())
{
$
(
".pip_indicator"
).
addClass
(
"none"
);
$
(
".pip_indicator"
).
addClass
(
"none"
);
...
@@ -201,6 +239,10 @@ FermiWebSocketMessageHandler.pipEndRequest = function () {
...
@@ -201,6 +239,10 @@ FermiWebSocketMessageHandler.pipEndRequest = function () {
// API_SEND_OWNER_CHANGE_COMPLETE
// API_SEND_OWNER_CHANGE_COMPLETE
FermiWebSocketMessageHandler
.
apiSendOwnerChangeComplete
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
apiSendOwnerChangeComplete
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.apiSendOwnerChangeComplete, host: "
+
data
.
payload
.
host
);
penOff
();
penOff
();
if
(
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
if
(
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
recordStop
(
function
()
{});
recordStop
(
function
()
{});
...
@@ -214,18 +256,29 @@ FermiWebSocketMessageHandler.apiSendOwnerChangeComplete = function (data) {
...
@@ -214,18 +256,29 @@ FermiWebSocketMessageHandler.apiSendOwnerChangeComplete = function (data) {
// API_SEND_OWNER_CHANGE_CONFIRM
// API_SEND_OWNER_CHANGE_CONFIRM
FermiWebSocketMessageHandler
.
apiSendOwnerChangeConfirm
=
function
()
{
FermiWebSocketMessageHandler
.
apiSendOwnerChangeConfirm
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.apiSendOwnerChangeConfirm"
);
waitMillisecond
(
500
);
waitMillisecond
(
500
);
removeOldLocalVideo
(
g_localStream
);
removeOldLocalVideo
(
g_localStream
);
};
};
// CHANGE_HOST_APPLY
// CHANGE_HOST_APPLY
FermiWebSocketMessageHandler
.
changeHostApplyForNotHost
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
changeHostApplyForNotHost
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.changeHostApplyForNotHost"
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
waitMillisecond
(
500
);
waitMillisecond
(
500
);
};
};
// CHANGE_HOST_APPLY
// CHANGE_HOST_APPLY
FermiWebSocketMessageHandler
.
changeHostApplyForHost
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
changeHostApplyForHost
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.changeHostApplyForNotHost hostID: "
+
data
.
payload
.
hostId
);
const
hostID
=
data
.
payload
.
hostId
;
const
hostID
=
data
.
payload
.
hostId
;
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
...
@@ -248,11 +301,19 @@ FermiWebSocketMessageHandler.changeHostApplyForHost = function (data) {
...
@@ -248,11 +301,19 @@ FermiWebSocketMessageHandler.changeHostApplyForHost = function (data) {
// HOST_REQUEST_DONE
// HOST_REQUEST_DONE
FermiWebSocketMessageHandler
.
hostRequestDone
=
function
()
{
FermiWebSocketMessageHandler
.
hostRequestDone
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.hostRequestDone"
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
};
};
// HOST_REQUEST_REJECT
// HOST_REQUEST_REJECT
FermiWebSocketMessageHandler
.
hostRequestReject
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
hostRequestReject
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.hostRequestReject hostID: "
+
data
.
payload
.
hostId
+
", loginID: "
+
globalUserInfo
.
loginId
);
if
(
data
.
payload
.
hostId
==
globalUserInfo
.
loginId
)
{
if
(
data
.
payload
.
hostId
==
globalUserInfo
.
loginId
)
{
alert
(
"REJECT for owner user"
);
alert
(
"REJECT for owner user"
);
}
}
...
@@ -261,6 +322,10 @@ FermiWebSocketMessageHandler.hostRequestReject = function (data) {
...
@@ -261,6 +322,10 @@ FermiWebSocketMessageHandler.hostRequestReject = function (data) {
// GET_COLLABORATION_TYPE
// GET_COLLABORATION_TYPE
FermiWebSocketMessageHandler
.
getCollaborationType
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
getCollaborationType
=
function
(
data
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.getCollaborationType loginID: "
+
data
.
payload
.
loginId
);
FermiWebSocketBridge
.
getCollaborationTypeResponse
(
data
.
payload
.
loginId
);
FermiWebSocketBridge
.
getCollaborationTypeResponse
(
data
.
payload
.
loginId
);
};
};
...
@@ -268,6 +333,14 @@ FermiWebSocketMessageHandler.getCollaborationType = function (data) {
...
@@ -268,6 +333,14 @@ FermiWebSocketMessageHandler.getCollaborationType = function (data) {
FermiWebSocketMessageHandler
.
getCollaborationTypeResponse
=
function
(
data
)
{
FermiWebSocketMessageHandler
.
getCollaborationTypeResponse
=
function
(
data
)
{
const
collaborationType
=
data
.
payload
.
collaborationType
;
const
collaborationType
=
data
.
payload
.
collaborationType
;
const
meetingID
=
data
.
payload
.
newMeetingId
;
const
meetingID
=
data
.
payload
.
newMeetingId
;
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.getCollaborationTypeResponse globalUserInfo.collaborationType: "
+
globalUserInfo
.
collaborationType
+
", data.payload.collaborationType: "
+
data
.
payload
.
collaborationType
+
", meetingID: "
+
meetingID
);
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
(
collaborationType
);
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
(
collaborationType
);
globalUserInfo
.
meetingID
=
meetingID
;
globalUserInfo
.
meetingID
=
meetingID
;
CollaborationUI
.
updateScreen
(
globalUserInfo
.
collaborationType
);
CollaborationUI
.
updateScreen
(
globalUserInfo
.
collaborationType
);
...
@@ -284,6 +357,7 @@ FermiWebSocketMessageHandler.getCollaborationTypeResponse = function (data) {
...
@@ -284,6 +357,7 @@ FermiWebSocketMessageHandler.getCollaborationTypeResponse = function (data) {
// API_WELCOME
// API_WELCOME
FermiWebSocketMessageHandler
.
apiWelcome
=
function
()
{
FermiWebSocketMessageHandler
.
apiWelcome
=
function
()
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.apiWelcome"
);
FermiWebSocketBridge
.
getCollaborationType
();
FermiWebSocketBridge
.
getCollaborationType
();
globalUserInfo
.
joinType
=
COLLABORATION_JOIN_TYPE
.
ATTENDEE
;
globalUserInfo
.
joinType
=
COLLABORATION_JOIN_TYPE
.
ATTENDEE
;
};
};
...
@@ -291,6 +365,10 @@ FermiWebSocketMessageHandler.apiWelcome = function () {
...
@@ -291,6 +365,10 @@ FermiWebSocketMessageHandler.apiWelcome = function () {
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
=
function
(
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
=
function
(
collaborationType
collaborationType
)
{
)
{
console
.
log
(
"peacekim:: FermiWebSocketMessageHandler.updateJoinChangeCollaboration collaborationType: "
+
collaborationType
);
if
(
if
(
deviceInfo
.
isAndroid
()
&&
deviceInfo
.
isAndroid
()
&&
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/share-bind-button-action.js
View file @
d05043cb
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Toggle Feature Buttons
* Toggle Feature Buttons
**************************/
**************************/
function
togglePen
()
{
function
togglePen
()
{
console
.
log
(
"peacekim:: share-bind-button-action - togglepend()"
);
$
(
"#coviewPenCtrBtn"
).
click
();
$
(
"#coviewPenCtrBtn"
).
click
();
if
(
$
(
"#penBtn .pen"
).
hasClass
(
"disable"
))
{
if
(
$
(
"#penBtn .pen"
).
hasClass
(
"disable"
))
{
$
(
"#penBtn .pen"
).
removeClass
(
"disable"
);
$
(
"#penBtn .pen"
).
removeClass
(
"disable"
);
...
@@ -11,6 +12,7 @@ function togglePen() {
...
@@ -11,6 +12,7 @@ function togglePen() {
}
}
function
penOff
()
{
function
penOff
()
{
console
.
log
(
"peacekim:: share-bind-button-action - penOff()"
);
if
(
!
$
(
"#penBtn .pen"
).
hasClass
(
"disable"
))
{
if
(
!
$
(
"#penBtn .pen"
).
hasClass
(
"disable"
))
{
$
(
"#coviewPenCtrBtn"
).
click
();
$
(
"#coviewPenCtrBtn"
).
click
();
$
(
"#penBtn .pen"
).
addClass
(
"disable"
);
$
(
"#penBtn .pen"
).
addClass
(
"disable"
);
...
@@ -18,14 +20,19 @@ function penOff() {
...
@@ -18,14 +20,19 @@ function penOff() {
}
}
function
togglePhotoOpenPlaceHolder
()
{
function
togglePhotoOpenPlaceHolder
()
{
console
.
log
(
"peacekim:: share-bind-button-action - togglePhotoOpenPlaceHolder()"
);
$
(
"#open_file_upload"
).
trigger
(
"click"
);
$
(
"#open_file_upload"
).
trigger
(
"click"
);
}
}
function
toggleEraser
()
{
function
toggleEraser
()
{
console
.
log
(
"peacekim:: share-bind-button-action - toggleEraser()"
);
$
(
"#coviewEraserCtrBtn"
).
click
();
$
(
"#coviewEraserCtrBtn"
).
click
();
}
}
function
toggleCapture
()
{
function
toggleCapture
()
{
console
.
log
(
"peacekim:: share-bind-button-action - toggleCapture()"
);
if
(
$
(
"#recordBtn"
).
hasClass
(
"bg_red"
))
{
if
(
$
(
"#recordBtn"
).
hasClass
(
"bg_red"
))
{
screenLock
();
screenLock
();
recordStop
(
function
()
{
recordStop
(
function
()
{
...
@@ -38,20 +45,24 @@ function toggleCapture() {
...
@@ -38,20 +45,24 @@ function toggleCapture() {
}
}
function
toggleCaptureRequest
()
{
function
toggleCaptureRequest
()
{
console
.
log
(
"peacekim:: share-bind-button-action - toggleCaptureRequest()"
);
FermiWebSocketBridge
.
captureRequest
();
FermiWebSocketBridge
.
captureRequest
();
}
}
function
micOn
()
{
function
micOn
()
{
console
.
log
(
"peacekim:: share-bind-button-action - micOn()"
);
coview_api
.
MicMuteControl
(
"off"
);
coview_api
.
MicMuteControl
(
"off"
);
$
(
"#micBtn .voice"
).
removeClass
(
"disable"
);
$
(
"#micBtn .voice"
).
removeClass
(
"disable"
);
}
}
function
micOff
()
{
function
micOff
()
{
console
.
log
(
"peacekim:: share-bind-button-action - micOff()"
);
coview_api
.
MicMuteControl
(
"on"
);
coview_api
.
MicMuteControl
(
"on"
);
$
(
"#micBtn .voice"
).
addClass
(
"disable"
);
$
(
"#micBtn .voice"
).
addClass
(
"disable"
);
}
}
function
toggleMic
()
{
function
toggleMic
()
{
console
.
log
(
"peacekim:: share-bind-button-action - toggleMic()"
);
if
(
$
(
"#micBtn .voice"
).
hasClass
(
"disable"
))
{
if
(
$
(
"#micBtn .voice"
).
hasClass
(
"disable"
))
{
micOn
();
micOn
();
}
else
{
}
else
{
...
@@ -63,12 +74,14 @@ function toggleMic() {
...
@@ -63,12 +74,14 @@ function toggleMic() {
* レコード関連
* レコード関連
*************/
*************/
function
recordStart
()
{
function
recordStart
()
{
console
.
log
(
"peacekim:: share-bind-button-action - recordStart()"
);
MainManRecord
(
"on"
);
MainManRecord
(
"on"
);
$
(
"#recordBtn .record"
).
addClass
(
"disable"
);
$
(
"#recordBtn .record"
).
addClass
(
"disable"
);
$
(
".flash-txt"
).
addClass
(
"on"
);
$
(
".flash-txt"
).
addClass
(
"on"
);
}
}
function
recordFinished
()
{
function
recordFinished
()
{
console
.
log
(
"peacekim:: share-bind-button-action - recordFinished()"
);
$
(
"#recordBtn .record"
).
removeClass
(
"disable"
);
$
(
"#recordBtn .record"
).
removeClass
(
"disable"
);
$
(
".flash-txt"
).
removeClass
(
"on"
);
$
(
".flash-txt"
).
removeClass
(
"on"
);
// ロック画面の削除
// ロック画面の削除
...
@@ -76,6 +89,7 @@ function recordFinished() {
...
@@ -76,6 +89,7 @@ function recordFinished() {
}
}
function
toggleRecord
()
{
function
toggleRecord
()
{
console
.
log
(
"peacekim:: share-bind-button-action - toggleRecord()"
);
if
(
!
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
if
(
!
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
recordStart
();
recordStart
();
}
else
{
}
else
{
...
@@ -86,6 +100,7 @@ function toggleRecord() {
...
@@ -86,6 +100,7 @@ function toggleRecord() {
}
}
function
recordStop
(
callback
)
{
function
recordStop
(
callback
)
{
console
.
log
(
"peacekim:: share-bind-button-action - recordStop()"
);
if
(
!
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
if
(
!
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
callback
();
callback
();
return
;
return
;
...
@@ -103,6 +118,9 @@ function recordStop(callback) {
...
@@ -103,6 +118,9 @@ function recordStop(callback) {
}
}
function
mainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
function
mainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
console
.
log
(
"peacekim:: share-bind-button-action - mainManRecordWithCollaboration()"
);
try
{
try
{
mediaRecorder
.
stop
();
mediaRecorder
.
stop
();
}
catch
(
exeption
)
{
}
catch
(
exeption
)
{
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/share-event-listener.js
View file @
d05043cb
...
@@ -2,7 +2,11 @@ var CoviewBridge = {};
...
@@ -2,7 +2,11 @@ var CoviewBridge = {};
var
CollaborationFeature
=
{};
var
CollaborationFeature
=
{};
CoviewBridge
.
bindReadyEvent
=
function
()
{
CoviewBridge
.
bindReadyEvent
=
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.bindReadyEvent"
);
coview_api
.
addEventListener
(
"ready"
,
function
()
{
coview_api
.
addEventListener
(
"ready"
,
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.bindReadyEvent coview_api.addEventListener ready"
);
CoviewBridge
.
bindFermiWebSocketOpenned
();
CoviewBridge
.
bindFermiWebSocketOpenned
();
// add login ID if not exist
// add login ID if not exist
...
@@ -14,13 +18,21 @@ CoviewBridge.bindReadyEvent = function () {
...
@@ -14,13 +18,21 @@ CoviewBridge.bindReadyEvent = function () {
};
};
CoviewBridge
.
bindFermiWebSocketOpenned
=
function
()
{
CoviewBridge
.
bindFermiWebSocketOpenned
=
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.bindFermiWebSocketOpenned"
);
wc_api
.
addEventListener
(
"open"
,
async
function
(
event
)
{
wc_api
.
addEventListener
(
"open"
,
async
function
(
event
)
{
console
.
log
(
"peacekim:: CoviewBridge.bindFermiWebSocketOpenned wc_api.addEventListener open"
);
FermiWebSocketMessageHandler
.
bindWebSocketMessage
();
FermiWebSocketMessageHandler
.
bindWebSocketMessage
();
});
});
};
};
CoviewBridge
.
bindStartEvent
=
function
()
{
CoviewBridge
.
bindStartEvent
=
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.bindStartEvent"
);
coview_api
.
addEventListener
(
"start"
,
function
()
{
coview_api
.
addEventListener
(
"start"
,
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.bindStartEvent coview_api.addEventListener(start)"
);
CollaborationFeature
.
enableScrollLock
();
CollaborationFeature
.
enableScrollLock
();
CollaborationUI
.
hideLoadingIndicator
();
CollaborationUI
.
hideLoadingIndicator
();
});
});
...
@@ -30,6 +42,7 @@ CoviewBridge.bindStartEvent = function () {
...
@@ -30,6 +42,7 @@ CoviewBridge.bindStartEvent = function () {
* Scroll Lock
* Scroll Lock
**************/
**************/
CollaborationFeature
.
scrollLock
=
function
(
e
)
{
CollaborationFeature
.
scrollLock
=
function
(
e
)
{
console
.
log
(
"peacekim:: CollaborationFeature.scrollLock"
);
if
(
deviceInfo
.
isiOS
())
{
if
(
deviceInfo
.
isiOS
())
{
if
(
if
(
$
(
e
.
target
).
closest
(
".add_user_modal"
).
length
>
0
||
$
(
e
.
target
).
closest
(
".add_user_modal"
).
length
>
0
||
...
@@ -44,6 +57,7 @@ CollaborationFeature.scrollLock = function (e) {
...
@@ -44,6 +57,7 @@ CollaborationFeature.scrollLock = function (e) {
};
};
CollaborationFeature
.
enableScrollLock
=
function
()
{
CollaborationFeature
.
enableScrollLock
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.enableScrollLock"
);
document
document
.
getElementById
(
"collabo_main"
)
.
getElementById
(
"collabo_main"
)
.
addEventListener
(
"touchmove"
,
CollaborationFeature
.
scrollLock
,
{
.
addEventListener
(
"touchmove"
,
CollaborationFeature
.
scrollLock
,
{
...
@@ -52,6 +66,7 @@ CollaborationFeature.enableScrollLock = function () {
...
@@ -52,6 +66,7 @@ CollaborationFeature.enableScrollLock = function () {
};
};
CollaborationFeature
.
disableScrollLock
=
function
()
{
CollaborationFeature
.
disableScrollLock
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.disableScrollLock"
);
document
document
.
getElementById
(
"collabo_main"
)
.
getElementById
(
"collabo_main"
)
.
removeEventListener
(
"touchmove"
,
CollaborationFeature
.
scrollLock
,
{
.
removeEventListener
(
"touchmove"
,
CollaborationFeature
.
scrollLock
,
{
...
@@ -60,7 +75,11 @@ CollaborationFeature.disableScrollLock = function () {
...
@@ -60,7 +75,11 @@ CollaborationFeature.disableScrollLock = function () {
};
};
CoviewBridge
.
bindAllByeEvent
=
function
()
{
CoviewBridge
.
bindAllByeEvent
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindAllByeEvent"
);
coview_api
.
addEventListener
(
"allbye"
,
function
()
{
coview_api
.
addEventListener
(
"allbye"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindAllByeEvent coview_api.addEventListener(allbye)"
);
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
if
(
deviceInfo
.
isAndroid
())
{
if
(
deviceInfo
.
isAndroid
())
{
android
.
setExitHostAlert
();
android
.
setExitHostAlert
();
...
@@ -83,13 +102,21 @@ CoviewBridge.bindAllByeEvent = function () {
...
@@ -83,13 +102,21 @@ CoviewBridge.bindAllByeEvent = function () {
};
};
CoviewBridge
.
bindGuestByeEvent
=
function
()
{
CoviewBridge
.
bindGuestByeEvent
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindGuestByeEvent"
);
coview_api
.
addEventListener
(
"guestbye"
,
function
()
{
coview_api
.
addEventListener
(
"guestbye"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindGuestByeEvent coview_api.addEventListener(guestbye)"
);
CollaborationUI
.
hideLoadingIndicator
();
CollaborationUI
.
hideLoadingIndicator
();
});
});
};
};
CoviewBridge
.
bindDestroyEvent
=
function
()
{
CoviewBridge
.
bindDestroyEvent
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindDestroyEvent"
);
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindDestroyEvent coview_api.addEventListener(destroy)"
);
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
CoviewBridge
.
exitCollaboration
();
CoviewBridge
.
exitCollaboration
();
...
@@ -98,7 +125,12 @@ CoviewBridge.bindDestroyEvent = function () {
...
@@ -98,7 +125,12 @@ CoviewBridge.bindDestroyEvent = function () {
};
};
CoviewBridge
.
bindMessageEvent
=
function
()
{
CoviewBridge
.
bindMessageEvent
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.bindMessageEvent"
);
coview_api
.
addEventListener
(
"message"
,
async
function
(
event
,
json
)
{
coview_api
.
addEventListener
(
"message"
,
async
function
(
event
,
json
)
{
console
.
log
(
"peacekim:: CollaborationFeature.bindMessageEvent coview_api.addEventListener(message), api: "
+
json
.
api
);
if
(
globalUserInfo
.
isLeaved
)
{
if
(
globalUserInfo
.
isLeaved
)
{
return
;
return
;
}
}
...
@@ -120,6 +152,7 @@ CoviewBridge.bindMessageEvent = function () {
...
@@ -120,6 +152,7 @@ CoviewBridge.bindMessageEvent = function () {
if
(
json
.
resultCode
!=
200
)
{
if
(
json
.
resultCode
!=
200
)
{
break
;
break
;
}
}
console
.
log
(
"peacekim:: will call CollaborationFeature.updateHost 1"
);
CollaborationFeature
.
updateHost
();
CollaborationFeature
.
updateHost
();
// fall through
// fall through
case
"RoomMemberJoinedEvent"
:
case
"RoomMemberJoinedEvent"
:
...
@@ -168,6 +201,15 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
...
@@ -168,6 +201,15 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
globalUserInfo
.
joinType
==
COLLABORATION_JOIN_TYPE
.
ATTENDEE
;
globalUserInfo
.
joinType
==
COLLABORATION_JOIN_TYPE
.
ATTENDEE
;
const
isHost
=
globalUserInfo
.
joinType
==
COLLABORATION_JOIN_TYPE
.
HOST
;
const
isHost
=
globalUserInfo
.
joinType
==
COLLABORATION_JOIN_TYPE
.
HOST
;
console
.
log
(
"peacekim:: CollaborationFeature.didReceiveLoginResponseMessage isDocument : "
+
isDocument
+
", isAttendee: "
+
isAttendee
+
", isHost: "
+
isHost
);
if
(
isDocument
)
{
if
(
isDocument
)
{
if
(
isAttendee
)
{
if
(
isAttendee
)
{
NativeBridgeDelegate
.
startContentView
();
NativeBridgeDelegate
.
startContentView
();
...
@@ -201,11 +243,15 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
...
@@ -201,11 +243,15 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
default
:
default
:
break
;
break
;
}
}
console
.
log
(
"peacekim:: will call CollaborationFeature.updateHost 3"
);
CollaborationFeature
.
updateHost
();
CollaborationFeature
.
updateHost
();
CollaborationUI
.
moveToVideoShareArea
();
CollaborationUI
.
moveToVideoShareArea
();
};
};
CollaborationFeature
.
didReceiveCreateRoomResponseMessage
=
function
()
{
CollaborationFeature
.
didReceiveCreateRoomResponseMessage
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.didReceiveCreateRoomResponseMessage"
);
let
coviewInviteMessage
=
let
coviewInviteMessage
=
""
+
""
+
messageSeperator
+
messageSeperator
+
...
@@ -221,6 +267,9 @@ CollaborationFeature.didReceiveCreateRoomResponseMessage = function () {
...
@@ -221,6 +267,9 @@ CollaborationFeature.didReceiveCreateRoomResponseMessage = function () {
};
};
CollaborationFeature
.
didReceivedJoinRoomInfoResponseMessage
=
function
()
{
CollaborationFeature
.
didReceivedJoinRoomInfoResponseMessage
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.didReceivedJoinRoomInfoResponseMessage"
);
alert
(
getLocalizedString
(
"not_exist_sharing_call"
));
alert
(
getLocalizedString
(
"not_exist_sharing_call"
));
coview_api
.
LeaveRoom
();
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
".coview_share_area"
).
hide
();
...
@@ -229,11 +278,13 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
...
@@ -229,11 +278,13 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
};
};
CoviewBridge
.
changeHost
=
function
(
userID
)
{
CoviewBridge
.
changeHost
=
function
(
userID
)
{
console
.
log
(
"peacekim:: CoviewBridge.changeHost userID: "
+
userID
);
// call in agent_app.js
// call in agent_app.js
coview_api
.
HostChange
(
userID
);
coview_api
.
HostChange
(
userID
);
};
};
CoviewBridge
.
addLoginID
=
function
(
loginID
)
{
CoviewBridge
.
addLoginID
=
function
(
loginID
)
{
console
.
log
(
"peacekim:: CoviewBridge.addLoginID loginID: "
+
loginID
);
const
url
=
BIZ_TASK_YELL_URL
+
"/auth/getuser"
;
const
url
=
BIZ_TASK_YELL_URL
+
"/auth/getuser"
;
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
...
@@ -253,6 +304,15 @@ CoviewBridge.addLoginID = function (loginID) {
...
@@ -253,6 +304,15 @@ CoviewBridge.addLoginID = function (loginID) {
};
};
CollaborationFeature
.
updateHost
=
function
()
{
CollaborationFeature
.
updateHost
=
function
()
{
console
.
log
(
"peacekim:: CollaborationFeature.updateHost g_isMainMan: "
+
g_isMainMan
+
", g_isMainManUsername: "
+
g_isMainManUsername
+
", g_username: "
+
g_username
);
if
(
g_isMainMan
)
{
if
(
g_isMainMan
)
{
CollaborationUI
.
showHostButtons
();
CollaborationUI
.
showHostButtons
();
}
else
{
}
else
{
...
@@ -265,7 +325,7 @@ CollaborationFeature.updateHost = function () {
...
@@ -265,7 +325,7 @@ CollaborationFeature.updateHost = function () {
};
};
CollaborationUI
.
showHostButtons
=
function
()
{
CollaborationUI
.
showHostButtons
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.showHostButtons"
);
$
(
".host_contents"
).
removeClass
(
"none"
);
$
(
".host_contents"
).
removeClass
(
"none"
);
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
$
(
".photo_select_button"
).
removeClass
(
"none"
);
$
(
".photo_select_button"
).
removeClass
(
"none"
);
...
@@ -277,7 +337,7 @@ CollaborationUI.showHostButtons = function () {
...
@@ -277,7 +337,7 @@ CollaborationUI.showHostButtons = function () {
};
};
CollaborationUI
.
hideHostButtons
=
function
()
{
CollaborationUI
.
hideHostButtons
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.hideHostButtons"
);
$
(
".host_contents"
).
addClass
(
"none"
);
$
(
".host_contents"
).
addClass
(
"none"
);
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
$
(
".photo_select_button"
).
addClass
(
"none"
);
$
(
".photo_select_button"
).
addClass
(
"none"
);
...
@@ -289,6 +349,8 @@ CollaborationUI.hideHostButtons = function () {
...
@@ -289,6 +349,8 @@ CollaborationUI.hideHostButtons = function () {
};
};
CollaborationUI
.
showHostMark
=
function
(
hostName
)
{
CollaborationUI
.
showHostMark
=
function
(
hostName
)
{
console
.
log
(
"peacekim:: CollaborationUI.showHostMark hostName: "
+
hostName
);
// remove all host mark
// remove all host mark
attendingUsers
.
forEach
(
function
(
userName
)
{
attendingUsers
.
forEach
(
function
(
userName
)
{
const
user
=
"#collaboration_user_"
+
getReplacedLoginId
(
userName
);
const
user
=
"#collaboration_user_"
+
getReplacedLoginId
(
userName
);
...
@@ -310,6 +372,7 @@ CollaborationUI.showHostMark = function (hostName) {
...
@@ -310,6 +372,7 @@ CollaborationUI.showHostMark = function (hostName) {
};
};
function
captureAndShareImage
(
urls
,
changeHostName
)
{
function
captureAndShareImage
(
urls
,
changeHostName
)
{
console
.
log
(
"peacekim:: share-event-listener.js captureAndShareImage"
);
addCaptureEffect
();
addCaptureEffect
();
$
(
this
).
removeClass
(
"on"
);
$
(
this
).
removeClass
(
"on"
);
var
w
,
h
;
var
w
,
h
;
...
@@ -379,6 +442,7 @@ function captureAndShareImage(urls, changeHostName) {
...
@@ -379,6 +442,7 @@ function captureAndShareImage(urls, changeHostName) {
}
}
CollaborationUI
.
configureCanvasSize
=
function
(
canvas
)
{
CollaborationUI
.
configureCanvasSize
=
function
(
canvas
)
{
console
.
log
(
"peacekim:: CollaborationUI.configureCanvasSize"
);
const
canvasWrap
=
$
(
".canvas_wrap"
);
const
canvasWrap
=
$
(
".canvas_wrap"
);
const
canvasWidth
=
$
(
canvas
).
attr
(
"width"
);
const
canvasWidth
=
$
(
canvas
).
attr
(
"width"
);
const
canvasHeight
=
$
(
canvas
).
attr
(
"height"
);
const
canvasHeight
=
$
(
canvas
).
attr
(
"height"
);
...
@@ -402,10 +466,16 @@ CollaborationUI.configureCanvasSize = function (canvas) {
...
@@ -402,10 +466,16 @@ CollaborationUI.configureCanvasSize = function (canvas) {
};
};
function
getReplacedLoginId
(
loginId
)
{
function
getReplacedLoginId
(
loginId
)
{
console
.
log
(
"peacekim:: share-event-listener.js getReplacedLoginId loginID: "
+
loginId
);
return
loginId
.
replaceAll
(
globalUserInfo
.
shopName
+
"_"
,
""
);
return
loginId
.
replaceAll
(
globalUserInfo
.
shopName
+
"_"
,
""
);
}
}
CoviewBridge
.
exitCollaboration
=
function
()
{
CoviewBridge
.
exitCollaboration
=
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.exitCollaboration g_isMainMan: "
+
g_isMainMan
);
CollaborationFeature
.
disableScrollLock
();
CollaborationFeature
.
disableScrollLock
();
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
...
@@ -424,6 +494,7 @@ CoviewBridge.exitCollaboration = function () {
...
@@ -424,6 +494,7 @@ CoviewBridge.exitCollaboration = function () {
};
};
CoviewBridge
.
finishCollaboration
=
function
()
{
CoviewBridge
.
finishCollaboration
=
function
()
{
console
.
log
(
"peacekim:: CoviewBridge.finishCollaboration"
);
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
coview_api
.
LeaveRoom
();
coview_api
.
LeaveRoom
();
if
(
coview_api
.
getRoomUsers
())
{
if
(
coview_api
.
getRoomUsers
())
{
...
@@ -441,6 +512,10 @@ CoviewBridge.finishCollaboration = function () {
...
@@ -441,6 +512,10 @@ CoviewBridge.finishCollaboration = function () {
// Display User List
// Display User List
CollaborationUI
.
refreshJoinedCollaboration
=
function
(
loginIDList
)
{
CollaborationUI
.
refreshJoinedCollaboration
=
function
(
loginIDList
)
{
console
.
log
(
"peacekim:: CollaborationUI.refreshJoinedCollaboration loginIDList: "
+
loginIDList
);
for
(
var
count
=
0
;
count
<
loginIDList
.
length
;
count
++
)
{
for
(
var
count
=
0
;
count
<
loginIDList
.
length
;
count
++
)
{
loginIDList
[
count
]
=
loginIDList
[
count
].
replaceAll
(
loginIDList
[
count
]
=
loginIDList
[
count
].
replaceAll
(
globalUserInfo
.
shopName
+
"_"
,
globalUserInfo
.
shopName
+
"_"
,
...
@@ -481,6 +556,7 @@ CollaborationUI.refreshJoinedCollaboration = function (loginIDList) {
...
@@ -481,6 +556,7 @@ CollaborationUI.refreshJoinedCollaboration = function (loginIDList) {
};
};
CollaborationUI
.
moveToVideoShareArea
=
function
()
{
CollaborationUI
.
moveToVideoShareArea
=
function
()
{
console
.
log
(
"peacekim:: CollaborationUI.moveToVideoShareArea"
);
CollaborationUI
.
showLoadingIndicator
();
CollaborationUI
.
showLoadingIndicator
();
$
(
".coview_share_area"
).
show
();
$
(
".coview_share_area"
).
show
();
$
(
"#collabo_main"
).
removeClass
(
"none"
);
$
(
"#collabo_main"
).
removeClass
(
"none"
);
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/collaboration/share.js
View file @
d05043cb
...
@@ -7,6 +7,7 @@ var isBoard = false;
...
@@ -7,6 +7,7 @@ var isBoard = false;
var
backgroundFileName
;
var
backgroundFileName
;
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
console
.
log
(
"peacekim:: share.js DOMContentLoaded"
);
coview_api
.
Init
({
coview_api
.
Init
({
coview_api_srv_addr
:
BIZ_TASK_YELL_URL
,
coview_api_srv_addr
:
BIZ_TASK_YELL_URL
,
coview_wrap_id
:
"coviewShare"
,
coview_wrap_id
:
"coviewShare"
,
...
@@ -28,7 +29,9 @@ document.addEventListener("DOMContentLoaded", function () {
...
@@ -28,7 +29,9 @@ document.addEventListener("DOMContentLoaded", function () {
// call from collaboration_overlay_menu.html and collaboration.html
// call from collaboration_overlay_menu.html and collaboration.html
function
changeCollaboration
(
collaborationType
)
{
function
changeCollaboration
(
collaborationType
)
{
console
.
log
(
"peacekim:: share.js changeCollaboration collaborationType: "
+
collaborationType
);
recordStop
(
function
()
{
recordStop
(
function
()
{
console
.
log
(
"peacekim:: share.js changeCollaboration did recordStop"
);
var
newMeetingID
=
0
;
var
newMeetingID
=
0
;
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
NativeBridgeDelegate
.
exitMeetingRoom
();
...
@@ -76,6 +79,7 @@ function changeCollaboration(collaborationType) {
...
@@ -76,6 +79,7 @@ function changeCollaboration(collaborationType) {
}
}
CollaborationUI
.
updateScreen
=
async
function
(
collaborationType
)
{
CollaborationUI
.
updateScreen
=
async
function
(
collaborationType
)
{
console
.
log
(
"peacekim:: CollaborationUI.updateScreen"
);
$
(
"#coviewEraserCtrBtn"
).
click
();
$
(
"#coviewEraserCtrBtn"
).
click
();
if
(
$
(
".user_btn"
).
hasClass
(
"hide"
))
{
if
(
$
(
".user_btn"
).
hasClass
(
"hide"
))
{
$
(
".user_btn"
).
click
();
$
(
".user_btn"
).
click
();
...
@@ -116,6 +120,7 @@ CollaborationUI.updateScreen = async function (collaborationType) {
...
@@ -116,6 +120,7 @@ CollaborationUI.updateScreen = async function (collaborationType) {
// call from modal_collabo_host_request.html
// call from modal_collabo_host_request.html
function
applyForHostChange
()
{
function
applyForHostChange
()
{
console
.
log
(
"peacekim:: share.js applyForHostChange"
);
if
(
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
deviceInfo
.
androidVersion
<
ANDROID_SDK_VERSION
.
O
&&
deviceInfo
.
androidVersion
<
ANDROID_SDK_VERSION
.
O
&&
...
@@ -139,6 +144,7 @@ function getFermiLoginId(loginId) {
...
@@ -139,6 +144,7 @@ function getFermiLoginId(loginId) {
}
}
function
screenLock
()
{
function
screenLock
()
{
console
.
log
(
"peacekim:: share.js screenLock"
);
// ロック用のdivを生成
// ロック用のdivを生成
const
element
=
document
.
createElement
(
"div"
);
const
element
=
document
.
createElement
(
"div"
);
element
.
id
=
"screenLock"
;
element
.
id
=
"screenLock"
;
...
...
This diff is collapsed.
Click to expand it.
public_new/js/views/contact/namecard.js
View file @
d05043cb
var
Namecard
=
{};
var
Namecard
=
{};
Namecard
.
makeNameCard
=
function
(
shopMemberID
)
{
Namecard
.
makeNameCard
=
function
(
shopMemberID
)
{
console
.
log
(
"peacekim:: Namecard.makeNameCard shopMemberID: "
+
shopMemberID
);
if
(
currentUserInfo
.
shopMemberID
==
shopMemberID
)
{
if
(
currentUserInfo
.
shopMemberID
==
shopMemberID
)
{
return
;
return
;
}
}
...
@@ -30,6 +31,7 @@ Namecard.makeNameCard = function (shopMemberID) {
...
@@ -30,6 +31,7 @@ Namecard.makeNameCard = function (shopMemberID) {
// template_user_name_card.html
// template_user_name_card.html
Namecard
.
startChat
=
function
(
userShopMemberID
,
userName
)
{
Namecard
.
startChat
=
function
(
userShopMemberID
,
userName
)
{
console
.
log
(
"peacekim:: Namecard.startChat userShopMemberID: "
+
userShopMemberID
+
", userName: "
+
userName
);
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
let
userIDList
=
[];
let
userIDList
=
[];
userIDList
.
push
(
userShopMemberID
);
userIDList
.
push
(
userShopMemberID
);
...
@@ -47,6 +49,7 @@ Namecard.startChat = function (userShopMemberID, userName) {
...
@@ -47,6 +49,7 @@ Namecard.startChat = function (userShopMemberID, userName) {
// template_user_name_card.html
// template_user_name_card.html
Namecard
.
startVoice
=
function
(
userShopMemberID
,
userName
)
{
Namecard
.
startVoice
=
function
(
userShopMemberID
,
userName
)
{
console
.
log
(
"peacekim:: Namecard.startVoice userShopMemberID: "
+
userShopMemberID
+
", userName: "
+
userName
);
Common
.
showLoadingIndicator
();
Common
.
showLoadingIndicator
();
let
userIDList
=
[];
let
userIDList
=
[];
userIDList
.
push
(
userShopMemberID
);
userIDList
.
push
(
userShopMemberID
);
...
@@ -63,6 +66,12 @@ Namecard.startVoice = function (userShopMemberID, userName) {
...
@@ -63,6 +66,12 @@ Namecard.startVoice = function (userShopMemberID, userName) {
};
};
Namecard
.
favoriteUserChange
=
function
(
shopMemberID
,
star
)
{
Namecard
.
favoriteUserChange
=
function
(
shopMemberID
,
star
)
{
console
.
log
(
"peacekim:: Namecard.startVoice shopMemberID: "
+
shopMemberID
+
", star: "
+
star
);
if
(
$
(
star
).
hasClass
(
"active"
))
{
if
(
$
(
star
).
hasClass
(
"active"
))
{
Namecard
.
removeFavoriteUser
(
shopMemberID
);
Namecard
.
removeFavoriteUser
(
shopMemberID
);
}
else
if
(
$
(
star
).
hasClass
(
"disable"
))
{
}
else
if
(
$
(
star
).
hasClass
(
"disable"
))
{
...
@@ -86,6 +95,7 @@ Namecard.removeFavoriteUser = function (shopMemberID) {
...
@@ -86,6 +95,7 @@ Namecard.removeFavoriteUser = function (shopMemberID) {
};
};
Namecard
.
insertFavoriteUser
=
function
(
shopMemberID
)
{
Namecard
.
insertFavoriteUser
=
function
(
shopMemberID
)
{
console
.
log
(
"peacekim:: Namecard.insertFavoriteUser shopMemberID: "
+
shopMemberID
);
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
const
result
=
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberID
);
const
result
=
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberID
);
...
@@ -100,10 +110,12 @@ Namecard.insertFavoriteUser = function (shopMemberID) {
...
@@ -100,10 +110,12 @@ Namecard.insertFavoriteUser = function (shopMemberID) {
};
};
Namecard
.
refreshForOnline
=
function
()
{
Namecard
.
refreshForOnline
=
function
()
{
console
.
log
(
"peacekim:: Namecard.refreshForOnline"
);
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
false
);
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
false
);
};
};
Namecard
.
refreshForOffline
=
function
()
{
Namecard
.
refreshForOffline
=
function
()
{
console
.
log
(
"peacekim:: Namecard.refreshForOffline"
);
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
true
);
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
true
);
};
};
...
...
This diff is collapsed.
Click to expand it.
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