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
b952b542
Commit
b952b542
authored
Jul 08, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Divded all delegates and datasource from native value
parent
91c488ee
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
565 additions
and
658 deletions
+565
-658
public_new/archive.html
+2
-3
public_new/archive_detail.html
+20
-18
public_new/chat.html
+2
-3
public_new/chat_add_user.html
+5
-5
public_new/chat_add_user_confirm.html
+2
-3
public_new/chat_change_room_name.html
+2
-3
public_new/chat_make_room.html
+4
-5
public_new/chat_make_room_confirm.html
+2
-3
public_new/chat_room.html
+2
-3
public_new/collaboration.html
+8
-11
public_new/collaboration_documents.html
+5
-11
public_new/collaboration_picture.html
+5
-11
public_new/collaboration_video.html
+5
-11
public_new/collaboration_voice.html
+5
-11
public_new/collaboration_whiteboard.html
+5
-10
public_new/contact.html
+6
-11
public_new/js/archive.js
+1
-1
public_new/js/chat-add-user.js
+3
-3
public_new/js/chat-db-foriOS.js
+0
-106
public_new/js/chat-db.js
+0
-306
public_new/js/chat-room.js
+1
-1
public_new/js/chat-ui-collaboration.js
+10
-20
public_new/js/chat-ui.js
+38
-63
public_new/js/chat-util.js
+0
-2
public_new/js/chat.js
+3
-3
public_new/js/chatMakeRoom.js
+3
-3
public_new/js/common/native-bridge-datasource.js
+415
-1
public_new/js/contact.js
+3
-3
public_new/js/share.js
+3
-17
public_new/js/sockets/chat-websocket-message.js
+5
-7
No files found.
public_new/archive.html
View file @
b952b542
...
@@ -108,11 +108,10 @@
...
@@ -108,11 +108,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- view -->
<!-- view -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/archive_detail.html
View file @
b952b542
...
@@ -17,21 +17,6 @@
...
@@ -17,21 +17,6 @@
<link
rel=
"stylesheet"
href=
"./css/font-awesome.css"
>
<link
rel=
"stylesheet"
href=
"./css/font-awesome.css"
>
</head>
</head>
<script>
var
archiveId
;
window
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
var
urlPrm
=
new
Object
;
var
urlSearch
=
location
.
search
.
substring
(
1
).
split
(
'&'
);
var
kv
=
urlSearch
[
0
].
split
(
'='
);
urlPrm
[
kv
[
0
]]
=
kv
[
1
];
archiveId
=
urlPrm
.
archiveId
if
(
typeof
(
android
)
!=
"undefined"
)
{
}
else
{
CHAT_UI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
}
});
</script>
<body>
<body>
<!-- ナビメニュー -->
<!-- ナビメニュー -->
...
@@ -81,12 +66,12 @@
...
@@ -81,12 +66,12 @@
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- view -->
<!-- view -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/archive.js"
></script>
<script
src=
"./js/archive.js"
></script>
<!-- Template archive-detail -->
<!-- Template archive-detail -->
...
@@ -215,6 +200,22 @@
...
@@ -215,6 +200,22 @@
CHAT_UI
.
refreshArchiveDetailScreen
(
archiveId
);
CHAT_UI
.
refreshArchiveDetailScreen
(
archiveId
);
};
};
</script>
</script>
<script>
var
archiveId
;
window
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
var
urlPrm
=
new
Object
;
var
urlSearch
=
location
.
search
.
substring
(
1
).
split
(
'&'
);
var
kv
=
urlSearch
[
0
].
split
(
'='
);
urlPrm
[
kv
[
0
]]
=
kv
[
1
];
archiveId
=
urlPrm
.
archiveId
if
(
typeof
(
android
)
!=
"undefined"
)
{
}
else
{
CHAT_UI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
}
});
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
public_new/chat.html
View file @
b952b542
...
@@ -114,11 +114,10 @@
...
@@ -114,11 +114,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/chat_add_user.html
View file @
b952b542
...
@@ -142,11 +142,10 @@
...
@@ -142,11 +142,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
@@ -174,8 +173,9 @@
...
@@ -174,8 +173,9 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_DB
.
loadSelectedUsers
()
!=
""
)
{
let
selectedUsers
=
CHAT_DB
.
loadSelectedUsers
();
const
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
if
(
selectedUsers
!=
""
)
{
selectedUsers
.
forEach
(
function
(
user
)
{
selectedUsers
.
forEach
(
function
(
user
)
{
CHAT
.
globalSelectedUserList
.
push
(
user
.
shopMemberId
);
CHAT
.
globalSelectedUserList
.
push
(
user
.
shopMemberId
);
})
})
...
...
public_new/chat_add_user_confirm.html
View file @
b952b542
...
@@ -72,11 +72,10 @@
...
@@ -72,11 +72,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/chat_change_room_name.html
View file @
b952b542
...
@@ -71,11 +71,10 @@
...
@@ -71,11 +71,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/chat_make_room.html
View file @
b952b542
...
@@ -143,11 +143,10 @@
...
@@ -143,11 +143,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
@@ -176,8 +175,8 @@
...
@@ -176,8 +175,8 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_DB
.
loadSelectedUsers
()
!=
""
)
{
if
(
NativeBridgeDataSource
.
loadSelectedUsers
()
!=
""
)
{
let
selectedUsers
=
CHAT_DB
.
loadSelectedUsers
();
let
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
selectedUsers
.
forEach
(
function
(
user
)
{
selectedUsers
.
forEach
(
function
(
user
)
{
CHAT
.
globalSelectedUserList
.
push
(
user
.
shopMemberId
);
CHAT
.
globalSelectedUserList
.
push
(
user
.
shopMemberId
);
})
})
...
...
public_new/chat_make_room_confirm.html
View file @
b952b542
...
@@ -79,11 +79,10 @@
...
@@ -79,11 +79,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/chat_room.html
View file @
b952b542
...
@@ -160,11 +160,10 @@
...
@@ -160,11 +160,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
...
public_new/collaboration.html
View file @
b952b542
...
@@ -141,11 +141,10 @@
...
@@ -141,11 +141,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
@@ -203,12 +202,11 @@
...
@@ -203,12 +202,11 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
joinCollaborationType
=
CHAT_DB
.
getJoinCollaborationType
();
joinCollaborationType
=
NativeBridgeDataSource
.
getJoinCollaborationType
();
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
joinCollaborationType
=
android
.
getJoinCollaborationType
();
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
androidVersion
=
android
.
getAndroidVersion
();
androidVersion
=
android
.
getAndroidVersion
();
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
alert
(
getLocalizedString
(
'not_support_version'
));
alert
(
getLocalizedString
(
'not_support_version'
));
...
@@ -222,8 +220,7 @@
...
@@ -222,8 +220,7 @@
globalUserInfo
.
coWorkType
=
CHAT_UTIL
.
getCoviewTypeFromCollaborationType
(
joinCollaborationType
);
globalUserInfo
.
coWorkType
=
CHAT_UTIL
.
getCoviewTypeFromCollaborationType
(
joinCollaborationType
);
if
(
collaborationJoinFlg
!=
'2'
)
{
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
});
});
}
}
};
};
</script>
</script>
...
...
public_new/collaboration_documents.html
View file @
b952b542
...
@@ -84,11 +84,10 @@
...
@@ -84,11 +84,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
@@ -131,16 +130,11 @@
...
@@ -131,16 +130,11 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
}
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
DOCUMENT
;
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
DOCUMENT
;
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
});
});
};
};
</script>
</script>
</body>
</body>
...
...
public_new/collaboration_picture.html
View file @
b952b542
...
@@ -145,11 +145,10 @@
...
@@ -145,11 +145,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
@@ -194,17 +193,12 @@
...
@@ -194,17 +193,12 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
}
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
CAMERA
;
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
CAMERA
;
if
(
collaborationJoinFlg
!=
'2'
)
{
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
});
});
}
}
};
};
</script>
</script>
...
...
public_new/collaboration_video.html
View file @
b952b542
...
@@ -135,11 +135,10 @@
...
@@ -135,11 +135,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
@@ -185,17 +184,12 @@
...
@@ -185,17 +184,12 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
}
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
VIDEO
;
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
VIDEO
;
if
(
collaborationJoinFlg
!=
'2'
)
{
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
});
});
}
}
};
};
</script>
</script>
...
...
public_new/collaboration_voice.html
View file @
b952b542
...
@@ -80,11 +80,10 @@
...
@@ -80,11 +80,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
@@ -129,17 +128,12 @@
...
@@ -129,17 +128,12 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
console
.
log
(
collaborationJoinFlg
);
}
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
AUDIO
;
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
AUDIO
;
if
(
collaborationJoinFlg
!=
'2'
)
{
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
});
});
}
}
};
};
</script>
</script>
...
...
public_new/collaboration_whiteboard.html
View file @
b952b542
...
@@ -137,11 +137,10 @@
...
@@ -137,11 +137,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- Socket -->
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
@@ -187,16 +186,12 @@
...
@@ -187,16 +186,12 @@
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
if
(
CHAT_UTIL
.
isIOS
())
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
collaborationJoinFlg
=
CHAT_DB
.
getCollaborationJoinFlg
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
collaborationJoinFlg
=
android
.
getCollaborationJoinFlg
();
}
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
BOARD
;
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
BOARD
;
if
(
collaborationJoinFlg
!=
'2'
)
{
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
socket
.
emit
(
'join'
,
CHAT
.
globalLoginParameter
,
function
()
{
});
});
}
}
};
};
</script>
</script>
...
...
public_new/contact.html
View file @
b952b542
...
@@ -191,11 +191,10 @@
...
@@ -191,11 +191,10 @@
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/languages/language_en.js"
charset=
"UTF-8"
></script>
<!-- Common -->
<!-- Common -->
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/constant.js"
></script>
<script
src=
"./js/common/native-bridge-delegate.js"
></script>
<script
src=
"./js/common/native-bridge-datasource.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/common/common.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<script
src=
"./js/chat-util.js"
></script>
<!-- Model -->
<script
src=
"./js/chat-db.js"
></script>
<script
src=
"./js/chat-db-foriOS.js"
></script>
<!-- View -->
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
@@ -225,14 +224,10 @@
...
@@ -225,14 +224,10 @@
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
let
groupId
;
const
groupID
=
NativeBridgeDataSource
.
getToMoveGroupId
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
groupId
=
android
.
getToMoveGroupId
();
if
(
groupID
!=
""
&&
groupID
!=
undefined
)
{
}
else
{
CHAT_UI
.
refreshAllGroupSearch
(
groupID
);
groupId
=
CHAT_DB
.
getToMoveGroupId
();
}
if
(
groupId
!=
""
&&
groupId
!=
undefined
)
{
CHAT_UI
.
refreshAllGroupSearch
(
groupId
);
NativeBridgeDelegate
.
setToMoveGroupId
(
""
);
NativeBridgeDelegate
.
setToMoveGroupId
(
""
);
}
else
{
}
else
{
CHAT_UI
.
refreshContactScreen
();
CHAT_UI
.
refreshContactScreen
();
...
...
public_new/js/archive.js
View file @
b952b542
...
@@ -9,7 +9,7 @@ document.addEventListener("DOMContentLoaded", function () {
...
@@ -9,7 +9,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
});
ARCHIVE_UI
.
refreshSearchScreen
=
function
(
keyword
)
{
ARCHIVE_UI
.
refreshSearchScreen
=
function
(
keyword
)
{
const
archiveList
=
CHAT_DB
.
getArchiveByName
(
keyword
);
const
archiveList
=
NativeBridgeDataSource
.
getArchiveByName
(
keyword
);
const
typeImage
=
getArchiveTypeIconURL
(
archive
.
archiveType
);
const
typeImage
=
getArchiveTypeIconURL
(
archive
.
archiveType
);
getArchiveTemplate
().
then
(
function
(
archiveTemplate
)
{
getArchiveTemplate
().
then
(
function
(
archiveTemplate
)
{
...
...
public_new/js/chat-add-user.js
View file @
b952b542
...
@@ -18,17 +18,17 @@ CHAT_ADD_USER.searchUser = function (keyword) {
...
@@ -18,17 +18,17 @@ CHAT_ADD_USER.searchUser = function (keyword) {
//全グループ検索画面
//全グループ検索画面
if
(
isAllGroup
)
{
if
(
isAllGroup
)
{
//グループデータ検索
//グループデータ検索
const
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
const
groupList
=
NativeBridgeDataSource
.
getGroupByName
(
keyword
);
searchGroupData
(
groupList
,
overlayMessage
);
searchGroupData
(
groupList
,
overlayMessage
);
//ユーザデータ検索
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberNotInRoomByName
(
keyword
);
var
userList
=
NativeBridgeDataSource
.
getAllGroupShopMemberNotInRoomByName
(
keyword
);
searchUserData
(
userList
,
overlayMessage
);
searchUserData
(
userList
,
overlayMessage
);
hasNoData
=
userList
.
length
==
0
&&
groupList
.
length
==
0
;
hasNoData
=
userList
.
length
==
0
&&
groupList
.
length
==
0
;
//連絡先画面
//連絡先画面
}
else
{
}
else
{
var
userList
=
CHAT_DB
.
getMyGroupShopMemberNotInRoomByName
(
keyword
);
var
userList
=
NativeBridgeDataSource
.
getMyGroupShopMemberNotInRoomByName
(
keyword
);
searchUserData
(
userList
,
overlayMessage
);
searchUserData
(
userList
,
overlayMessage
);
hasNoData
=
userList
.
length
==
0
;
hasNoData
=
userList
.
length
==
0
;
}
}
...
...
public_new/js/chat-db-foriOS.js
deleted
100644 → 0
View file @
91c488ee
// ios用
function
callNativeApp
(
iosKey
,
jsonData
)
{
console
.
log
(
"callNativeApp called"
);
var
result
;
try
{
var
key
=
iosKey
;
var
data
=
jsonData
;
var
payload
=
{
key
:
key
,
data
:
data
};
// payloadの形 {"type":"SJbridge","data":{"name":"abc","role":"dev"}}
// resにObjective-cからのレスポンスが返る
result
=
prompt
(
JSON
.
stringify
(
payload
));
console
.
log
(
result
);
}
catch
(
err
)
{
console
.
log
(
"The native context does not exist yet"
);
}
return
result
;
}
CHAT_DB
.
getBeforeRoomType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getBeforeRoomType
,
{});
}
};
CHAT_DB
.
getRoomType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomType
,
{}),
10
);
}
};
CHAT_DB
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteUser
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteUser
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
addFavoriteUser
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
getCollaborationJoinFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCollaborationJoinFlg
,
{});
}
};
CHAT_DB
.
getUserInfoList
=
function
(
shopMemberId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfoList
,
{
shopMemberId
:
shopMemberId
,
});
}
};
CHAT_DB
.
createContentView
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
createContentView
,
{}));
}
};
CHAT_DB
.
getToMoveGroupId
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getToMoveGroupId
,
{});
}
};
CHAT_DB
.
getJoinCollaborationType
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getJoinCollaborationType
,
{}),
10
);
}
};
CHAT_DB
.
getHostRequestFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getHostRequestFlg
,
{}),
10
);
}
};
public_new/js/chat-db.js
deleted
100644 → 0
View file @
91c488ee
// 名前空間
var
CHAT_DB
=
{};
//ロカールDBからルーム一覧情報を取得
CHAT_DB
.
getRoomList
=
function
(
roomType
,
keyWord
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
,
keyWord
:
keyWord
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
,
keyWord
));
}
};
CHAT_DB
.
callGetRoomList
=
function
(
roomType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
}
};
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB
.
getMyInfo
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyInfo
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyInfo
());
}
};
CHAT_DB
.
getMessages
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessages
,
{
roomId
:
roomId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMessageList
(
roomId
));
}
};
CHAT_DB
.
getMessagesWithMessageId
=
function
(
messageId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessageListFromMessageId
,
{
messageId
:
messageId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getMessageListFromMessageId
(
messageId
));
}
};
CHAT_DB
.
getFavoriteUsersNotInRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteUsersNotInRoom
,
{})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsersNotInRoom
());
}
};
CHAT_DB
.
getFavoriteUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteUsers
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsers
());
}
};
CHAT_DB
.
getFavoriteGroups
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteGroups
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteGroups
());
}
};
CHAT_DB
.
getMyGroupUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupUsers
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsers
());
}
};
CHAT_DB
.
getGroupInfo
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfo
,
{
groupId
:
groupId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfo
(
groupId
));
}
};
CHAT_DB
.
getGroupInfoForAddUser
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfoForAddUser
,
{
groupId
:
groupId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfoForAddUser
(
groupId
));
}
};
CHAT_DB
.
loadSelectedUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getSelectedUserList
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
console
.
log
(
JSON
.
parse
(
android
.
getSelectedUserList
()));
return
JSON
.
parse
(
android
.
getSelectedUserList
());
}
};
CHAT_DB
.
getNameCardData
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getNameCardData
,
{
shopMemberId
:
shopMemberId
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getNameCardData
(
shopMemberId
));
}
};
CHAT_DB
.
getMyGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupShopMemberByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupShopMemberByName
(
shopMemberName
));
}
};
CHAT_DB
.
getMyGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupShopMemberNotInRoomByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupShopMemberNotInRoomByName
(
shopMemberName
)
);
}
};
CHAT_DB
.
getAllGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getAllGroupShopMemberByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getAllGroupShopMemberByName
(
shopMemberName
));
}
};
CHAT_DB
.
getAllGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getAllGroupShopMemberNotInRoomByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getAllGroupShopMemberNotInRoomByName
(
shopMemberName
)
);
}
};
CHAT_DB
.
getGroupByName
=
function
(
groupName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupByName
,
{
groupName
:
groupName
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupByName
(
groupName
));
}
};
CHAT_DB
.
getUsersInRoom
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUsersInRoom
,
{
roomId
:
roomId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getUsersInRoom
(
roomId
));
}
};
// アーカイブ一覧
CHAT_DB
.
getArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveList
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveList
());
}
};
// アーカイブ一覧検索
CHAT_DB
.
getArchiveByName
=
function
(
archiveName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveByName
,
{
archiveName
:
archiveName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveListByName
(
archiveName
));
}
};
// アーカイブ詳細
CHAT_DB
.
getArchiveDetail
=
function
(
archiveId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveDetail
,
{
archiveId
:
archiveId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveDetail
(
archiveId
));
}
};
CHAT_DB
.
searchMessages
=
function
(
keyword
,
userList
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
searchMessages
,
{
keyWord
:
keyword
,
userList
:
userList
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
searchMessages
(
keyword
,
userList
));
}
};
CHAT_DB
.
getMyGroupUsersNotInRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupUsersNotInRoom
,
{})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsersNotInRoom
());
}
};
CHAT_DB
.
getUserInfo
=
function
(
shopMemberId
)
{
if
(
shopMemberId
==
""
)
{
return
;
}
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfo
,
{
shopMemberId
:
shopMemberId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getUserInfo
(
shopMemberId
));
}
};
CHAT_DB
.
getUserListByLoginId
=
function
(
loginIdList
)
{
console
.
log
(
loginIdList
);
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUserListByLoginId
,
{
loginIdList
:
loginIdList
.
join
(
","
),
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getUserListByLoginId
(
loginIdList
.
join
(
","
)));
}
};
public_new/js/chat-room.js
View file @
b952b542
...
@@ -14,7 +14,7 @@ window.onscroll = function () {
...
@@ -14,7 +14,7 @@ window.onscroll = function () {
$
(
"#messages"
).
prepend
(
loader
);
$
(
"#messages"
).
prepend
(
loader
);
const
messageId
=
$
(
$
(
".chat_message"
).
get
(
0
)).
data
(
"messageid"
);
const
messageId
=
$
(
$
(
".chat_message"
).
get
(
0
)).
data
(
"messageid"
);
NativeBridgeDelegate
.
updatePreMessage
(
messageId
);
NativeBridgeDelegate
.
updatePreMessage
(
messageId
);
let
messages
=
CHAT_DB
.
getMessagesWithMessageId
(
messageId
);
let
messages
=
NativeBridgeDataSource
.
getMessagesWithMessageId
(
messageId
);
CHAT_UI
.
prependMessage
(
messages
);
CHAT_UI
.
prependMessage
(
messages
);
loader
.
remove
();
loader
.
remove
();
var
afterHeight
=
$
(
".room_container"
).
height
();
var
afterHeight
=
$
(
".room_container"
).
height
();
...
...
public_new/js/chat-ui-collaboration.js
View file @
b952b542
...
@@ -45,7 +45,7 @@ CHAT_UI.refreshJoinedCollaboration = function (loginIdList) {
...
@@ -45,7 +45,7 @@ CHAT_UI.refreshJoinedCollaboration = function (loginIdList) {
}
}
);
);
var
joinedUserList
=
CHAT_DB
.
getUserListByLoginId
(
loginIdList
);
var
joinedUserList
=
NativeBridgeDataSource
.
getUserListByLoginId
(
loginIdList
);
var
sortedUserList
=
new
Array
();
var
sortedUserList
=
new
Array
();
loginIdList
.
forEach
(
function
(
userId
)
{
loginIdList
.
forEach
(
function
(
userId
)
{
...
@@ -98,7 +98,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
...
@@ -98,7 +98,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
NativeBridgeDelegate
.
updateContactInfo
();
NativeBridgeDelegate
.
updateContactInfo
();
//お気に入りグループ取得。
//お気に入りグループ取得。
var
favoriteGroupList
=
CHAT_DB
.
getFavoriteGroups
();
var
favoriteGroupList
=
NativeBridgeDataSource
.
getFavoriteGroups
();
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
favoriteGroup
.
groupName
,
name
:
favoriteGroup
.
groupName
,
...
@@ -109,7 +109,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
...
@@ -109,7 +109,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
$
(
"#favoriteListForAddUserInCollaboration"
).
append
(
obj
);
$
(
"#favoriteListForAddUserInCollaboration"
).
append
(
obj
);
});
});
//お気に入りユーザ取得。
//お気に入りユーザ取得。
var
favoriteUserList
=
CHAT_DB
.
getFavoriteUsersNotInRoom
();
var
favoriteUserList
=
NativeBridgeDataSource
.
getFavoriteUsersNotInRoom
();
favoriteUserList
.
forEach
(
function
(
favoriteUser
)
{
favoriteUserList
.
forEach
(
function
(
favoriteUser
)
{
favoriteUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
favoriteUser
.
profileUrl
);
favoriteUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
favoriteUser
.
profileUrl
);
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
...
@@ -125,7 +125,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
...
@@ -125,7 +125,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
let
obj
=
jQuery
.
parseHTML
(
html
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#favoriteListForAddUserInCollaboration"
).
append
(
obj
);
$
(
"#favoriteListForAddUserInCollaboration"
).
append
(
obj
);
var
myGroupList
=
CHAT_DB
.
getMyGroupUsersNotInRoom
();
var
myGroupList
=
NativeBridgeDataSource
.
getMyGroupUsersNotInRoom
();
myGroupList
.
forEach
(
function
(
myGroup
)
{
myGroupList
.
forEach
(
function
(
myGroup
)
{
myGroup
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
myGroup
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
groupUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
...
@@ -164,7 +164,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
...
@@ -164,7 +164,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
$
(
"#groupPathAreaForAddUserInCollaboration"
).
html
(
""
);
$
(
"#groupPathAreaForAddUserInCollaboration"
).
html
(
""
);
//DBからグループ情報を取得。
//DBからグループ情報を取得。
var
result
=
CHAT_DB
.
getGroupInfoForAddUser
(
groupId
);
var
result
=
NativeBridgeDataSource
.
getGroupInfoForAddUser
(
groupId
);
//上位グループ、トップグループ遷移ボタンのイベント追加。
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
$
(
"#parentGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
$
(
"#parentGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
...
@@ -244,7 +244,7 @@ CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
...
@@ -244,7 +244,7 @@ CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
if
(
CHAT
.
globalLoginParameter
.
shopMemberId
==
shopMemberId
)
{
if
(
CHAT
.
globalLoginParameter
.
shopMemberId
==
shopMemberId
)
{
return
;
return
;
}
}
var
nameCardInfo
=
CHAT_DB
.
getNameCardData
(
shopMemberId
);
var
nameCardInfo
=
NativeBridgeDataSource
.
getNameCardData
(
shopMemberId
);
var
namecardTemplate
;
var
namecardTemplate
;
var
changeHostTemplate
;
var
changeHostTemplate
;
...
@@ -280,32 +280,22 @@ CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
...
@@ -280,32 +280,22 @@ CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
CHAT_UI
.
removeFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
CHAT_UI
.
removeFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
var
result
;
NativeBridgeDataSource
.
removeFavoriteUser
(
shopMemberId
);
if
(
typeof
android
!=
"undefined"
)
{
result
=
android
.
removeFavoriteUser
(
shopMemberId
);
}
else
{
result
=
CHAT_DB
.
removeFavoriteUser
(
shopMemberId
);
}
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
};
};
CHAT_UI
.
insertFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
CHAT_UI
.
insertFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
var
result
;
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberId
);
if
(
typeof
android
!=
"undefined"
)
{
result
=
android
.
addFavoriteUser
(
shopMemberId
);
}
else
{
result
=
CHAT_DB
.
addFavoriteUser
(
shopMemberId
);
}
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
};
};
CHAT_UI
.
confirmInviteUserListInCollaboration
=
function
()
{
CHAT_UI
.
confirmInviteUserListInCollaboration
=
function
()
{
var
selectedUsers
=
CHAT_DB
.
loadSelectedUsers
();
var
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
if
(
selectedUsers
!=
""
)
{
if
(
selectedUsers
!=
""
)
{
$
(
"#selectedUserListinCollaboration"
).
html
(
""
);
$
(
"#selectedUserListinCollaboration"
).
html
(
""
);
var
selectedUserList
=
CHAT_DB
.
loadSelectedUsers
();
var
selectedUserList
=
NativeBridgeDataSource
.
loadSelectedUsers
();
selectedUserList
.
forEach
(
function
(
user
)
{
selectedUserList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
});
...
...
public_new/js/chat-ui.js
View file @
b952b542
...
@@ -10,8 +10,7 @@ $(window).on("resize", function () {
...
@@ -10,8 +10,7 @@ $(window).on("resize", function () {
return
;
return
;
}
}
console
.
log
(
`width :
${
$
(
this
).
width
()}
`
);
console
.
log
(
`width :
${
$
(
this
).
width
()}
`
+
`height :
${
$
(
this
).
height
()}
`
);
console
.
log
(
`height :
${
$
(
this
).
height
()}
`
);
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
isLandscape
==
true
)
{
if
(
isLandscape
==
true
)
{
...
@@ -810,7 +809,7 @@ CHAT_UI.refreshContactScreen = function () {
...
@@ -810,7 +809,7 @@ CHAT_UI.refreshContactScreen = function () {
var groupUserTemplate = getTemplate(TemplateURL.GROUP_USER_LIST);
var groupUserTemplate = getTemplate(TemplateURL.GROUP_USER_LIST);
NativeBridgeDelegate.updateContactInfo();
NativeBridgeDelegate.updateContactInfo();
var myInfo =
CHAT_DB
.getMyInfo();
var myInfo =
NativeBridgeDataSource
.getMyInfo();
myInfo.profileImagePath = CHAT.getProfileImgUrl(myInfo.profileUrl);
myInfo.profileImagePath = CHAT.getProfileImgUrl(myInfo.profileUrl);
let myNamecardHtml = Mustache.render(myNamecardTemplate, {
let myNamecardHtml = Mustache.render(myNamecardTemplate, {
...
@@ -829,7 +828,7 @@ CHAT_UI.refreshContactScreen = function () {
...
@@ -829,7 +828,7 @@ CHAT_UI.refreshContactScreen = function () {
$("#myImg").attr("src", myInfo.profileImagePath);
$("#myImg").attr("src", myInfo.profileImagePath);
//お気に入りグループ取得。
//お気に入りグループ取得。
var favoriteGroupList =
CHAT_DB
.getFavoriteGroups();
var favoriteGroupList =
NativeBridgeDataSource
.getFavoriteGroups();
favoriteGroupList.forEach(function (favoriteGroup) {
favoriteGroupList.forEach(function (favoriteGroup) {
let html = Mustache.render(groupTemplate, {
let html = Mustache.render(groupTemplate, {
name: favoriteGroup.groupName,
name: favoriteGroup.groupName,
...
@@ -841,7 +840,7 @@ CHAT_UI.refreshContactScreen = function () {
...
@@ -841,7 +840,7 @@ CHAT_UI.refreshContactScreen = function () {
$("#favoriteList").append(obj);
$("#favoriteList").append(obj);
});
});
//お気に入りユーザ取得。
//お気に入りユーザ取得。
var favoriteUserList =
CHAT_DB
.getFavoriteUsers();
var favoriteUserList =
NativeBridgeDataSource
.getFavoriteUsers();
favoriteUserList.forEach(function (favoriteUser) {
favoriteUserList.forEach(function (favoriteUser) {
favoriteUser.profileUrl = CHAT.getProfileImgUrl(favoriteUser.profileUrl);
favoriteUser.profileUrl = CHAT.getProfileImgUrl(favoriteUser.profileUrl);
favoriteUser.isFavorite = true;
favoriteUser.isFavorite = true;
...
@@ -852,7 +851,7 @@ CHAT_UI.refreshContactScreen = function () {
...
@@ -852,7 +851,7 @@ CHAT_UI.refreshContactScreen = function () {
let obj = jQuery.parseHTML(html);
let obj = jQuery.parseHTML(html);
$("#favoriteList").append(obj);
$("#favoriteList").append(obj);
var myGroupList =
CHAT_DB
.getMyGroupUsers();
var myGroupList =
NativeBridgeDataSource
.getMyGroupUsers();
myGroupList.forEach(function (myGroup) {
myGroupList.forEach(function (myGroup) {
myGroup.groupUserList.forEach(function (groupUser) {
myGroup.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = CHAT.getProfileImgUrl(groupUser.profileUrl);
groupUser.profileUrl = CHAT.getProfileImgUrl(groupUser.profileUrl);
...
@@ -874,12 +873,8 @@ CHAT_UI.refreshRoomList = function (roomType) {
...
@@ -874,12 +873,8 @@ CHAT_UI.refreshRoomList = function (roomType) {
} else {
} else {
CHAT_UI.refreshForOffline();
CHAT_UI.refreshForOffline();
}
}
var beforeRoomType;
const beforeRoomType = NativeBridgeDataSource.getBeforeRoomType();
if (typeof android != "undefined") {
beforeRoomType = android.getBeforeRoomType();
} else {
beforeRoomType = CHAT_DB.getBeforeRoomType();
}
if (beforeRoomType != null) {
if (beforeRoomType != null) {
roomType = beforeRoomType;
roomType = beforeRoomType;
NativeBridgeDelegate.clearBeforeRoomType();
NativeBridgeDelegate.clearBeforeRoomType();
...
@@ -894,7 +889,7 @@ CHAT_UI.refreshRoomList = function (roomType) {
...
@@ -894,7 +889,7 @@ CHAT_UI.refreshRoomList = function (roomType) {
if (IS_ONLINE == "true") {
if (IS_ONLINE == "true") {
NativeBridgeDelegate.updateRoomList();
NativeBridgeDelegate.updateRoomList();
}
}
var rooms =
CHAT_DB
.getRoomList(roomType, null);
var rooms =
NativeBridgeDataSource
.getRoomList(roomType, null);
CHAT.globalIsInvite = false;
CHAT.globalIsInvite = false;
// #36146に対応
// #36146に対応
$("#groupChatList").empty();
$("#groupChatList").empty();
...
@@ -1009,8 +1004,8 @@ CHAT_UI.loadMessages = function (roomId, joinRoomName) {
...
@@ -1009,8 +1004,8 @@ CHAT_UI.loadMessages = function (roomId, joinRoomName) {
if (roomType == ChatRoomType.DM) {
if (roomType == ChatRoomType.DM) {
$("#roomMenu").removeClass("none");
$("#roomMenu").removeClass("none");
}
}
var messages =
CHAT_DB
.getMessages(roomId);
var messages =
NativeBridgeDataSource
.getMessages(roomId);
var usersInRoom =
CHAT_DB
.getUsersInRoom(roomId);
var usersInRoom =
NativeBridgeDataSource
.getUsersInRoom(roomId);
$("#roomTitle").text(roomName).data("roomName", roomName);
$("#roomTitle").text(roomName).data("roomName", roomName);
let jQueryMessages = $("#messages");
let jQueryMessages = $("#messages");
...
@@ -1132,19 +1127,11 @@ CHAT_UI.prependMessage = function (messages) {
...
@@ -1132,19 +1127,11 @@ CHAT_UI.prependMessage = function (messages) {
message.messageType == MessageType.COMMUNICATIONSTART ||
message.messageType == MessageType.COMMUNICATIONSTART ||
message.messageType == MessageType.COMMUNICATIONEND
message.messageType == MessageType.COMMUNICATIONEND
) {
) {
var collaborationInfo;
const collaborationInfo = JSON.parse(message.message);
var userInCollaboration;
const userInCollaboration = JSON.parse(
if (CHAT_UTIL.isIOS()) {
NativeBridgeDataSource.getUserInfoList(collaborationInfo.userList)
collaborationInfo = JSON.parse(message.message);
userInCollaboration = JSON.parse(
CHAT_DB.getUserInfoList(collaborationInfo.userList)
);
} else if (CHAT_UTIL.isAndroid()) {
collaborationInfo = JSON.parse(message.message);
userInCollaboration = JSON.parse(
android.getUserInfoList(collaborationInfo.userList)
);
);
}
var meetingId = 0;
var meetingId = 0;
if (typeof collaborationInfo.meetingId != "undefined") {
if (typeof collaborationInfo.meetingId != "undefined") {
meetingId = collaborationInfo.meetingId;
meetingId = collaborationInfo.meetingId;
...
@@ -1225,18 +1212,13 @@ CHAT_UI.removeFavoriteUser = function (shopMemberId) {
...
@@ -1225,18 +1212,13 @@ CHAT_UI.removeFavoriteUser = function (shopMemberId) {
CHAT_UI.showLoadingIndicator();
CHAT_UI.showLoadingIndicator();
$("#userNameCard").modal("hide");
$("#userNameCard").modal("hide");
$("#myNameCard").modal("hide");
$("#myNameCard").modal("hide");
var result;
const result = NativeBridgeDataSource.removeFavoriteUser(shopMemberId);
if (typeof android != "undefined") {
if (result) {
result = android.removeFavoriteUser(shopMemberId);
$(".shopmember_" + shopMemberId).removeClass("active");
$(".shopmember_" + shopMemberId).addClass("disable");
} else {
} else {
result = CHAT_DB.removeFavoriteUser(shopMemberId);
}
if (!result) {
$(".shopmember_" + shopMemberId).addClass("active");
$(".shopmember_" + shopMemberId).addClass("active");
$(".shopmember_" + shopMemberId).removeClass("disable");
$(".shopmember_" + shopMemberId).removeClass("disable");
} else {
$(".shopmember_" + shopMemberId).removeClass("active");
$(".shopmember_" + shopMemberId).addClass("disable");
}
}
CHAT_UI.dismissLoadingIndicator();
CHAT_UI.dismissLoadingIndicator();
};
};
...
@@ -1244,20 +1226,13 @@ CHAT_UI.removeFavoriteUser = function (shopMemberId) {
...
@@ -1244,20 +1226,13 @@ CHAT_UI.removeFavoriteUser = function (shopMemberId) {
CHAT_UI.insertFavoriteUser = function (shopMemberId) {
CHAT_UI.insertFavoriteUser = function (shopMemberId) {
$("#userNameCard").modal("hide");
$("#userNameCard").modal("hide");
$("#myNameCard").modal("hide");
$("#myNameCard").modal("hide");
var result;
const result = NativeBridgeDataSource.addFavoriteUser(shopMemberId);
if (typeof android != "undefined") {
if (result) {
result = android.addFavoriteUser(shopMemberId);
$(".shopmember_" + shopMemberId).removeClass("disable");
$(".shopmember_" + shopMemberId).addClass("active");
} else {
} else {
result = CHAT_DB.addFavoriteUser(shopMemberId);
}
if (!result) {
$(".shopmember_" + shopMemberId).addClass("disable");
$(".shopmember_" + shopMemberId).addClass("disable");
$(".shopmember_" + shopMemberId).removeClass("active");
$(".shopmember_" + shopMemberId).removeClass("active");
CHAT_UI.dismissLoadingIndicator();
return;
} else {
$(".shopmember_" + shopMemberId).removeClass("disable");
$(".shopmember_" + shopMemberId).addClass("active");
}
}
CHAT_UI.dismissLoadingIndicator();
CHAT_UI.dismissLoadingIndicator();
};
};
...
@@ -1322,7 +1297,7 @@ CHAT_UI.refreshAllGroupSearch = function (paramGroupId) {
...
@@ -1322,7 +1297,7 @@ CHAT_UI.refreshAllGroupSearch = function (paramGroupId) {
$("#groupPathArea").html("");
$("#groupPathArea").html("");
//DBからグループ情報を取得。
//DBからグループ情報を取得。
var result =
CHAT_DB
.getGroupInfo(groupId);
var result =
NativeBridgeDataSource
.getGroupInfo(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
if (typeof result.parentGroupId !== "undefined") {
...
@@ -1419,7 +1394,7 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
...
@@ -1419,7 +1394,7 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
if (CHAT.globalLoginParameter.shopMemberId == shopMemberId) {
if (CHAT.globalLoginParameter.shopMemberId == shopMemberId) {
return;
return;
}
}
var nameCardInfo =
CHAT_DB
.getNameCardData(shopMemberId);
var nameCardInfo =
NativeBridgeDataSource
.getNameCardData(shopMemberId);
var namecardTemplate = getTemplate(TemplateURL.USER_NAME_CARD);
var namecardTemplate = getTemplate(TemplateURL.USER_NAME_CARD);
nameCardInfo.profileUrl = CHAT.getProfileImgUrl(nameCardInfo.profileUrl);
nameCardInfo.profileUrl = CHAT.getProfileImgUrl(nameCardInfo.profileUrl);
...
@@ -1462,10 +1437,10 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
...
@@ -1462,10 +1437,10 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
NativeBridgeDelegate.updateArchiveDetail(archiveId);
NativeBridgeDelegate.updateArchiveDetail(archiveId);
}
}
// アーカイブ詳細取得
// アーカイブ詳細取得
const archive =
CHAT_DB
.getArchiveDetail(archiveId);
const archive =
NativeBridgeDataSource
.getArchiveDetail(archiveId);
// 保存ユーザ情報を取得
// 保存ユーザ情報を取得
const userInfo =
CHAT_DB
.getUserInfo(archive.saveUserId);
const userInfo =
NativeBridgeDataSource
.getUserInfo(archive.saveUserId);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
// アーカイブ情報を表示
// アーカイブ情報を表示
...
@@ -1558,7 +1533,7 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
...
@@ -1558,7 +1533,7 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
if
(
user
==
""
)
{
if
(
user
==
""
)
{
return
;
return
;
}
}
var
userInfo
=
CHAT_DB
.
getUserInfo
(
user
);
var
userInfo
=
NativeBridgeDataSource
.
getUserInfo
(
user
);
userInfo
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
userInfo
.
profileUrl
);
userInfo
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
userInfo
.
profileUrl
);
const
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
const
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
profileImage
:
userInfo
.
profileUrl
,
profileImage
:
userInfo
.
profileUrl
,
...
@@ -1603,7 +1578,7 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
...
@@ -1603,7 +1578,7 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
NativeBridgeDelegate
.
updateContactInfo
();
NativeBridgeDelegate
.
updateContactInfo
();
//お気に入りグループ取得。
//お気に入りグループ取得。
var
favoriteGroupList
=
CHAT_DB
.
getFavoriteGroups
();
var
favoriteGroupList
=
NativeBridgeDataSource
.
getFavoriteGroups
();
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
favoriteGroup
.
groupName
,
name
:
favoriteGroup
.
groupName
,
...
@@ -1614,7 +1589,7 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
...
@@ -1614,7 +1589,7 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
$
(
"#favoriteListForMakeRoom"
).
append
(
obj
);
$
(
"#favoriteListForMakeRoom"
).
append
(
obj
);
});
});
//お気に入りユーザ取得。
//お気に入りユーザ取得。
var
favoriteUserList
=
CHAT_DB
.
getFavoriteUsers
();
var
favoriteUserList
=
NativeBridgeDataSource
.
getFavoriteUsers
();
favoriteUserList
.
forEach
(
function
(
favoriteUser
)
{
favoriteUserList
.
forEach
(
function
(
favoriteUser
)
{
favoriteUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
favoriteUser
.
profileUrl
);
favoriteUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
favoriteUser
.
profileUrl
);
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
shopMemberId
)
{
...
@@ -1630,7 +1605,7 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
...
@@ -1630,7 +1605,7 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
let
obj
=
jQuery
.
parseHTML
(
html
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#favoriteListForMakeRoom"
).
append
(
obj
);
$
(
"#favoriteListForMakeRoom"
).
append
(
obj
);
var
myGroupList
=
CHAT_DB
.
getMyGroupUsers
();
var
myGroupList
=
NativeBridgeDataSource
.
getMyGroupUsers
();
myGroupList
.
forEach
(
function
(
myGroup
)
{
myGroupList
.
forEach
(
function
(
myGroup
)
{
myGroup
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
myGroup
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
groupUser
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
...
@@ -1673,7 +1648,7 @@ CHAT_UI.refreshAllGroupForMakeRoom = function (paramGroupId) {
...
@@ -1673,7 +1648,7 @@ CHAT_UI.refreshAllGroupForMakeRoom = function (paramGroupId) {
$
(
"#groupPathAreaForMakeRoom"
).
html
(
""
);
$
(
"#groupPathAreaForMakeRoom"
).
html
(
""
);
//DBからグループ情報を取得。
//DBからグループ情報を取得。
var
result
=
CHAT_DB
.
getGroupInfo
(
groupId
);
var
result
=
NativeBridgeDataSource
.
getGroupInfo
(
groupId
);
//上位グループ、トップグループ遷移ボタンのイベント追加。
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
...
@@ -1791,7 +1766,7 @@ CHAT_UI.refreshArchiveScreen = function () {
...
@@ -1791,7 +1766,7 @@ CHAT_UI.refreshArchiveScreen = function () {
}
}
// ローカルDBのデータを表示
// ローカルDBのデータを表示
var
archiveList
=
CHAT_DB
.
getArchiveList
();
var
archiveList
=
NativeBridgeDataSource
.
getArchiveList
();
if
(
typeof
archiveList
==
"undefined"
)
{
if
(
typeof
archiveList
==
"undefined"
)
{
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
return
;
return
;
...
@@ -1834,7 +1809,7 @@ CHAT_UI.showMakeRoomConfirmView = function () {
...
@@ -1834,7 +1809,7 @@ CHAT_UI.showMakeRoomConfirmView = function () {
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_CONFIRM_USER_LIST
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_CONFIRM_USER_LIST
);
var
selectedUserList
=
CHAT_DB
.
loadSelectedUsers
();
var
selectedUserList
=
NativeBridgeDataSource
.
loadSelectedUsers
();
selectedUserList
.
forEach
(
function
(
user
)
{
selectedUserList
.
forEach
(
function
(
user
)
{
let
html
=
Mustache
.
render
(
userTemplate
,
{
let
html
=
Mustache
.
render
(
userTemplate
,
{
...
@@ -1955,7 +1930,7 @@ CHAT_UI.showAddUserConfirmView = function () {
...
@@ -1955,7 +1930,7 @@ CHAT_UI.showAddUserConfirmView = function () {
$("#selectedUserList").html("");
$("#selectedUserList").html("");
var userTemplate = getTemplate(TemplateURL.ADD_USER_CONFIRM_USER_LIST);
var userTemplate = getTemplate(TemplateURL.ADD_USER_CONFIRM_USER_LIST);
var selectedUserList =
CHAT_DB
.loadSelectedUsers();
var selectedUserList =
NativeBridgeDataSource
.loadSelectedUsers();
selectedUserList.forEach(function (user) {
selectedUserList.forEach(function (user) {
let html = Mustache.render(userTemplate, {
let html = Mustache.render(userTemplate, {
...
@@ -1997,7 +1972,7 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
...
@@ -1997,7 +1972,7 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
NativeBridgeDelegate.updateContactInfo();
NativeBridgeDelegate.updateContactInfo();
//お気に入りグループ取得。
//お気に入りグループ取得。
var favoriteGroupList =
CHAT_DB
.getFavoriteGroups();
var favoriteGroupList =
NativeBridgeDataSource
.getFavoriteGroups();
favoriteGroupList.forEach(function (favoriteGroup) {
favoriteGroupList.forEach(function (favoriteGroup) {
let html = Mustache.render(groupTemplate, {
let html = Mustache.render(groupTemplate, {
name: favoriteGroup.groupName,
name: favoriteGroup.groupName,
...
@@ -2008,7 +1983,7 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
...
@@ -2008,7 +1983,7 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
$("#favoriteListForMakeRoom").append(obj);
$("#favoriteListForMakeRoom").append(obj);
});
});
//お気に入りユーザ取得。
//お気に入りユーザ取得。
var favoriteUserList =
CHAT_DB
.getFavoriteUsersNotInRoom();
var favoriteUserList =
NativeBridgeDataSource
.getFavoriteUsersNotInRoom();
favoriteUserList.forEach(function (favoriteUser) {
favoriteUserList.forEach(function (favoriteUser) {
favoriteUser.profileUrl = CHAT.getProfileImgUrl(favoriteUser.profileUrl);
favoriteUser.profileUrl = CHAT.getProfileImgUrl(favoriteUser.profileUrl);
let findObj = CHAT.globalSelectedUserList.find(function (shopMemberId) {
let findObj = CHAT.globalSelectedUserList.find(function (shopMemberId) {
...
@@ -2024,7 +1999,7 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
...
@@ -2024,7 +1999,7 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
let obj = jQuery.parseHTML(html);
let obj = jQuery.parseHTML(html);
$("#favoriteListForMakeRoom").append(obj);
$("#favoriteListForMakeRoom").append(obj);
var myGroupList =
CHAT_DB
.getMyGroupUsersNotInRoom();
var myGroupList =
NativeBridgeDataSource
.getMyGroupUsersNotInRoom();
myGroupList.forEach(function (myGroup) {
myGroupList.forEach(function (myGroup) {
myGroup.groupUserList.forEach(function (groupUser) {
myGroup.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = CHAT.getProfileImgUrl(groupUser.profileUrl);
groupUser.profileUrl = CHAT.getProfileImgUrl(groupUser.profileUrl);
...
@@ -2067,7 +2042,7 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
...
@@ -2067,7 +2042,7 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
$("#groupPathAreaForAddUser").html("");
$("#groupPathAreaForAddUser").html("");
//DBからグループ情報を取得。
//DBからグループ情報を取得。
var result =
CHAT_DB
.getGroupInfoForAddUser(groupId);
var result =
NativeBridgeDataSource
.getGroupInfoForAddUser(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
if (typeof result.parentGroupId !== "undefined") {
...
...
public_new/js/chat-util.js
View file @
b952b542
...
@@ -140,10 +140,8 @@ CHAT_UTIL.getCoviewTypeFromCollaborationType = function (
...
@@ -140,10 +140,8 @@ CHAT_UTIL.getCoviewTypeFromCollaborationType = function (
)
{
)
{
switch
(
joinCollaborationType
)
{
switch
(
joinCollaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
case
COLLABORATION_TYPE
.
AUDIO
:
console
.
log
(
CollaborationTypeKey
.
AUDIO
);
return
CollaborationTypeKey
.
AUDIO
;
return
CollaborationTypeKey
.
AUDIO
;
case
COLLABORATION_TYPE
.
CAMERA
:
case
COLLABORATION_TYPE
.
CAMERA
:
console
.
log
(
CollaborationTypeKey
.
CAMERA
);
return
CollaborationTypeKey
.
CAMERA
;
return
CollaborationTypeKey
.
CAMERA
;
case
COLLABORATION_TYPE
.
VIDEO
:
case
COLLABORATION_TYPE
.
VIDEO
:
return
CollaborationTypeKey
.
VIDEO
;
return
CollaborationTypeKey
.
VIDEO
;
...
...
public_new/js/chat.js
View file @
b952b542
...
@@ -570,7 +570,7 @@ document.addEventListener("DOMContentLoaded", function () {
...
@@ -570,7 +570,7 @@ document.addEventListener("DOMContentLoaded", function () {
if
(
keyword
.
length
==
1
)
{
if
(
keyword
.
length
==
1
)
{
return
;
return
;
}
}
const
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
));
const
messages
=
NativeBridgeDataSource
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
));
var
userMessageTemplate
=
getTemplate
(
TemplateURL
.
USER_MESSAGE
);
var
userMessageTemplate
=
getTemplate
(
TemplateURL
.
USER_MESSAGE
);
var
myMessageTemplate
=
getTemplate
(
TemplateURL
.
MY_MESSAGE
);
var
myMessageTemplate
=
getTemplate
(
TemplateURL
.
MY_MESSAGE
);
...
@@ -631,7 +631,7 @@ var getCheckedUserList = function () {
...
@@ -631,7 +631,7 @@ var getCheckedUserList = function () {
CHAT
.
searchRoom
=
function
(
keyword
,
rooms
)
{
CHAT
.
searchRoom
=
function
(
keyword
,
rooms
)
{
const
overlayMessage
=
$
(
".overlay_src_msg"
);
const
overlayMessage
=
$
(
".overlay_src_msg"
);
overlayMessage
.
empty
();
overlayMessage
.
empty
();
rooms
=
CHAT_DB
.
getRoomList
(
ChatRoomType
.
ALL
,
keyword
);
rooms
=
NativeBridgeDataSource
.
getRoomList
(
ChatRoomType
.
ALL
,
keyword
);
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
$
(
"#chatTitle"
).
text
(
roomListTitle
);
$
(
"#chatTitle"
).
text
(
roomListTitle
);
...
@@ -716,7 +716,7 @@ CHAT.searchMessage = function (keyword, workVal) {
...
@@ -716,7 +716,7 @@ CHAT.searchMessage = function (keyword, workVal) {
const
selectedUser
=
$
(
".img_wrap.filter"
)[
user
];
const
selectedUser
=
$
(
".img_wrap.filter"
)[
user
];
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
"user-id"
));
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
"user-id"
));
});
});
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
));
var
messages
=
NativeBridgeDataSource
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
));
var
userMessageTemplate
=
getTemplate
(
TemplateURL
.
USER_MESSAGE
);
var
userMessageTemplate
=
getTemplate
(
TemplateURL
.
USER_MESSAGE
);
var
myMessageTemplate
=
getTemplate
(
TemplateURL
.
MY_MESSAGE
);
var
myMessageTemplate
=
getTemplate
(
TemplateURL
.
MY_MESSAGE
);
...
...
public_new/js/chatMakeRoom.js
View file @
b952b542
...
@@ -19,7 +19,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
...
@@ -19,7 +19,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
//全グループ検索画面
//全グループ検索画面
if
(
isAllGroup
)
{
if
(
isAllGroup
)
{
//グループデータ検索
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupList
=
NativeBridgeDataSource
.
getGroupByName
(
keyword
);
var
groupTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_GROUP_LIST
);
var
groupTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_GROUP_LIST
);
groupList
.
forEach
(
function
(
group
)
{
groupList
.
forEach
(
function
(
group
)
{
...
@@ -29,7 +29,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
...
@@ -29,7 +29,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
});
});
//ユーザデータ検索
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberByName
(
keyword
);
var
userList
=
NativeBridgeDataSource
.
getAllGroupShopMemberByName
(
keyword
);
searchUserData
(
userList
);
searchUserData
(
userList
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
let
html
=
renderUser
(
userTemplate
,
userList
);
let
html
=
renderUser
(
userTemplate
,
userList
);
...
@@ -38,7 +38,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
...
@@ -38,7 +38,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
hasNoData
=
groupList
.
length
==
0
&&
userList
.
length
==
0
;
hasNoData
=
groupList
.
length
==
0
&&
userList
.
length
==
0
;
//連絡先画面
//連絡先画面
}
else
{
}
else
{
const
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
const
userList
=
NativeBridgeDataSource
.
getMyGroupShopMemberByName
(
keyword
);
searchUserData
(
userList
);
searchUserData
(
userList
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
let
html
=
renderUser
(
userTemplate
,
userList
);
let
html
=
renderUser
(
userTemplate
,
userList
);
...
...
public_new/js/common/native-bridge-datasource.js
View file @
b952b542
// ios用
function
callNativeApp
(
iosKey
,
jsonData
)
{
console
.
log
(
"callNativeApp called: "
+
iosKey
);
var
result
;
try
{
var
key
=
iosKey
;
var
data
=
jsonData
;
var
payload
=
{
key
:
key
,
data
:
data
};
// payloadの形 {"type":"SJbridge","data":{"name":"abc","role":"dev"}}
// resにObjective-cからのレスポンスが返る
result
=
prompt
(
JSON
.
stringify
(
payload
));
}
catch
(
err
)
{
console
.
log
(
"The native context does not exist yet"
);
}
return
result
;
}
var
NativeBridgeDataSource
=
{};
var
NativeBridgeDataSource
=
{};
// todo: peacekim:: it should be datasource
NativeBridgeDataSource
.
removeFavoriteGroup
=
function
(
groupID
)
{
NativeBridgeDataSource
.
removeFavoriteGroup
=
function
(
groupID
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
const
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteGroup
,
{
const
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteGroup
,
{
...
@@ -34,3 +50,400 @@ NativeBridgeDataSource.getRoomType = function () {
...
@@ -34,3 +50,400 @@ NativeBridgeDataSource.getRoomType = function () {
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomType
,
{}),
10
);
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomType
,
{}),
10
);
}
}
};
};
//ロカールDBからルーム一覧情報を取得
NativeBridgeDataSource
.
getRoomList
=
function
(
roomType
,
keyWord
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
,
keyWord
:
keyWord
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
,
keyWord
));
}
};
NativeBridgeDataSource
.
callGetRoomList
=
function
(
roomType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
}
};
//ロカールDBからログインしたユーザのデータを取得する。
NativeBridgeDataSource
.
getMyInfo
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyInfo
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyInfo
());
}
};
NativeBridgeDataSource
.
getMessages
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessages
,
{
roomId
:
roomId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMessageList
(
roomId
));
}
};
NativeBridgeDataSource
.
getMessagesWithMessageId
=
function
(
messageId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessageListFromMessageId
,
{
messageId
:
messageId
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getMessageListFromMessageId
(
messageId
));
}
};
NativeBridgeDataSource
.
getFavoriteUsersNotInRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteUsersNotInRoom
,
{})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsersNotInRoom
());
}
};
NativeBridgeDataSource
.
getFavoriteUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteUsers
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteUsers
());
}
};
NativeBridgeDataSource
.
getFavoriteGroups
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getFavoriteGroups
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getFavoriteGroups
());
}
};
NativeBridgeDataSource
.
getMyGroupUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupUsers
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsers
());
}
};
NativeBridgeDataSource
.
getGroupInfo
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfo
,
{
groupId
:
groupId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfo
(
groupId
));
}
};
NativeBridgeDataSource
.
getGroupInfoForAddUser
=
function
(
groupId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupInfoForAddUser
,
{
groupId
:
groupId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupInfoForAddUser
(
groupId
));
}
};
NativeBridgeDataSource
.
loadSelectedUsers
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getSelectedUserList
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
console
.
log
(
JSON
.
parse
(
android
.
getSelectedUserList
()));
return
JSON
.
parse
(
android
.
getSelectedUserList
());
}
};
NativeBridgeDataSource
.
getNameCardData
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getNameCardData
,
{
shopMemberId
:
shopMemberId
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getNameCardData
(
shopMemberId
));
}
};
NativeBridgeDataSource
.
getMyGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupShopMemberByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupShopMemberByName
(
shopMemberName
));
}
};
NativeBridgeDataSource
.
getMyGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupShopMemberNotInRoomByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupShopMemberNotInRoomByName
(
shopMemberName
)
);
}
};
NativeBridgeDataSource
.
getAllGroupShopMemberByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getAllGroupShopMemberByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getAllGroupShopMemberByName
(
shopMemberName
));
}
};
NativeBridgeDataSource
.
getAllGroupShopMemberNotInRoomByName
=
function
(
shopMemberName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getAllGroupShopMemberNotInRoomByName
,
{
shopMemberName
:
shopMemberName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getAllGroupShopMemberNotInRoomByName
(
shopMemberName
)
);
}
};
NativeBridgeDataSource
.
getGroupByName
=
function
(
groupName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getGroupByName
,
{
groupName
:
groupName
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getGroupByName
(
groupName
));
}
};
NativeBridgeDataSource
.
getUsersInRoom
=
function
(
roomId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUsersInRoom
,
{
roomId
:
roomId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getUsersInRoom
(
roomId
));
}
};
// アーカイブ一覧
NativeBridgeDataSource
.
getArchiveList
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveList
,
{}));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveList
());
}
};
// アーカイブ一覧検索
NativeBridgeDataSource
.
getArchiveByName
=
function
(
archiveName
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveByName
,
{
archiveName
:
archiveName
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveListByName
(
archiveName
));
}
};
// アーカイブ詳細
NativeBridgeDataSource
.
getArchiveDetail
=
function
(
archiveId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getArchiveDetail
,
{
archiveId
:
archiveId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getArchiveDetail
(
archiveId
));
}
};
NativeBridgeDataSource
.
searchMessages
=
function
(
keyword
,
userList
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
searchMessages
,
{
keyWord
:
keyword
,
userList
:
userList
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
searchMessages
(
keyword
,
userList
));
}
};
NativeBridgeDataSource
.
getMyGroupUsersNotInRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMyGroupUsersNotInRoom
,
{})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getMyGroupUsersNotInRoom
());
}
};
NativeBridgeDataSource
.
getUserInfo
=
function
(
shopMemberId
)
{
if
(
shopMemberId
==
""
)
{
return
;
}
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfo
,
{
shopMemberId
:
shopMemberId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getUserInfo
(
shopMemberId
));
}
};
NativeBridgeDataSource
.
getUserListByLoginId
=
function
(
loginIdList
)
{
console
.
log
(
loginIdList
);
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUserListByLoginId
,
{
loginIdList
:
loginIdList
.
join
(
","
),
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getUserListByLoginId
(
loginIdList
.
join
(
","
)));
}
};
NativeBridgeDataSource
.
getBeforeRoomType
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getBeforeRoomType
,
{});
}
else
{
return
android
.
getBeforeRoomType
();
}
};
NativeBridgeDataSource
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteUser
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
else
{
return
android
.
removeFavoriteUser
(
shopMemberId
);
}
};
NativeBridgeDataSource
.
addFavoriteUser
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
addFavoriteUser
,
{
shopMemberId
:
shopMemberId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
else
{
return
android
.
addFavoriteUser
(
shopMemberId
);
}
};
NativeBridgeDataSource
.
getJoinCollaborationType
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getJoinCollaborationType
,
{}),
10
);
}
else
{
return
android
.
getJoinCollaborationType
();
}
};
NativeBridgeDataSource
.
getCollaborationJoinFlg
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCollaborationJoinFlg
,
{});
}
else
{
return
android
.
getCollaborationJoinFlg
();
}
};
NativeBridgeDataSource
.
getUserInfoList
=
function
(
shopMemberId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfoList
,
{
shopMemberId
:
shopMemberId
,
});
}
else
{
return
android
.
getUserInfoList
(
collaborationInfo
.
userList
);
}
};
NativeBridgeDataSource
.
createContentView
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
createContentView
,
{}));
}
else
{
return
android
.
createContentView
();
}
};
NativeBridgeDataSource
.
getToMoveGroupId
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getToMoveGroupId
,
{});
}
else
{
return
android
.
getToMoveGroupId
();
}
};
NativeBridgeDataSource
.
getHostRequestFlg
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getHostRequestFlg
,
{}),
10
);
}
else
{
return
android
.
getHostRequestFlg
();
}
};
\ No newline at end of file
public_new/js/contact.js
View file @
b952b542
...
@@ -19,17 +19,17 @@ CONTACT.searchUser = function (keyword) {
...
@@ -19,17 +19,17 @@ CONTACT.searchUser = function (keyword) {
//全グループ検索画面
//全グループ検索画面
if
(
isAllGroup
)
{
if
(
isAllGroup
)
{
//グループデータ検索
//グループデータ検索
const
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
const
groupList
=
NativeBridgeDataSource
.
getGroupByName
(
keyword
);
groupDataSearch
(
groupList
);
groupDataSearch
(
groupList
);
//ユーザデータ検索
//ユーザデータ検索
const
userList
=
CHAT_DB
.
getAllGroupShopMemberByName
(
keyword
);
const
userList
=
NativeBridgeDataSource
.
getAllGroupShopMemberByName
(
keyword
);
userDataSearch
(
userList
);
userDataSearch
(
userList
);
hasNoData
=
userList
.
length
==
0
&&
groupList
.
length
==
0
;
hasNoData
=
userList
.
length
==
0
&&
groupList
.
length
==
0
;
//連絡先画面
//連絡先画面
}
else
{
}
else
{
const
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
const
userList
=
NativeBridgeDataSource
.
getMyGroupShopMemberByName
(
keyword
);
userDataSearch
(
userList
);
userDataSearch
(
userList
);
hasNoData
=
userList
.
length
==
0
;
hasNoData
=
userList
.
length
==
0
;
...
...
public_new/js/share.js
View file @
b952b542
...
@@ -414,11 +414,7 @@ document.addEventListener("DOMContentLoaded", function () {
...
@@ -414,11 +414,7 @@ document.addEventListener("DOMContentLoaded", function () {
globalUserInfo
.
coWorkType
globalUserInfo
.
coWorkType
);
);
if
(
isDocument
)
{
if
(
isDocument
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
meetingId
=
NativeBridgeDataSource
.
createContentView
();
meetingId
=
CHAT_DB
.
createContentView
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
meetingId
=
android
.
createContentView
();
}
joinMeetingId
=
meetingId
;
joinMeetingId
=
meetingId
;
}
}
}
else
if
(
collaborationJoinFlg
==
"2"
)
{
}
else
if
(
collaborationJoinFlg
==
"2"
)
{
...
@@ -571,12 +567,7 @@ function changeCollaboration(changeCollaborationType) {
...
@@ -571,12 +567,7 @@ function changeCollaboration(changeCollaborationType) {
break
;
break
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
case
COLLABORATION_TYPE
.
DOCUMENT
:
coview_api
.
ChangeCollaboration
(
"audio"
);
coview_api
.
ChangeCollaboration
(
"audio"
);
if
(
CHAT_UTIL
.
isIOS
())
{
newMeetingId
=
NativeBridgeDataSource
.
createContentView
();
newMeetingId
=
CHAT_DB
.
createContentView
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
newMeetingId
=
android
.
createContentView
();
console
.
log
(
"newMeetingId = "
+
newMeetingId
);
}
break
;
break
;
case
COLLABORATION_TYPE
.
BOARD
:
case
COLLABORATION_TYPE
.
BOARD
:
coview_api
.
ChangeCollaboration
(
"audio"
);
coview_api
.
ChangeCollaboration
(
"audio"
);
...
@@ -742,12 +733,7 @@ function applyForHostChange() {
...
@@ -742,12 +733,7 @@ function applyForHostChange() {
alert
(
getLocalizedString
(
"not_support_version"
));
alert
(
getLocalizedString
(
"not_support_version"
));
return
;
return
;
}
}
var
hostRequestFlg
=
0
;
const
hostRequestFlg
=
NativeBridgeDataSource
.
getHostRequestFlg
();
if
(
CHAT_UTIL
.
isAndroid
())
{
hostRequestFlg
=
android
.
getHostRequestFlg
();
}
else
{
hostRequestFlg
=
CHAT_DB
.
getHostRequestFlg
();
}
if
(
hostRequestFlg
==
HostRequestFlag
.
DOING
)
{
if
(
hostRequestFlg
==
HostRequestFlag
.
DOING
)
{
alert
(
getLocalizedString
(
"already_processing_host_request"
));
alert
(
getLocalizedString
(
"already_processing_host_request"
));
return
;
return
;
...
...
public_new/js/sockets/chat-websocket-message.js
View file @
b952b542
...
@@ -59,7 +59,7 @@ var addCollaborationMessage = function (
...
@@ -59,7 +59,7 @@ var addCollaborationMessage = function (
)
{
)
{
const
collaborationType
=
messageInfo
[
2
];
const
collaborationType
=
messageInfo
[
2
];
const
meetingID
=
getMeetingID
(
collaborationType
,
messageInfo
);
const
meetingID
=
getMeetingID
(
collaborationType
,
messageInfo
);
const
userInCollaboration
=
getUserInfoList
(
userID
);
const
userInCollaboration
=
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
userID
)
);
userInCollaboration
.
forEach
(
function
(
user
)
{
userInCollaboration
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
...
@@ -120,7 +120,9 @@ var renderCollaborationMessage = function (
...
@@ -120,7 +120,9 @@ var renderCollaborationMessage = function (
var
addTextMessage
=
function
(
messageText
,
message
,
socketID
)
{
var
addTextMessage
=
function
(
messageText
,
message
,
socketID
)
{
const
messageTextWithSID
=
insertSID
(
messageText
);
const
messageTextWithSID
=
insertSID
(
messageText
);
const
messageSender
=
getUserInfoList
(
message
.
userId
);
const
messageSender
=
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
message
.
userId
)
);
const
shopMemberName
=
messageSender
[
0
].
shopMemberName
;
const
shopMemberName
=
messageSender
[
0
].
shopMemberName
;
const
textMessageTemplate
=
getTextMessageTemplate
(
message
.
id
===
socketID
);
const
textMessageTemplate
=
getTextMessageTemplate
(
message
.
id
===
socketID
);
const
profileImagePath
=
CHAT
.
getProfileImgUrl
(
message
.
profileImagePath
);
const
profileImagePath
=
CHAT
.
getProfileImgUrl
(
message
.
profileImagePath
);
...
@@ -164,11 +166,7 @@ var renderTextMessage = function (
...
@@ -164,11 +166,7 @@ var renderTextMessage = function (
};
};
var
getUserInfoList
=
function
(
userID
)
{
var
getUserInfoList
=
function
(
userID
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
userID
));
return
JSON
.
parse
(
CHAT_DB
.
getUserInfoList
(
userID
));
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getUserInfoList
(
userID
));
}
};
};
var
cleanUpCollaborationMessage
=
function
()
{
var
cleanUpCollaborationMessage
=
function
()
{
...
...
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