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
6e009873
Commit
6e009873
authored
Jul 13, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed CHAT_UI and CHAT js
parent
51b89259
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
560 additions
and
731 deletions
+560
-731
public_new/archive.html
+2
-6
public_new/archive_detail.html
+3
-8
public_new/chat.html
+2
-6
public_new/chat_add_user.html
+2
-6
public_new/chat_add_user_confirm.html
+1
-4
public_new/chat_change_room_name.html
+0
-4
public_new/chat_make_room.html
+1
-6
public_new/chat_make_room_confirm.html
+1
-6
public_new/chat_room.html
+14
-18
public_new/collaboration.html
+8
-14
public_new/collaboration_documents.html
+4
-8
public_new/collaboration_overlay_user_list.html
+2
-1
public_new/collaboration_picture.html
+6
-10
public_new/collaboration_video.html
+7
-10
public_new/collaboration_voice.html
+5
-13
public_new/collaboration_whiteboard.html
+5
-11
public_new/contact.html
+3
-8
public_new/footer_collabo.html
+5
-5
public_new/js/common/common.js
+26
-3
public_new/js/common/native-bridge-delegate.js
+1
-23
public_new/js/sockets/chat-websocket-message.js
+1
-1
public_new/js/sockets/chat-websocket.js
+2
-10
public_new/js/utils/chat-media-handler.js
+11
-11
public_new/js/views/archive/archive.js
+83
-50
public_new/js/views/chats/chat-list.js
+73
-105
public_new/js/views/chats/chat-room.js
+0
-0
public_new/js/views/chats/management/chat-add-user.js
+66
-38
public_new/js/views/chats/management/chat-make-room.js
+107
-10
public_new/js/views/chats/management/chat-management-common.js
+0
-95
public_new/js/views/collaboration/collaboration.js
+40
-35
public_new/js/views/collaboration/share.js
+24
-32
public_new/js/views/contact/contact.js
+0
-0
public_new/js/views/contact/namecard.js
+19
-138
public_new/modal_add_user_list.html
+3
-3
public_new/modal_collabo_profile.html
+2
-2
public_new/template/template_add_user_group_list.html
+1
-1
public_new/template/template_add_user_group_list_in_collaboration.html
+1
-1
public_new/template/template_add_user_group_path.html
+2
-2
public_new/template/template_add_user_group_path_in_collaboration.html
+2
-2
public_new/template/template_add_user_group_user_list.html
+1
-1
public_new/template/template_add_user_group_user_list_in_collaboration.html
+1
-1
public_new/template/template_chatroom_user_list.html
+1
-1
public_new/template/template_group_list.html
+3
-3
public_new/template/template_group_path.html
+2
-2
public_new/template/template_group_user_list.html
+4
-4
public_new/template/template_make_room_group_list.html
+1
-1
public_new/template/template_make_room_group_path.html
+2
-2
public_new/template/template_make_room_group_user_list.html
+1
-1
public_new/template/template_user_list.html
+3
-3
public_new/template/template_user_message.html
+1
-1
public_new/template/template_user_name_card.html
+5
-5
No files found.
public_new/archive.html
View file @
6e009873
...
...
@@ -18,7 +18,7 @@
<script>
window
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
CHAT_
UI
.
refreshArchiveScreen
();
Archive
UI
.
refreshArchiveScreen
();
});
</script>
</head>
...
...
@@ -149,12 +149,8 @@
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
ArchiveUI
.
refreshArchiveScreen
();
function
getGlobalParam
()
{
CHAT_UI
.
refreshArchiveScreen
();
};
</script>
</body>
...
...
public_new/archive_detail.html
View file @
6e009873
...
...
@@ -100,7 +100,7 @@
<
h2
class
=
"ttl"
id
=
"archiveSaveUser"
>
SaveUser
<
/h2
>
<
div
class
=
"d-flex flex-row"
>
<
div
class
=
"d-flex flex-column"
>
<
img
src
=
"{{profileImage}}"
alt
=
"プロフィール画像"
onclick
=
"
CHAT_UI
.makeNameCard({{userId}})"
>
<
img
src
=
"{{profileImage}}"
alt
=
"プロフィール画像"
onclick
=
"
Namecard
.makeNameCard({{userId}})"
>
<
p
>
{{
userName
}}
<
/p
>
<
/div
>
<
/div
>
...
...
@@ -124,12 +124,7 @@
<script>
var
archiveId
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
function
getGlobalParam
()
{
CHAT_UI
.
refreshArchiveDetailScreen
(
archiveId
);
};
ArchiveUI
.
refreshArchiveDetailScreen
(
archiveId
);
window
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
var
urlPrm
=
new
Object
;
...
...
@@ -140,7 +135,7 @@
if
(
typeof
(
android
)
!=
"undefined"
)
{
}
else
{
CHAT_
UI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
Archive
UI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
}
});
</script>
...
...
public_new/chat.html
View file @
6e009873
...
...
@@ -132,11 +132,6 @@
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
NativeBridgeDelegate
.
saveSelectedUserList
(
""
);
function
getGlobalParam
()
{
if
(
deviceInfo
.
isAndroid
())
{
var
needHostAlert
=
android
.
getExitHostAlert
();
if
(
needHostAlert
)
{
...
...
@@ -144,8 +139,9 @@
}
}
ChatList
.
refreshRoomList
(
ChatRoomType
.
GROUP
);
NativeBridgeDelegate
.
saveSelectedUserList
(
""
);
Common
.
dismissLoadingIndicator
();
};
</script>
</body>
...
...
public_new/chat_add_user.html
View file @
6e009873
...
...
@@ -160,10 +160,6 @@
return
this
.
split
(
org
).
join
(
dest
);
}
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
function
getGlobalParam
()
{
const
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
if
(
selectedUsers
!=
""
)
{
selectedUsers
.
forEach
(
function
(
user
)
{
...
...
@@ -176,8 +172,8 @@
}
else
{
$
(
'.select_member_num'
).
text
(
'0'
);
}
CHAT_UI
.
refreshMyGroupForAddUser
();
};
ChatAddUser
.
refreshMyGroupForAddUser
();
</script>
</body>
...
...
public_new/chat_add_user_confirm.html
View file @
6e009873
...
...
@@ -88,12 +88,9 @@
String
.
prototype
.
replaceAll
=
function
(
org
,
dest
)
{
return
this
.
split
(
org
).
join
(
dest
);
}
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
function
getGlobalParam
()
{
ChatManagementCommon
.
showAddUserConfirmView
();
};
</script>
</body>
...
...
public_new/chat_change_room_name.html
View file @
6e009873
...
...
@@ -89,10 +89,6 @@
}
let
roomId
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
function
getGlobalParam
()
{
};
</script>
</body>
...
...
public_new/chat_make_room.html
View file @
6e009873
...
...
@@ -161,10 +161,6 @@
return
this
.
split
(
org
).
join
(
dest
);
}
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
function
getGlobalParam
()
{
if
(
NativeBridgeDataSource
.
loadSelectedUsers
()
!=
""
)
{
let
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
selectedUsers
.
forEach
(
function
(
user
)
{
...
...
@@ -177,8 +173,7 @@
}
else
{
$
(
'.select_member_num'
).
text
(
'0'
);
}
CHAT_UI
.
refreshMyGroupForMakeRoom
();
};
ChatMakeRoom
.
refreshMyGroupForMakeRoom
();
</script>
</body>
...
...
public_new/chat_make_room_confirm.html
View file @
6e009873
...
...
@@ -96,14 +96,9 @@
return
this
.
split
(
org
).
join
(
dest
);
}
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
ChatManagementCommon
.
showMakeRoomConfirmView
();
$
(
"#newRoomName"
).
attr
(
"placeholder"
,
getLocalizedString
(
"newRoomName"
));
function
getGlobalParam
()
{
ChatManagementCommon
.
showMakeRoomConfirmView
();
};
</script>
</body>
...
...
public_new/chat_room.html
View file @
6e009873
...
...
@@ -92,39 +92,39 @@
<input
type=
"text"
name=
"message"
class=
"message_input_form"
id=
"messageInput"
placeholder=
"メッセージを入力してください"
maxlength=
"600"
>
<button
type=
"button"
name=
"button"
class=
"message_input_send none"
id=
"messageSend"
onclick=
"C
HAT_UI
.sendMessage(this);"
>
送信
</button>
onclick=
"C
hatRoom
.sendMessage(this);"
>
送信
</button>
</div>
</div>
<!-- フッター下 -->
<div
class=
"footer_content_b"
>
<div
class=
"d-flex flex-row justify-content-around h-100"
>
<div
class=
"footer_item"
>
<a
href=
"javascript:C
HAT_UI
.startCollaboration(COLLABORATION_TYPE.AUDIO);"
>
<a
href=
"javascript:C
hatRoom
.startCollaboration(COLLABORATION_TYPE.AUDIO);"
>
<img
src=
"icon/icon_phone.png"
alt=
"通話アイコン"
>
<p>
通話
</p>
</a>
</div>
<div
class=
"footer_item"
>
<a
href=
"javascript:C
HAT_UI
.startCollaboration(COLLABORATION_TYPE.DOCUMENT);"
>
<a
href=
"javascript:C
hatRoom
.startCollaboration(COLLABORATION_TYPE.DOCUMENT);"
>
<img
src=
"icon/icon_paste.png"
alt=
"文書アイコン"
>
<p>
文書
</p>
</a>
</div>
<div
class=
"footer_item"
>
<a
href=
"javascript:C
HAT_UI
.startCollaboration(COLLABORATION_TYPE.CAMERA);"
>
<a
href=
"javascript:C
hatRoom
.startCollaboration(COLLABORATION_TYPE.CAMERA);"
>
<img
src=
"icon/icon_photo.png"
alt=
"画像アイコン"
>
<p>
画像
</p>
</a>
</div>
<div
class=
"footer_item"
>
<a
href=
"javascript:C
HAT_UI
.startCollaboration(COLLABORATION_TYPE.VIDEO);"
>
<a
href=
"javascript:C
hatRoom
.startCollaboration(COLLABORATION_TYPE.VIDEO);"
>
<img
src=
"icon/icon_movie.png"
alt=
"動画アイコン"
>
<p>
動画
</p>
</a>
</div>
<!--リリース後開発予定-->
<div
class=
"footer_item"
>
<a
href=
"javascript:C
HAT_UI
.startCollaboration(COLLABORATION_TYPE.BOARD);"
>
<a
href=
"javascript:C
hatRoom
.startCollaboration(COLLABORATION_TYPE.BOARD);"
>
<img
src=
"icon/icon_whiteboard_gray.png"
alt=
"ホワイトボードアイコン"
>
<p>
ボード
</p>
</a>
...
...
@@ -187,24 +187,20 @@
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
if
(
deviceInfo
.
isAndroid
())
{
const
needHostAlert
=
android
.
getExitHostAlert
();
if
(
needHostAlert
)
{
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
}
}
ChatRoom
.
loadMessages
(
roomInfo
.
roomID
,
roomInfo
.
roomName
);
NativeBridgeDelegate
.
saveSelectedUserList
(
""
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
androidVersion
=
android
.
getAndroidVersion
();
}
function
getGlobalParam
()
{
if
(
deviceInfo
.
isAndroid
())
{
var
needHostAlert
=
android
.
getExitHostAlert
();
if
(
needHostAlert
)
{
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
}
}
CHAT_UI
.
loadMessages
(
roomInfo
.
roomID
,
roomInfo
.
roomName
);
};
</script>
</body>
...
...
public_new/collaboration.html
View file @
6e009873
...
...
@@ -179,24 +179,11 @@
let
joinMeetingId
=
0
;
let
androidVersion
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
function
startPipMode
()
{
NativeBridgeDelegate
.
startPIPMode
();
}
String
.
prototype
.
replaceAll
=
function
(
org
,
dest
)
{
return
this
.
split
(
org
).
join
(
dest
);
}
async
function
getGlobalParam
()
{
joinCollaborationType
=
NativeBridgeDataSource
.
getJoinCollaborationType
();
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
...
...
@@ -217,7 +204,14 @@
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
initialJoin
();
}
};
function
startPipMode
()
{
NativeBridgeDelegate
.
startPIPMode
();
}
String
.
prototype
.
replaceAll
=
function
(
org
,
dest
)
{
return
this
.
split
(
org
).
join
(
dest
);
}
</script>
</body>
...
...
public_new/collaboration_documents.html
View file @
6e009873
...
...
@@ -115,19 +115,15 @@
let
collaborationJoinFlg
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
DOCUMENT
;
CHAT_SOCKET
.
initialJoin
();
function
finishPipMode
()
{
NativeBridgeDelegate
.
finishPIPMode
();
}
async
function
getGlobalParam
()
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
DOCUMENT
;
CHAT_SOCKET
.
initialJoin
();
};
</script>
</body>
...
...
public_new/collaboration_overlay_user_list.html
View file @
6e009873
...
...
@@ -2,7 +2,8 @@
<div
class=
"user_list d-flex flex-wrap"
>
{{#joinedUserList}}
<div
class=
"user_item "
id=
"collaboration_user_{{loginId}}"
>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#profileModal1"
onclick=
"CHAT_UI.makeNameCardInCollaboration({{shopMemberId}})"
>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#profileModal1"
onclick=
"Namecard.makeNameCardInCollaboration({{shopMemberId}})"
>
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
alt=
"this.src='./img/noImage.png'"
/></div>
<span
class=
"name"
>
{{shopMemberName}}
</span>
</a>
...
...
public_new/collaboration_picture.html
View file @
6e009873
...
...
@@ -178,22 +178,18 @@
let
collaborationJoinFlg
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
async
function
getGlobalParam
()
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
CAMERA
;
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
initialJoin
();
}
};
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</body>
...
...
public_new/collaboration_video.html
View file @
6e009873
...
...
@@ -168,22 +168,18 @@
let
collaborationJoinFlg
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
async
function
getGlobalParam
()
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
VIDEO
;
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
initialJoin
();
}
};
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</html>
\ No newline at end of file
public_new/collaboration_voice.html
View file @
6e009873
...
...
@@ -109,25 +109,17 @@
$
(
"#collaboration_voice_overlay_menu"
).
load
(
"./collaboration_voice_overlay_menu.html"
);
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
let
collaborationJoinFlg
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
async
function
getGlobalParam
()
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
AUDIO
;
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
initialJoin
();
}
};
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</body>
...
...
public_new/collaboration_whiteboard.html
View file @
6e009873
...
...
@@ -169,23 +169,17 @@
let
collaborationJoinFlg
=
0
;
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
async
function
getGlobalParam
()
{
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
BOARD
;
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
initialJoin
();
}
};
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</body>
...
...
public_new/contact.html
View file @
6e009873
...
...
@@ -210,20 +210,15 @@
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
NativeBridgeDelegate
.
getLoginParameter
();
NativeBridgeDelegate
.
getGlobalParameter
();
function
getGlobalParam
()
{
const
groupID
=
NativeBridgeDataSource
.
getToMoveGroupId
();
if
(
groupID
!=
""
&&
groupID
!=
undefined
)
{
CHAT_UI
.
refreshAllGroupSearch
(
groupID
);
Contact
.
refreshAllGroupSearch
(
groupID
);
NativeBridgeDelegate
.
setToMoveGroupId
(
""
);
}
else
{
CHAT_UI
.
refreshContactScreen
();
Contact
.
refreshContactScreen
();
}
};
</script>
</body>
...
...
public_new/footer_collabo.html
View file @
6e009873
...
...
@@ -18,7 +18,7 @@
</a>
</div>
<div
class=
"footer_item mx-md-3 collaboration_contents picture_contents video_contents document_contents board_contents"
>
<a
href=
"javascript:
eraserToggle
();"
>
<a
href=
"javascript:
toggleEraser
();"
>
<div
class=
"d-flex flex-column justify-content-center"
id=
"eraserBtn"
>
<div
class=
"t-icon delete my-0"
></div>
<span
class=
"text-white txt"
>
削除
</span>
...
...
@@ -26,7 +26,7 @@
</a>
</div>
<div
class=
"footer_item mx-md-3 collaboration_contents video_contents_host"
>
<a
href=
"javascript:
captureToggl
e();"
>
<a
href=
"javascript:
toggleCaptur
e();"
>
<div
class=
"d-flex flex-column justify-content-center"
id=
"captureBtn"
>
<div
class=
"t-icon capture my-0"
></div>
<span
class=
"text-white txt"
>
キャプチャ
</span>
...
...
@@ -34,7 +34,7 @@
</a>
</div>
<div
class=
"footer_item mx-md-3 collaboration_contents video_contents_user"
>
<a
href=
"javascript:
captureRequestToggle
();"
>
<a
href=
"javascript:
toggleCaptureRequest
();"
>
<div
class=
"d-flex flex-column justify-content-center"
id=
"captureRequestBtn"
>
<div
class=
"t-icon capture my-0"
></div>
<span
class=
"text-white txt"
>
キャプチャリクエスト
</span>
...
...
@@ -42,7 +42,7 @@
</a>
</div>
<div
class=
"footer_item mx-md-3"
>
<a
href=
"javascript:
micTogle
();"
>
<a
href=
"javascript:
toggleMic
();"
>
<div
class=
"d-flex flex-column justify-content-center"
id=
"micBtn"
>
<div
class=
"t-icon voice my-0"
></div>
<span
class=
"text-white txt"
>
マイク
</span>
...
...
@@ -50,7 +50,7 @@
</a>
</div>
<div
class=
"footer_item mx-md-3 none host_contents"
>
<a
href=
"javascript:
recordTogle
();"
>
<a
href=
"javascript:
toggleRecord
();"
>
<div
class=
"d-flex flex-column justify-content-center"
id=
"recordBtn"
>
<div
class=
"t-icon record my-0"
></div>
<span
class=
"text-white txt"
>
録音
</span>
...
...
public_new/js/common/common.js
View file @
6e009873
...
...
@@ -74,22 +74,45 @@ var Common = {};
//loadingIndicatorを表示
Common
.
showLoadingIndicator
=
function
()
{
var
h
=
$
(
window
).
height
();
const
h
=
$
(
window
).
height
();
$
(
"#loader-bg ,#loader"
).
height
(
h
).
css
(
"display"
,
"block"
);
};
//loadingIndicatorを表示しない
Common
.
dismissLoadingIndicator
=
function
()
{
var
h
=
$
(
window
).
height
();
const
h
=
$
(
window
).
height
();
$
(
"#loader-bg ,#loader"
).
height
(
h
).
css
(
"display"
,
"none"
);
};
Common
.
refreshForOnline
=
function
()
{
serverInfo
.
isOnline
=
"true"
;
$
(
".footer_item a"
).
removeClass
(
"ui-state-disabled"
);
if
(
ChatList
!=
"undefined"
)
{
ChatList
.
refreshForOnline
();
}
if
(
ChatRoom
!=
"undefined"
)
{
ChatRoom
.
refreshForOnline
();
}
if
(
Namecard
!=
"undefined"
)
{
Namecard
.
refreshForOnline
();
}
};
Common
.
refreshForOffline
=
function
()
{
serverInfo
.
isOnline
=
"false"
;
$
(
".footer_item a"
).
addClass
(
"ui-state-disabled"
);
if
(
ChatList
!=
"undefined"
)
{
ChatList
.
refreshForOffline
();
}
if
(
ChatRoom
!=
"undefined"
)
{
ChatRoom
.
refreshForOffline
();
}
if
(
CollaborationUI
!=
"undefined"
)
{
CollaborationUI
.
refreshForOffline
();
}
if
(
Namecard
!=
"undefined"
)
{
Namecard
.
refreshForOffline
();
}
};
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
...
...
@@ -99,7 +122,7 @@ Common.getProfileImgUrl = function (path) {
return
"./img/noImage.png"
;
}
else
{
if
(
path
.
includes
(
"/mnt"
))
{
var
userInfo
=
path
.
split
(
"/"
).
reverse
();
const
userInfo
=
path
.
split
(
"/"
).
reverse
();
return
(
serverInfo
.
cmsURL
+
"/chatapi/user?profileFileName="
+
...
...
public_new/js/common/native-bridge-delegate.js
View file @
6e009873
...
...
@@ -124,22 +124,6 @@ NativeBridgeDelegate.inviteUsers = function (userIDList) {
}
};
NativeBridgeDelegate
.
getLoginParameter
=
function
()
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
getLoginParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
}
};
NativeBridgeDelegate
.
getGlobalParameter
=
function
()
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
};
NativeBridgeDelegate
.
saveSelectedUserList
=
function
(
selectedUserList
)
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
saveSelectedUserList
(
selectedUserList
);
...
...
@@ -377,14 +361,8 @@ ReverseDelegate.leaveRoom = function () {
CHAT_SOCKET
.
emitLeaveRoom
();
};
// 該当チャットルームに参加するためログイン情報をサーバに渡す
getLoginParameter
=
function
()
{
Common
.
dismissLoadingIndicator
();
};
// for android call
CHAT_UI
.
displayExistRoom
=
function
(
roomId
)
{
ReverseDelegate
.
displayExistRoom
=
function
(
roomId
)
{
if
(
confirm
(
"error_already_exist_same_user"
))
{
NativeBridgeDelegate
.
joinRoom
(
roomId
);
}
...
...
public_new/js/sockets/chat-websocket-message.js
View file @
6e009873
...
...
@@ -37,7 +37,7 @@ var bindOnNewMessage = function () {
// 画像、動画の描画を待ってからスクロール
setTimeout
(
function
()
{
C
HAT_UI
.
scrollToBottom
();
C
hatRoom
.
scrollToBottom
();
},
300
);
});
};
...
...
public_new/js/sockets/chat-websocket.js
View file @
6e009873
...
...
@@ -49,10 +49,6 @@ var bindOnConnect = function () {
socket
.
on
(
SOCKET_KEY
.
CONNECT
,
function
()
{
// socketが接続されたらチャット画面で画面を更新する
$
(
".overlay"
).
removeClass
(
"active undismissable"
);
// loadingIndicatorを表示
Common
.
showLoadingIndicator
();
NativeBridgeDelegate
.
getLoginParameter
();
Common
.
dismissLoadingIndicator
();
});
};
...
...
@@ -135,13 +131,9 @@ var bindOnShowServerError = function () {
var
bindOnRetryJoinProcess
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
RETRY_JOIN_PROCESS
,
function
()
{
if
(
deviceInfo
.
isiOS
()
||
deviceInfo
.
isAndroid
())
{
NativeBridgeDelegate
.
getLoginParameter
();
}
else
{
currentUserInfo
.
configureLanguage
();
// webでのsocket connect
CHAT_SOCKET
.
emitJoin
(
params
,
true
,
true
);
}
});
};
...
...
@@ -215,7 +207,7 @@ CHAT_SOCKET.saveRoomInfo = function (roomID, roomName) {
NativeBridgeDelegate
.
saveVisitRoomInfo
(
roomID
,
roomName
);
};
CHAT_SOCKET
.
initialJoin
=
function
()
{
CHAT_SOCKET
.
initialJoin
=
function
()
{
CHAT_SOCKET
.
connectSocket
();
const
joinInfo
=
new
JoinInfo
(
currentUserInfo
.
sid
,
...
...
@@ -226,4 +218,4 @@ CHAT_SOCKET.initialJoin = function() {
currentUserInfo
.
shopMembeID
);
CHAT_SOCKET
.
emitJoin
(
joinInfo
,
false
,
false
);
}
}
;
public_new/js/utils/chat-media-handler.js
View file @
6e009873
var
c
hatMediaHandler
=
{};
var
C
hatMediaHandler
=
{};
/**
* Image Upload
...
...
@@ -25,7 +25,7 @@ $("#image-form").on("submit", function (e) {
var
fd
=
new
FormData
(
$
(
this
)[
0
]);
console
.
log
(
$
(
this
)[
0
]);
//画像の大きさが500pixelより大きかったら、thumbnailを生成
C
HAT
.
createThumbnailAndUpload
(
C
hatMediaHandler
.
createThumbnailAndUpload
(
file
,
function
(
resizeFile
,
thumbnailCreated
)
{
if
(
resizeFile
&&
thumbnailCreated
)
{
...
...
@@ -34,7 +34,7 @@ $("#image-form").on("submit", function (e) {
}
// イメージをアップロード
C
HAT
.
uploadImage
(
fd
);
C
hatMediaHandler
.
uploadImage
(
fd
);
}
);
}
...
...
@@ -66,27 +66,27 @@ $("#video-form").on("submit", function (e) {
if
(
!
file
.
type
.
includes
(
"image"
))
{
// video 保存
// C
HAT
.createVideoThumbnailAndUpload(file, function(resizeFile, thumbnailCreated) {
// C
hatMediaHandler
.createVideoThumbnailAndUpload(file, function(resizeFile, thumbnailCreated) {
// if(resizeFile && thumbnailCreated) {
// //ただ、画像の大きさが500pixel以下の場合はthumbnailは生成されない
// fd.append('thumb', resizeFile)
// }
// C
HAT
.uploadImage(fd);
// C
hatMediaHandler
.uploadImage(fd);
// })
C
HAT
.
uploadImage
(
fd
);
C
hatMediaHandler
.
uploadImage
(
fd
);
return
;
}
}
});
// this method call from android only for now
C
HAT_UI
.
videoEncodeFail
=
function
()
{
C
hatMediaHandler
.
videoEncodeFail
=
function
()
{
alert
(
getLocalizedString
(
"error_send_video"
));
Common
.
dismissLoadingIndicator
();
};
// this method call from android only for now
C
HAT_UI
.
videoEncodeEnd
=
function
(
encodedUri
)
{
C
hatMediaHandler
.
videoEncodeEnd
=
function
(
encodedUri
)
{
var
fileName
=
encodedUri
.
split
(
"/"
)[
encodedUri
.
split
(
"/"
).
length
-
1
];
var
fileURL
=
"file:"
+
encodedUri
;
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -182,7 +182,7 @@ CHAT_UI.videoEncodeEnd = function (encodedUri) {
// Video のサムネイルファイル生成する
C
HAT
.
createVideoThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
C
hatMediaHandler
.
createVideoThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
var
fileReader
=
new
FileReader
();
fileReader
.
onload
=
function
()
{
...
...
@@ -241,7 +241,7 @@ CHAT.createVideoThumbnailAndUpload = function (sourceImage, callback) {
// Ajaxでイメージをアップロードする
C
HAT
.
uploadImage
=
function
(
formData
)
{
C
hatMediaHandler
.
uploadImage
=
function
(
formData
)
{
formData
.
append
(
"roomId"
,
roomInfo
.
roomID
);
formData
.
append
(
"sid"
,
currentUserInfo
.
sid
);
jQuery
...
...
@@ -381,7 +381,7 @@ CHAT.uploadImage = function (formData) {
// Thumbnailのファイルを生成する。
C
HAT
.
createThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
C
hatMediaHandler
.
createThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
const
fileReader
=
new
FileReader
();
const
img
=
new
Image
();
fileReader
.
onloadend
=
function
()
{
...
...
public_new/js/views/archive/archive.js
View file @
6e009873
// 名前空間
var
A
RCHIVE_
UI
=
{};
var
A
rchive
UI
=
{};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
// アーカイブ検索
...
...
@@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", function () {
bindiOSKeyBoardEvent
();
});
A
RCHIVE_
UI
.
refreshSearchScreen
=
function
(
keyword
)
{
A
rchive
UI
.
refreshSearchScreen
=
function
(
keyword
)
{
const
archiveList
=
NativeBridgeDataSource
.
getArchiveByName
(
keyword
);
const
typeImage
=
getArchiveTypeIconURL
(
archive
.
archiveType
);
...
...
@@ -77,7 +77,7 @@ var bindArchiveSearch = function () {
}
$
(
".overlay_src_msg"
).
empty
();
A
RCHIVE_
UI
.
refreshSearchScreen
(
keyword
);
A
rchive
UI
.
refreshSearchScreen
(
keyword
);
if
(
enterKeyPressed
)
{
searchInput
.
blur
();
...
...
@@ -93,7 +93,7 @@ var bindiOSKeyBoardEvent = function () {
if
(
deviceInfo
.
isiOS
())
{
var
keyword
=
searchInput
.
val
();
$
(
".overlay_src_msg"
).
empty
();
A
RCHIVE_
UI
.
refreshSearchScreen
(
keyword
);
A
rchive
UI
.
refreshSearchScreen
(
keyword
);
}
});
};
...
...
@@ -113,26 +113,60 @@ var renderArchiveTemplate = function (
});
};
// アーカイブ詳細
CHAT_UI
.
refreshArchiveDetailScreen
=
function
(
archiveId
)
{
/*****************
* アーカイブ詳細
****************/
ArchiveUI
.
refreshArchiveDetailScreen
=
function
(
archiveId
)
{
// loadingIndicatorを表示
Common
.
showLoadingIndicator
();
// 初期化
$
(
"#archiveDetail"
).
html
(
""
);
// アーカイブ詳細の様式を読み込む
const
archiveDetailTemplate
=
$
(
"#archive-detail-template"
).
html
();
if
(
serverInfo
.
isOnline
==
"true"
)
{
NativeBridgeDelegate
.
updateArchiveDetail
(
archiveId
);
}
// アーカイブ詳細取得
const
archive
=
NativeBridgeDataSource
.
getArchiveDetail
(
archiveId
);
// template archive detail
appendArchiveDetailScreen
(
archive
);
// setup player
appendPlayer
(
archive
);
// append attended users
appendAttendUsers
(
archive
.
attendUserIds
);
// set languages
currentUserInfo
.
configureLanguage
();
// TODO: peacekim:: check localization works or not
$
(
".ttl_detail"
).
text
(
getLocalizedString
(
"detail"
));
$
(
"#archiveFileName"
).
text
(
getLocalizedString
(
"archiveFileName"
));
$
(
"#archiveInsertDate"
).
text
(
getLocalizedString
(
"archiveInsertDate"
));
$
(
"#archiveRoomName"
).
text
(
getLocalizedString
(
"archiveRoomName"
));
$
(
"#archiveSaveUser"
).
text
(
getLocalizedString
(
"archiveSaveUser"
));
$
(
"#archiveAttendUser"
).
text
(
getLocalizedString
(
"archiveAttendUser"
));
// チャットルームへのリンク付け
document
.
getElementById
(
"joinChatRoom"
).
onclick
=
function
()
{
NativeBridgeDelegate
.
joinRoom
(
archive
.
roomId
,
archive
.
roomName
);
};
// loadingIndicatorを非表示
Common
.
dismissLoadingIndicator
();
};
var
appendArchiveDetailScreen
=
function
(
archive
)
{
// 保存ユーザ情報を取得
const
userInfo
=
NativeBridgeDataSource
.
getUserInfo
(
archive
.
saveUserId
);
userInfo
.
profileUrl
=
Common
.
getProfileImgUrl
(
userInfo
.
profileUrl
);
// アーカイブ詳細の様式を読み込む
const
archiveDetailTemplate
=
$
(
"#archive-detail-template"
).
html
();
// アーカイブ情報を表示
const
html
=
Mustache
.
render
(
archiveDetailTemplate
,
{
fileName
:
archive
.
archiveName
,
...
...
@@ -146,9 +180,11 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#archiveDetail"
).
append
(
obj
);
};
var
appendPlayer
=
function
(
archive
)
{
// プレイヤーの切り替え
const
archiveFilePath
=
CHAT
.
createGetDataUrl
(
const
archiveFilePath
=
ArchiveUI
.
createGetDataUrl
(
archive
.
filePath
,
archive
.
roomId
);
...
...
@@ -156,59 +192,73 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
switch
(
archive
.
archiveType
)
{
case
"0"
:
// 画像
case
0
:
$
(
"#archive_player"
).
prepend
(
'<img class="archive_player" src="'
+
archiveFilePath
+
'" />'
);
appendImageTypePlayer
(
archiveFilePath
);
break
;
case
"1"
:
// 動画
case
1
:
appendVideoTypePlayer
(
archiveFilePath
);
break
;
case
"2"
:
// 音声
case
2
:
appendVoiceTypePlayer
(
archiveFilePath
);
break
;
case
"3"
:
// 文書
case
3
:
// リリースに文書とその他は含めないため今回は非表示
break
;
default
:
// リリースに文書とその他は含めないため今回は非表示
}
};
var
appendImageTypePlayer
=
function
(
filePath
)
{
$
(
"#archive_player"
).
prepend
(
'<img class="archive_player" src="'
+
filePath
+
'" />'
);
};
var
appendVideoTypePlayer
=
function
(
filePath
)
{
if
(
deviceInfo
.
isiOS
())
{
$
(
"#archive_player"
).
prepend
(
'<video class="archive_player" controls autoplay muted playsinline controlsList="nodownload"><source src="'
+
archiveF
ilePath
+
f
ilePath
+
'" type="video/mp4"><source src="'
+
archiveF
ilePath
+
f
ilePath
+
'" type="video/ogv"><source src="'
+
archiveF
ilePath
+
f
ilePath
+
'" type="video/webm"></video>'
);
}
else
{
$
(
"#archive_player"
).
prepend
(
'<video class="archive_player" src='
+
archiveF
ilePath
+
f
ilePath
+
' controls autoplay muted playsinline controlsList="nodownload"></video>'
);
}
break
;
case
"2"
:
// 音声
case
2
:
}
;
var
appendVoiceTypePlayer
=
function
(
filePath
)
{
if
(
deviceInfo
.
isiOS
())
{
$
(
"#archive_player"
).
prepend
(
'<audio class="archive_audio_player" controls controlsList="nodownload"><source src="'
+
archiveF
ilePath
+
f
ilePath
+
'" type="audio/wav"><source src="'
+
archiveF
ilePath
+
f
ilePath
+
'" type="audio/ogg"></audio>'
);
}
else
{
$
(
"#archive_player"
).
prepend
(
'<audio class="archive_audio_player" src='
+
archiveF
ilePath
+
f
ilePath
+
' controls controlsList="nodownload"></audio>'
);
}
$
(
"#archive_player"
).
prepend
(
'<img class="archive_player" src='
+
"./img/capture.png"
+
" />"
);
break
;
case
"3"
:
// 文書
case
3
:
// リリースに文書とその他は含めないため今回は非表示
break
;
default
:
// リリースに文書とその他は含めないため今回は非表示
}
};
var
appendAttendUsers
=
function
(
attendedUserList
)
{
// ユーザの様式を読み込む
const
archiveUserTemplate
=
$
(
"#archive-user-template"
).
html
();
...
...
@@ -232,31 +282,14 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
const
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{
// ネームカード表示
CHAT_UI
.
makeNameCard
(
user
);
Namecard
.
makeNameCard
(
user
);
});
$
(
"#attendUser"
).
append
(
obj
);
});
currentUserInfo
.
configureLanguage
();
// TODO: peacekim:: check localization works or not
$
(
".ttl_detail"
).
text
(
getLocalizedString
(
"detail"
));
$
(
"#archiveFileName"
).
text
(
getLocalizedString
(
"archiveFileName"
));
$
(
"#archiveInsertDate"
).
text
(
getLocalizedString
(
"archiveInsertDate"
));
$
(
"#archiveRoomName"
).
text
(
getLocalizedString
(
"archiveRoomName"
));
$
(
"#archiveSaveUser"
).
text
(
getLocalizedString
(
"archiveSaveUser"
));
$
(
"#archiveAttendUser"
).
text
(
getLocalizedString
(
"archiveAttendUser"
));
// チャットルームへのリンク付け
document
.
getElementById
(
"joinChatRoom"
).
onclick
=
function
()
{
NativeBridgeDelegate
.
joinRoom
(
archive
.
roomId
,
archive
.
roomName
);
};
// loadingIndicatorを非表示
Common
.
dismissLoadingIndicator
();
};
CHAT
.
createGetDataUrl
=
function
(
fileName
,
roomId
)
{
ArchiveUI
.
createGetDataUrl
=
function
(
fileName
,
roomId
)
{
var
filePath
=
serverInfo
.
cmsURL
+
"/chatapi/file/getImage?sid="
+
...
...
@@ -269,7 +302,7 @@ CHAT.createGetDataUrl = function (fileName, roomId) {
};
// アーカイブ一覧
CHAT_
UI
.
refreshArchiveScreen
=
function
()
{
Archive
UI
.
refreshArchiveScreen
=
function
()
{
// loadingIndicatorを表示
Common
.
showLoadingIndicator
();
...
...
public_new/js/views/chats/chat-list.js
View file @
6e009873
...
...
@@ -9,6 +9,10 @@ $("#tabGroup").on("click", function (e) {
});
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
bindChatSearch
();
});
var
bindChatSearch
=
function
()
{
const
chatSearchInput
=
$
(
'#chat .search_form input[type="search"]'
);
const
chatSearchCancel
=
$
(
"#chat .search_form .cancel"
);
chatSearchInput
.
click
(
function
()
{
...
...
@@ -25,7 +29,8 @@ document.addEventListener("DOMContentLoaded", function () {
chatSearchInput
.
keyup
(
function
(
e
)
{
var
rooms
;
var
keyword
=
chatSearchInput
.
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
const
enterKeyPressed
=
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
;
if
(
enterKeyPressed
)
{
if
(
keyword
.
length
!=
0
&&
keyword
!=
""
)
{
chatSearchInput
.
blur
();
return
;
...
...
@@ -34,24 +39,22 @@ document.addEventListener("DOMContentLoaded", function () {
$
(
".overlay_src_msg"
).
empty
();
return
;
}
C
HAT
.
searchRoom
(
keyword
,
rooms
);
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
C
hatList
.
searchRoom
(
keyword
,
rooms
);
if
(
e
nterKeyPressed
)
{
chatSearchInput
.
blur
();
return
;
}
});
// iOSキーボード変換検知用
chatSearchInput
.
on
(
"compositionend"
,
function
()
{
chatSearchInput
.
on
(
"compositionend"
,
function
()
{
if
(
deviceInfo
.
isIOS
())
{
var
rooms
;
var
keyword
=
chatSearchInput
.
val
();
CHAT
.
searchRoom
(
keyword
,
rooms
);
}
ChatList
.
searchRoom
(
keyword
,
rooms
);
}
);
}
)
;
}
);
};
ChatList
.
refreshRoomList
=
function
(
roomType
)
{
if
(
serverInfo
.
isOnline
==
"true"
)
{
...
...
@@ -81,82 +84,15 @@ ChatList.refreshRoomList = function (roomType) {
$
(
"#dmChatList"
).
empty
();
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
$
(
"#chatTitle"
).
text
(
roomListTitle
);
if
(
rooms
.
length
===
0
)
{
// 検索結果がない場合のメッセージを追加
let
emptyListString
=
getLocalizedString
(
"roomListEmptyString"
);
switch
(
roomType
)
{
case
ChatRoomType
.
GROUP
:
$
(
"#groupChatList"
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
break
;
case
ChatRoomType
.
DM
:
$
(
"#dmChatList"
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
break
;
default
:
}
addEmptyRoomListLabel
(
roomType
);
}
var
template
=
getTemplate
(
TemplateURL
.
ROOM_LIST
);
const
template
=
getTemplate
(
TemplateURL
.
ROOM_LIST
);
rooms
.
forEach
(
function
(
room
)
{
room
.
profileImagePath
=
"./images/user-profile.png"
;
if
(
room
.
message
)
{
room
.
message
=
room
.
message
.
toString
();
}
else
{
room
.
message
=
getLocalizedString
(
"noMessages"
);
}
var
displayMsg
;
//TODO 協業の場合処理追加必要
switch
(
room
.
messageType
)
{
case
MessageType
.
TEXT
:
displayMsg
=
room
.
message
;
break
;
case
MessageType
.
IMAGE
:
displayMsg
=
getLocalizedString
(
"image"
);
break
;
case
MessageType
.
VIDEO
:
displayMsg
=
getLocalizedString
(
"video"
);
break
;
case
MessageType
.
COMMUNICATIONSTART
:
displayMsg
=
getLocalizedString
(
"collaboration_start"
);
break
;
case
MessageType
.
COMMUNICATIONEND
:
displayMsg
=
getLocalizedString
(
"collaboration_end"
);
break
;
default
:
break
;
}
var
attendUserName
=
[];
room
.
attendUsers
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
attendUserName
.
push
(
user
.
shopMemberName
);
});
var
thumbnailCount
=
room
.
attendUsers
.
length
>
4
?
4
:
room
.
attendUsers
.
length
;
if
(
room
.
chatRoomName
==
""
)
{
room
.
chatRoomName
=
attendUserName
.
join
(
", "
);
}
var
unreadMessageCount
=
room
.
unreadCount
==
0
?
""
:
room
.
unreadCount
;
if
(
unreadMessageCount
>
999
)
{
unreadMessageCount
=
"999+"
;
}
let
html
=
Mustache
.
render
(
template
,
{
thumbnailCount
:
thumbnailCount
,
roomName
:
room
.
chatRoomName
,
roomId
:
room
.
chatRoomId
,
profileImage
:
room
.
profileImagePath
,
lastMessage
:
displayMsg
,
time
:
room
.
insertDate
?
CHAT_UTIL
.
formatDate
(
room
.
insertDate
).
createdAt
:
""
,
unreadMsgCnt
:
unreadMessageCount
,
userCnt
:
room
.
attendUsers
.
length
+
1
,
attendUsers
:
room
.
attendUsers
,
});
let
html
=
renderRoom
(
template
,
room
);
// Click event
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{
//TODO ルームに入る処理追加必要
...
...
@@ -170,15 +106,52 @@ ChatList.refreshRoomList = function (roomType) {
$
(
"#dmChatList"
).
append
(
obj
);
break
;
default
:
break
;
}
});
console
.
log
(
"DONE"
);
Common
.
dismissLoadingIndicator
();
};
var
addEmptyRoomListLabel
=
function
(
roomType
)
{
// 検索結果がない場合のメッセージを追加
const
emptyListString
=
getLocalizedString
(
"roomListEmptyString"
);
switch
(
roomType
)
{
case
ChatRoomType
.
GROUP
:
$
(
"#groupChatList"
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
break
;
case
ChatRoomType
.
DM
:
$
(
"#dmChatList"
).
append
(
`<center class="text-secondary">
${
emptyListString
}
</center>`
);
break
;
default
:
}
};
var
getDefaultChatRoomName
=
function
(
roomAttendUsers
)
{
let
attendUserName
=
[];
roomAttendUsers
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
attendUserName
.
push
(
user
.
shopMemberName
);
});
return
attendUserName
.
join
(
", "
);
};
var
getUnreadCount
=
function
(
roomUnreadCount
)
{
if
(
roomUnreadCount
==
0
)
{
return
""
;
}
else
if
(
roomUnreadCount
>
999
)
{
return
"999+"
;
}
return
roomUnreadCount
;
};
// チャットルーム検索
C
HAT
.
searchRoom
=
function
(
keyword
,
rooms
)
{
C
hatList
.
searchRoom
=
function
(
keyword
,
rooms
)
{
const
overlayMessage
=
$
(
".overlay_src_msg"
);
overlayMessage
.
empty
();
rooms
=
NativeBridgeDataSource
.
getRoomList
(
ChatRoomType
.
ALL
,
keyword
);
...
...
@@ -187,11 +160,7 @@ CHAT.searchRoom = function (keyword, rooms) {
var
template
=
getTemplate
(
TemplateURL
.
ROOM_LIST
);
rooms
.
forEach
(
function
(
room
)
{
room
.
profileImagePath
=
"./images/user-profile.png"
;
const
roomMessage
=
getRoomMessage
(
room
.
message
);
const
displayMessage
=
getDisplayMessage
(
room
.
messageType
,
roomMessage
);
let
html
=
renderRoom
(
template
,
room
,
displayMessage
);
let
html
=
renderRoom
(
template
,
room
);
// Click event
let
obj
=
jQuery
.
parseHTML
(
html
);
...
...
@@ -227,24 +196,25 @@ var getDisplayMessage = function (messageType, roomMessage) {
case
MessageType
.
COMMUNICATIONEND
:
return
getLocalizedString
(
"collaboration_end"
);
default
:
return
""
;
return
roomMessage
;
}
};
var
renderRoom
=
function
(
template
,
room
,
displayMessage
)
{
var
attendUserName
=
[];
room
.
attendUsers
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
attendUserName
.
push
(
user
.
shopMemberName
);
});
var
renderRoom
=
function
(
template
,
room
)
{
room
.
profileImagePath
=
"./images/user-profile.png"
;
const
roomMessage
=
getRoomMessage
(
room
.
message
);
const
displayMessage
=
getDisplayMessage
(
room
.
messageType
,
roomMessage
);
const
thumbnailCount
=
room
.
attendUsers
.
length
>
4
?
4
:
room
.
attendUsers
.
length
;
const
time
=
room
.
insertDate
?
CHAT_UTIL
.
formatDate
(
room
.
insertDate
).
createdAt
:
""
;
if
(
room
.
chatRoomName
==
""
)
{
room
.
chatRoomName
=
attendUserName
.
join
(
", "
);
room
.
chatRoomName
=
getDefaultChatRoomName
(
room
.
attendUsers
);
}
const
messageUnreadCount
=
getUnreadCount
(
room
.
unreadCount
);
return
Mustache
.
render
(
template
,
{
thumbnailCount
:
thumbnailCount
,
roomName
:
room
.
chatRoomName
,
...
...
@@ -252,24 +222,22 @@ var renderRoom = function (template, room, displayMessage) {
profileImage
:
room
.
profileImagePath
,
lastMessage
:
displayMessage
,
time
:
time
,
unreadMsgCnt
:
room
.
unreadCount
==
0
?
""
:
room
.
u
nreadCount
,
unreadMsgCnt
:
messageU
nreadCount
,
userCnt
:
room
.
attendUsers
.
length
+
1
,
attendUsers
:
room
.
attendUsers
,
});
};
CHAT_UI
.
refreshForOnline
=
function
()
{
serverInfo
.
isOnline
=
"true"
;
$
(
".craeteRoomButton"
).
off
(
"click"
,
CHAT_UI
.
offlineHandler
);
ChatList
.
refreshForOnline
=
function
()
{
$
(
".craeteRoomButton"
).
off
(
"click"
,
ChatList
.
offlineHandler
);
$
(
".craeteRoomButton"
).
css
(
"opacity"
,
"1.0"
);
};
CHAT_UI
.
refreshForOffline
=
function
()
{
serverInfo
.
isOnline
=
"false"
;
$
(
".craeteRoomButton"
).
on
(
"click"
,
CHAT_UI
.
offlineHandler
);
ChatList
.
refreshForOffline
=
function
()
{
$
(
".craeteRoomButton"
).
on
(
"click"
,
ChatList
.
offlineHandler
);
$
(
".craeteRoomButton"
).
css
(
"opacity"
,
"0.3"
);
}
}
;
C
HAT_UI
.
offlineHandler
=
function
(
e
)
{
C
hatList
.
offlineHandler
=
function
(
e
)
{
e
.
preventDefault
();
};
public_new/js/views/chats/chat-room.js
View file @
6e009873
This diff is collapsed.
Click to expand it.
public_new/js/views/chats/management/chat-add-user.js
View file @
6e009873
...
...
@@ -146,21 +146,20 @@ var renderUserTemplate = function (userTemplate, userList) {
};
$
(
"#addUserConfirmBtn"
).
on
(
"click"
,
function
(
e
)
{
const
selectedUserList
=
ChatManagementCommon
.
selectedUserList
.
join
(
","
);
const
selectedUserList
=
ChatManagementCommon
.
selectedUserList
.
join
(
","
);
NativeBridgeDelegate
.
saveSelectedUserList
(
selectedUserList
);
$
(
"#addUserForm"
).
submit
();
});
$
(
"#tabAllGroupOnAddUser"
).
on
(
"click"
,
function
(
e
)
{
C
HAT_UI
.
refreshAllGroupForAddUser
(
"0"
);
C
hatAddUser
.
refreshAllGroupForAddUser
(
"0"
);
});
$
(
"#tabMyGroupOnAddUser"
).
on
(
"click"
,
function
(
e
)
{
C
HAT_UI
.
refreshMyGroupForAddUser
();
C
hatAddUser
.
refreshMyGroupForAddUser
();
});
C
HAT_UI
.
refreshMyGroupForAddUser
=
function
()
{
C
hatAddUser
.
refreshMyGroupForAddUser
=
function
()
{
$
(
".modal-backdrop"
).
remove
();
$
(
"#favoriteListForMakeRoom"
).
html
(
""
);
$
(
"#myGroupListForMakeRoom"
).
html
(
""
);
...
...
@@ -168,17 +167,21 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
let
contactListTitle
=
getLocalizedString
(
"userSearch"
);
$
(
"#title"
).
text
(
contactListTitle
);
// グループの様式を読み込む
var
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST
);
// ユーザの様式を読み込む
var
userTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_USER_LIST
);
var
groupUserTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_USER_LIST
);
NativeBridgeDelegate
.
updateContactInfo
();
//お気に入りグループ取得。
var
favoriteGroupList
=
NativeBridgeDataSource
.
getFavoriteGroups
();
// お気に入りグループ表示
ChatAddUser
.
appendFavoriteGroup
();
// お気に入りユーザー表示
ChatAddUser
.
appendFavoriteUser
();
// マイグループ表示
ChatAddUser
.
appendMyGroupList
();
};
ChatAddUser
.
appendFavoriteGroup
=
function
()
{
// グループの様式を読み込む
const
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST
);
// お気に入りグループ取得。
const
favoriteGroupList
=
NativeBridgeDataSource
.
getFavoriteGroups
();
favoriteGroupList
.
forEach
(
function
(
favoriteGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
favoriteGroup
.
groupName
,
...
...
@@ -188,8 +191,13 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#favoriteListForMakeRoom"
).
append
(
obj
);
});
};
ChatAddUser
.
appendFavoriteUser
=
function
()
{
// ユーザの様式を読み込む
const
userTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_USER_LIST
);
//お気に入りユーザ取得。
var
favoriteUserList
=
NativeBridgeDataSource
.
getFavoriteUsersNotInRoom
();
const
favoriteUserList
=
NativeBridgeDataSource
.
getFavoriteUsersNotInRoom
();
favoriteUserList
.
forEach
(
function
(
favoriteUser
)
{
favoriteUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
favoriteUser
.
profileUrl
);
let
findObj
=
ChatManagementCommon
.
selectedUserList
.
find
(
function
(
...
...
@@ -206,8 +214,11 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#favoriteListForMakeRoom"
).
append
(
obj
);
};
var
myGroupList
=
NativeBridgeDataSource
.
getMyGroupUsersNotInRoom
();
ChatAddUser
.
appendMyGroupList
=
function
()
{
const
groupUserTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_USER_LIST
);
const
myGroupList
=
NativeBridgeDataSource
.
getMyGroupUsersNotInRoom
();
myGroupList
.
forEach
(
function
(
myGroup
)
{
myGroup
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
...
...
@@ -230,44 +241,40 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
});
};
CHAT_UI
.
refreshAllGroupForAddUser
=
function
(
paramGroupId
)
{
var
groupId
=
paramGroupId
;
ChatAddUser
.
refreshAllGroupForAddUser
=
function
(
paramGroupId
)
{
$
(
".cancel"
).
addClass
(
"none"
);
$
(
".search_form input"
).
removeClass
(
"focus"
);
$
(
".search_form input"
).
val
(
""
);
$
(
".search_form form"
).
removeClass
();
$
(
".content"
).
removeClass
(
"none"
);
$
(
".overlay_src_msg"
).
empty
();
$
(
"#tabAllGroupOnAddUser"
).
prop
(
"checked"
,
true
);
let
groupId
=
paramGroupId
;
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate
.
updateGroupInfo
(
groupId
);
//画面エリアを初期化。
$
(
"#parentGroupBtnForAddUser"
).
off
();
$
(
"#rootGroupBtnForAddUser"
).
off
();
$
(
"#childGroupListAreaForAddUser"
).
html
(
""
);
$
(
"#userInGroupListForAddUser"
).
html
(
""
);
$
(
"#groupPathAreaForAddUser"
).
html
(
""
);
initialzScreen
();
//DBからグループ情報を取得。
var
result
=
NativeBridgeDataSource
.
getGroupInfoForAddUser
(
groupId
);
const
result
=
NativeBridgeDataSource
.
getGroupInfoForAddUser
(
groupId
);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
$
(
"#parentGroupBtnForAddUser"
).
on
(
"click"
,
function
()
{
C
HAT_UI
.
refreshAllGroupForAddUser
(
result
.
parentGroupId
);
C
hatAddUser
.
refreshAllGroupForAddUser
(
result
.
parentGroupId
);
});
}
if
(
typeof
result
.
rootGroupId
!==
"undefined"
)
{
if
(
paramGroupId
==
0
)
{
groupId
=
result
.
rootGroupId
;
}
$
(
"#rootGroupBtnForAddUser"
).
on
(
"click"
,
function
()
{
C
HAT_UI
.
refreshAllGroupForAddUser
(
result
.
rootGroupId
);
C
hatAddUser
.
refreshAllGroupForAddUser
(
result
.
rootGroupId
);
});
}
if
(
groupId
==
result
.
rootGroupId
||
paramGroupId
==
"0"
)
{
$
(
"#rootGroupArea"
).
addClass
(
"none"
);
$
(
"#parentGroupArea"
).
addClass
(
"none"
);
...
...
@@ -275,11 +282,30 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
$
(
"#rootGroupArea"
).
removeClass
(
"none"
);
$
(
"#parentGroupArea"
).
removeClass
(
"none"
);
}
//該当グループのパースを表示。
var
groupPathTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_PATH
);
var
groupPathCount
=
0
;
result
.
groupPathList
.
forEach
(
function
(
groupPath
)
{
if
(
!
(
groupPathCount
<
result
.
groupPathList
.
length
-
3
))
{
appendGroupPath
(
result
.
groupPathList
);
//該当グループの下位グループ表示。
appendGroupInGroup
(
result
.
childGroupList
);
//該当グループの所属ユーザを表示。
appendUserInGroup
(
result
.
groupUserList
);
};
var
initialzScreen
=
function
()
{
$
(
"#parentGroupBtnForAddUser"
).
off
();
$
(
"#rootGroupBtnForAddUser"
).
off
();
$
(
"#childGroupListAreaForAddUser"
).
html
(
""
);
$
(
"#userInGroupListForAddUser"
).
html
(
""
);
$
(
"#groupPathAreaForAddUser"
).
html
(
""
);
};
var
appendGroupPath
=
function
(
groupPathList
)
{
const
groupPathTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_PATH
);
let
groupPathCount
=
0
;
groupPathList
.
forEach
(
function
(
groupPath
)
{
if
(
!
(
groupPathCount
<
groupPathList
.
length
-
3
))
{
let
html
=
Mustache
.
render
(
groupPathTemplate
,
{
name
:
groupPath
.
groupName
,
id
:
groupPath
.
groupId
,
...
...
@@ -289,11 +315,12 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
}
groupPathCount
++
;
});
};
//該当グループの下位グループ表示。
var
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST
);
var
appendGroupInGroup
=
function
(
childGroupList
)
{
const
groupTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_GROUP_LIST
);
result
.
childGroupList
.
forEach
(
function
(
childGroup
)
{
childGroupList
.
forEach
(
function
(
childGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
childGroup
.
groupName
,
id
:
childGroup
.
groupId
,
...
...
@@ -302,10 +329,11 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#childGroupListAreaForAddUser"
).
append
(
obj
);
});
};
//該当グループの所属ユーザを表示。
var
appendUserInGroup
=
function
(
groupUserList
)
{
const
userTemplate
=
getTemplate
(
TemplateURL
.
ADD_USER_USER_LIST
);
result
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
let
findObj
=
ChatManagementCommon
.
selectedUserList
.
find
(
function
(
shopMemberId
...
...
@@ -317,7 +345,7 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
}
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
result
.
groupUserList
,
userList
:
groupUserList
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#userInGroupListForAddUser"
).
append
(
obj
);
...
...
public_new/js/views/chats/management/chat-make-room.js
View file @
6e009873
// 名前空間
var
C
HAT_MAKE_ROOM
=
{};
var
C
hatMakeRoom
=
{};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
// メンバー検索
...
...
@@ -12,7 +12,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
// メンバー検索
C
HAT_MAKE_ROOM
.
searchUser
=
function
(
keyword
)
{
C
hatMakeRoom
.
searchUser
=
function
(
keyword
)
{
const
overlayMessage
=
$
(
".overlay_src_msg"
);
const
isAllGroup
=
$
(
"#tabAllGroupOnMakeRoom"
).
is
(
":checked"
);
let
hasNoData
=
false
;
...
...
@@ -31,15 +31,15 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
});
//ユーザデータ検索
var
userList
=
NativeBridgeDataSource
.
getAllGroupShopMemberByName
(
keyword
);
const
userList
=
NativeBridgeDataSource
.
getAllGroupShopMemberByName
(
keyword
);
searchUserData
(
userList
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
let
html
=
renderUser
(
userTemplate
,
userList
);
let
obj
=
jQuery
.
parseHTML
(
html
);
overlayMessage
.
append
(
obj
);
hasNoData
=
groupList
.
length
==
0
&&
userList
.
length
==
0
;
//連絡先画面
}
else
{
}
else
{
// 連絡先画面
const
userList
=
NativeBridgeDataSource
.
getMyGroupShopMemberByName
(
keyword
);
searchUserData
(
userList
);
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
...
...
@@ -79,7 +79,7 @@ var searchMember = function () {
$
(
".overlay_src_msg"
).
empty
();
return
false
;
}
C
HAT_MAKE_ROOM
.
searchUser
(
keyword
);
C
hatMakeRoom
.
searchUser
(
keyword
);
if
(
enterKeyPressed
)
{
searchInput
.
blur
();
return
;
...
...
@@ -92,7 +92,7 @@ var bindiOSKeyBoardEvent = function () {
searchInput
.
on
(
"compositionend"
,
function
()
{
if
(
deviceInfo
.
isiOS
())
{
var
keyword
=
searchInput
.
val
();
C
HAT_MAKE_ROOM
.
searchUser
(
keyword
);
C
hatMakeRoom
.
searchUser
(
keyword
);
}
});
};
...
...
@@ -139,14 +139,14 @@ $("#makeRoomConfirmBtn").on("click", function (e) {
});
$
(
"#tabAllGroupOnMakeRoom"
).
on
(
"click"
,
function
(
e
)
{
ChatMa
nagementCommon
.
refreshAllGroupForMakeRoom
(
"0"
);
ChatMa
keRoom
.
refreshAllGroupForMakeRoom
(
"0"
);
});
$
(
"#tabMyGroupOnMakeRoom"
).
on
(
"click"
,
function
(
e
)
{
C
HAT_UI
.
refreshMyGroupForMakeRoom
();
C
hatMakeRoom
.
refreshMyGroupForMakeRoom
();
});
C
HAT_UI
.
refreshMyGroupForMakeRoom
=
function
()
{
C
hatMakeRoom
.
refreshMyGroupForMakeRoom
=
function
()
{
$
(
".modal-backdrop"
).
remove
();
$
(
"#favoriteListForMakeRoom"
).
html
(
""
);
$
(
"#myGroupListForMakeRoom"
).
html
(
""
);
...
...
@@ -216,3 +216,99 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
$
(
"#myGroupListForMakeRoom"
).
append
(
obj
);
});
};
ChatMakeRoom
.
refreshAllGroupForMakeRoom
=
function
(
paramGroupId
)
{
var
groupId
=
paramGroupId
;
$
(
".cancel"
).
addClass
(
"none"
);
$
(
".search_form input"
).
removeClass
(
"focus"
);
$
(
".search_form input"
).
val
(
""
);
$
(
".search_form form"
).
removeClass
();
$
(
".content"
).
removeClass
(
"none"
);
$
(
".overlay_src_msg"
).
empty
();
$
(
"#tabAllGroupOnMakeRoom"
).
prop
(
"checked"
,
true
);
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate
.
updateGroupInfo
(
groupId
);
//画面エリアを初期化。
$
(
"#parentGroupBtnForMakeRoom"
).
off
();
$
(
"#rootGroupBtnForMakeRoom"
).
off
();
$
(
"#childGroupListAreaForMakeRoom"
).
html
(
""
);
$
(
"#userInGroupListForMakeRoom"
).
html
(
""
);
$
(
"#groupPathAreaForMakeRoom"
).
html
(
""
);
//DBからグループ情報を取得。
var
result
=
NativeBridgeDataSource
.
getGroupInfo
(
groupId
);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
$
(
"#parentGroupBtnForMakeRoom"
).
on
(
"click"
,
function
()
{
ChatMakeRoom
.
refreshAllGroupForMakeRoom
(
result
.
parentGroupId
);
});
}
if
(
typeof
result
.
rootGroupId
!==
"undefined"
)
{
if
(
paramGroupId
==
0
)
{
groupId
=
result
.
rootGroupId
;
}
$
(
"#rootGroupBtnForMakeRoom"
).
on
(
"click"
,
function
()
{
ChatMakeRoom
.
refreshAllGroupForMakeRoom
(
result
.
rootGroupId
);
});
}
if
(
groupId
==
result
.
rootGroupId
||
paramGroupId
==
"0"
)
{
$
(
"#rootGroupArea"
).
addClass
(
"none"
);
$
(
"#parentGroupArea"
).
addClass
(
"none"
);
}
else
{
$
(
"#rootGroupArea"
).
removeClass
(
"none"
);
$
(
"#parentGroupArea"
).
removeClass
(
"none"
);
}
//該当グループのパースを表示。
var
groupPathTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_GROUP_PATH
);
var
groupPathCount
=
0
;
result
.
groupPathList
.
forEach
(
function
(
groupPath
)
{
if
(
!
(
groupPathCount
<
result
.
groupPathList
.
length
-
3
))
{
let
html
=
Mustache
.
render
(
groupPathTemplate
,
{
name
:
groupPath
.
groupName
,
id
:
groupPath
.
groupId
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#groupPathAreaForMakeRoom"
).
append
(
obj
);
}
groupPathCount
++
;
});
//該当グループの下位グループ表示。
var
groupTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_GROUP_LIST
);
result
.
childGroupList
.
forEach
(
function
(
childGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
childGroup
.
groupName
,
id
:
childGroup
.
groupId
,
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#childGroupListAreaForMakeRoom"
).
append
(
obj
);
});
//該当グループの所属ユーザを表示。
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
result
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
let
findObj
=
ChatManagementCommon
.
selectedUserList
.
find
(
function
(
shopMemberId
)
{
return
shopMemberId
==
groupUser
.
shopMemberId
;
});
if
(
findObj
)
{
groupUser
.
checked
=
"checked"
;
}
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
result
.
groupUserList
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#userInGroupListForMakeRoom"
).
append
(
obj
);
};
\ No newline at end of file
public_new/js/views/chats/management/chat-management-common.js
View file @
6e009873
...
...
@@ -155,101 +155,6 @@ ChatManagementCommon.showAddUserConfirmView = function () {
});
};
ChatManagementCommon.refreshAllGroupForMakeRoom = function (paramGroupId) {
var groupId = paramGroupId;
$(".cancel").addClass("none");
$(".search_form input").removeClass("focus");
$(".search_form input").val("");
$(".search_form form").removeClass();
$(".content").removeClass("none");
$(".overlay_src_msg").empty();
$("#tabAllGroupOnMakeRoom").prop("checked", true);
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate.updateGroupInfo(groupId);
//画面エリアを初期化。
$("#parentGroupBtnForMakeRoom").off();
$("#rootGroupBtnForMakeRoom").off();
$("#childGroupListAreaForMakeRoom").html("");
$("#userInGroupListForMakeRoom").html("");
$("#groupPathAreaForMakeRoom").html("");
//DBからグループ情報を取得。
var result = NativeBridgeDataSource.getGroupInfo(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
$("#parentGroupBtnForMakeRoom").on("click", function () {
ChatManagementCommon.refreshAllGroupForMakeRoom(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== "undefined") {
if (paramGroupId == 0) {
groupId = result.rootGroupId;
}
$("#rootGroupBtnForMakeRoom").on("click", function () {
CHAChatManagementCommon_UI.refreshAllGroupForMakeRoom(result.rootGroupId);
});
}
if (groupId == result.rootGroupId || paramGroupId == "0") {
$("#rootGroupArea").addClass("none");
$("#parentGroupArea").addClass("none");
} else {
$("#rootGroupArea").removeClass("none");
$("#parentGroupArea").removeClass("none");
}
//該当グループのパースを表示。
var groupPathTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_PATH);
var groupPathCount = 0;
result.groupPathList.forEach(function (groupPath) {
if (!(groupPathCount < result.groupPathList.length - 3)) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
id: groupPath.groupId,
});
let obj = jQuery.parseHTML(html);
$("#groupPathAreaForMakeRoom").append(obj);
}
groupPathCount++;
});
//該当グループの下位グループ表示。
var groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
result.childGroupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
id: childGroup.groupId,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#childGroupListAreaForMakeRoom").append(obj);
});
//該当グループの所属ユーザを表示。
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
result.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberId
) {
return shopMemberId == groupUser.shopMemberId;
});
if (findObj) {
groupUser.checked = "checked";
}
});
let html = Mustache.render(userTemplate, {
userList: result.groupUserList,
});
let obj = jQuery.parseHTML(html);
$("#userInGroupListForMakeRoom").append(obj);
};
ChatManagementCommon.checkForMakeChat = function (checkMemberId) {
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberId
...
...
public_new/js/views/collaboration/collaboration.js
View file @
6e009873
var
CollaborationUI
=
{};
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
no_s
croll
();
disableS
croll
();
// メニューオーバーレイ表示
$
(
".menu_btn"
).
click
(
function
()
{
...
...
@@ -19,17 +21,17 @@ document.addEventListener("DOMContentLoaded", function () {
.
css
({
transform
:
"translateX("
&
-
w
&
")"
});
if
(
$
(
this
).
hasClass
(
"hide"
))
{
return_s
croll
();
enableS
croll
();
}
else
{
scrollTo
(
0
,
0
);
no_s
croll
();
disableS
croll
();
}
});
// モーダルonモーダル(前のモーダルを非表示に)
// ホスト変更ボタン押下イベント
$
(
".ch_host_btn"
).
click
(
function
()
{
var
target
=
$
(
this
).
val
();
const
target
=
$
(
this
).
val
();
changeModal
(
target
,
"changeHostModal"
);
});
...
...
@@ -42,7 +44,7 @@ document.addEventListener("DOMContentLoaded", function () {
// 閉じるイベント
$
(
".close_btn"
).
click
(
function
()
{
$
(
"#overlay_add_user_list"
).
addClass
(
"none"
);
no_s
croll
();
disableS
croll
();
});
// ユーザー追加イベント
...
...
@@ -52,10 +54,10 @@ document.addEventListener("DOMContentLoaded", function () {
// ユーザー招待メンバー検索
$
(
".add_user_btn"
).
click
(
function
()
{
return_s
croll
();
enableS
croll
();
Common
.
showLoadingIndicator
();
ChatManagementCommon
.
selectedUserList
=
[];
C
HAT_
UI
.
refreshMyGroupForAddUserInCollaboration
();
C
ollaboration
UI
.
refreshMyGroupForAddUserInCollaboration
();
$
(
"#addUserConfirmBtnInCollaboration"
)
.
off
()
.
on
(
"click"
,
function
()
{
...
...
@@ -63,7 +65,7 @@ document.addEventListener("DOMContentLoaded", function () {
const
selectedUserList
=
ChatManagementCommon
.
selectedUserList
.
join
(
","
);
NativeBridgeDelegate
.
saveSelectedUserList
(
selectedUserList
);
C
HAT_
UI
.
confirmInviteUserListInCollaboration
();
C
ollaboration
UI
.
confirmInviteUserListInCollaboration
();
});
});
});
...
...
@@ -75,12 +77,12 @@ function penOff() {
}
}
function
no_s
croll
()
{
function
disableS
croll
()
{
document
.
addEventListener
(
"mousewheel"
,
scroll_control
,
{
passive
:
false
});
document
.
addEventListener
(
"touchmove"
,
scroll_control
,
{
passive
:
false
});
}
// スクロール禁止解除
function
return_s
croll
()
{
function
enableS
croll
()
{
document
.
removeEventListener
(
"mousewheel"
,
scroll_control
,
{
passive
:
false
,
});
...
...
@@ -92,13 +94,12 @@ function scroll_control(event) {
}
}
C
HAT_
UI
.
confirmInviteUserListInCollaboration
=
function
()
{
var
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
C
ollaboration
UI
.
confirmInviteUserListInCollaboration
=
function
()
{
const
selectedUsers
=
NativeBridgeDataSource
.
loadSelectedUsers
();
if
(
selectedUsers
!=
""
)
{
$
(
"#selectedUserListinCollaboration"
).
html
(
""
);
var
selectedUserList
=
NativeBridgeDataSource
.
loadSelectedUsers
();
selectedUserList
.
forEach
(
function
(
user
)
{
selectedUsers
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
Common
.
getProfileImgUrl
(
user
.
profileUrl
);
});
...
...
@@ -110,13 +111,13 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
}
);
let
html
=
Mustache
.
render
(
modalTemplate
,
{
userList
:
selectedUser
List
,
userList
:
selectedUser
s
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#modal_add_user_confirm"
).
html
(
obj
);
$
(
"#modalAddUserConfirm"
).
modal
(
"show"
);
}
else
{
}
$
(
"#cancelAddUserBtn"
)
.
off
()
.
on
(
"click"
,
function
()
{
...
...
@@ -129,11 +130,11 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
.
off
()
.
on
(
"click"
,
function
()
{
Common
.
showLoadingIndicator
();
let
userI
dList
=
new
Array
(
);
selectedUser
List
.
forEach
(
function
(
user
)
{
userI
d
List
.
push
(
user
.
shopMemberId
);
let
userI
DList
=
selectedUsers
.
map
((
user
)
=>
user
.
shopMemberId
);
selectedUser
s
.
forEach
(
function
(
user
)
{
userI
D
List
.
push
(
user
.
shopMemberId
);
});
const
commaJoinedUserIDList
=
userI
d
List
.
join
(
","
);
const
commaJoinedUserIDList
=
userI
D
List
.
join
(
","
);
const
collaborationType
=
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
...
...
@@ -149,18 +150,16 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
};
$
(
"#tabMyGroupOnAddUserInCollaboration"
).
on
(
"click"
,
function
(
e
)
{
C
HAT_
UI
.
refreshMyGroupForAddUserInCollaboration
();
C
ollaboration
UI
.
refreshMyGroupForAddUserInCollaboration
();
});
$
(
"#tabAllGroupOnAddUserInCollaboration"
).
on
(
"click"
,
function
(
e
)
{
C
HAT_
UI
.
refreshAllGroupForAddUserInCollaboration
(
"0"
);
C
ollaboration
UI
.
refreshAllGroupForAddUserInCollaboration
(
"0"
);
});
C
HAT_
UI
.
refreshMyGroupForAddUserInCollaboration
=
function
()
{
C
ollaboration
UI
.
refreshMyGroupForAddUserInCollaboration
=
function
()
{
if
(
ChatManagementCommon
.
selectedUserList
.
length
>
0
)
{
$
(
".select_member_num"
).
text
(
ChatManagementCommon
.
selectedUserList
.
length
);
$
(
".select_member_num"
).
text
(
ChatManagementCommon
.
selectedUserList
.
length
);
}
else
{
$
(
".select_member_num"
).
text
(
"0"
);
}
...
...
@@ -240,7 +239,9 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
Common
.
dismissLoadingIndicator
();
};
CHAT_UI
.
refreshAllGroupForAddUserInCollaboration
=
function
(
paramGroupId
)
{
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
=
function
(
paramGroupId
)
{
var
groupId
=
paramGroupId
;
$
(
".content"
).
removeClass
(
"none"
);
...
...
@@ -260,7 +261,9 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
$
(
"#parentGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
CHAT_UI
.
refreshAllGroupForAddUserInCollaboration
(
result
.
parentGroupId
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
result
.
parentGroupId
);
});
}
if
(
typeof
result
.
rootGroupId
!==
"undefined"
)
{
...
...
@@ -268,7 +271,9 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
groupId
=
result
.
rootGroupId
;
}
$
(
"#rootGroupBtnForAddUserInCollaboration"
).
on
(
"click"
,
function
()
{
CHAT_UI
.
refreshAllGroupForAddUserInCollaboration
(
result
.
rootGroupId
);
CollaborationUI
.
refreshAllGroupForAddUserInCollaboration
(
result
.
rootGroupId
);
});
}
if
(
groupId
==
result
.
rootGroupId
||
paramGroupId
==
"0"
)
{
...
...
@@ -334,7 +339,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
$
(
"#userInGroupListForAddUserInCollaboration"
).
append
(
obj
);
};
CHAT_UI
.
makeNameCardInCollaboration
=
function
(
shopMemberId
)
{
Namecard
.
makeNameCardInCollaboration
=
function
(
shopMemberId
)
{
if
(
currentUserInfo
.
shopMemberId
==
shopMemberId
)
{
return
;
}
...
...
@@ -371,20 +376,20 @@ CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
$
(
"#userNameCardInCollaboration"
).
modal
(
"show"
);
};
C
HAT_
UI
.
removeFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
C
ollaboration
UI
.
removeFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
Common
.
showLoadingIndicator
();
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
NativeBridgeDataSource
.
removeFavoriteUser
(
shopMemberId
);
Common
.
dismissLoadingIndicator
();
};
C
HAT_
UI
.
insertFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
C
ollaboration
UI
.
insertFavoriteUserInCollaboration
=
function
(
shopMemberId
)
{
$
(
"#userNameCardInCollaboration"
).
modal
(
"hide"
);
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberId
);
Common
.
dismissLoadingIndicator
();
};
C
HAT_
UI
.
refreshJoinedCollaboration
=
function
(
loginIdList
)
{
C
ollaboration
UI
.
refreshJoinedCollaboration
=
function
(
loginIdList
)
{
for
(
var
count
=
0
;
count
<
loginIdList
.
length
;
count
++
)
{
loginIdList
[
count
]
=
loginIdList
[
count
].
replaceAll
(
globalUserInfo
.
shopName
+
"_"
,
...
...
@@ -428,12 +433,12 @@ CHAT_UI.refreshJoinedCollaboration = function (loginIdList) {
Common
.
dismissLoadingIndicator
();
};
C
HAT_
UI
.
toggleCategory
=
function
(
category
)
{
C
ollaboration
UI
.
toggleCategory
=
function
(
category
)
{
$
(
category
).
toggleClass
(
"open"
);
$
(
category
).
next
().
slideToggle
();
};
C
HAT_
UI
.
refreshForOffline
=
function
()
{
C
ollaboration
UI
.
refreshForOffline
=
function
()
{
serverInfo
.
isOnline
=
"false"
;
if
(
typeof
coview_api
==
"undefined"
)
{
return
;
...
...
public_new/js/views/collaboration/share.js
View file @
6e009873
...
...
@@ -449,7 +449,6 @@ document.addEventListener("DOMContentLoaded", function () {
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
}
CHAT_SOCKET
.
emitCreateMessage
(
coviewInviteMessage
,
0
);
}
else
{
}
break
;
case
"joinRoomInfoResponse"
:
...
...
@@ -468,7 +467,7 @@ document.addEventListener("DOMContentLoaded", function () {
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
C
HAT_
UI
.
refreshJoinedCollaboration
(
loginIdList
);
C
ollaboration
UI
.
refreshJoinedCollaboration
(
loginIdList
);
}
else
{
}
break
;
...
...
@@ -476,13 +475,13 @@ document.addEventListener("DOMContentLoaded", function () {
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
C
HAT_
UI
.
refreshJoinedCollaboration
(
loginIdList
);
C
ollaboration
UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
case
"RoomMemberLeavedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
C
HAT_
UI
.
refreshJoinedCollaboration
(
loginIdList
);
C
ollaboration
UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
case
"HostRequest"
:
// to be called by
...
...
@@ -625,22 +624,18 @@ async function initCollaborationUI(changeCollaborationType) {
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".voice_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
CAMERA
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".picture_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
VIDEO
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".video_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".document_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
BOARD
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".board_contents"
).
removeClass
(
"none"
);
...
...
@@ -690,7 +685,7 @@ function Coview_changeHost(userId) {
function
Coview_addLoginId
(
loginId
)
{
console
.
log
(
"addUser loginId = "
+
loginId
);
var
url
=
"https://biztaskyell.abookcloud.com/auth/getuser"
;
const
url
=
"https://biztaskyell.abookcloud.com/auth/getuser"
;
$
.
ajax
({
url
:
url
,
method
:
"post"
,
...
...
@@ -819,8 +814,8 @@ function captureAndShareImage(urls, changeHostName) {
addCaptureEffect
();
$
(
this
).
removeClass
(
"on"
);
var
w
,
h
;
var
video
=
document
.
getElementById
(
"localVideo"
);
var
canvas
=
document
.
createElement
(
"canvas"
);
const
video
=
document
.
getElementById
(
"localVideo"
);
const
canvas
=
document
.
createElement
(
"canvas"
);
if
(
clientOrientaionState
==
1
)
{
canvas
.
width
=
w
=
680
;
canvas
.
height
=
h
=
515
;
...
...
@@ -829,10 +824,11 @@ function captureAndShareImage(urls, changeHostName) {
canvas
.
height
=
h
=
515
;
}
if
(
canvas
.
getContext
)
{
var
ctx
=
canvas
.
getContext
(
"2d"
);
const
ctx
=
canvas
.
getContext
(
"2d"
);
ctx
.
drawImage
(
video
,
0
,
0
,
w
,
h
);
ctx
.
drawImage
(
document
.
getElementById
(
"canvasRemote"
),
0
,
0
,
w
,
h
);
}
canvas
.
toBlob
(
function
(
blob
)
{
var
newImg
=
document
.
createElement
(
"img"
);
var
url
=
URL
.
createObjectURL
(
blob
);
...
...
@@ -915,14 +911,6 @@ function captureAndShareImage(urls, changeHostName) {
});
}
function
toolToggle
()
{
if
(
$
(
"#collabo_footer_menu"
).
hasClass
(
"hide"
))
{
$
(
"#collabo_footer_menu"
).
removeClass
(
"hide"
);
}
else
{
$
(
"#collabo_footer_menu"
).
addClass
(
"hide"
);
}
}
function
micOn
()
{
coview_api
.
MicMuteControl
(
"off"
);
$
(
"#micBtn .voice"
).
removeClass
(
"disable"
);
...
...
@@ -933,7 +921,7 @@ function micOff() {
$
(
"#micBtn .voice"
).
addClass
(
"disable"
);
}
function
micTogle
()
{
function
toggleMic
()
{
if
(
$
(
"#micBtn .voice"
).
hasClass
(
"disable"
))
{
micOn
();
}
else
{
...
...
@@ -955,7 +943,7 @@ function recordFinished() {
delete_dom_obj
(
"screenLock"
);
}
function
recordTogle
()
{
function
toggleRecord
()
{
if
(
!
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
recordStart
();
}
else
{
...
...
@@ -975,14 +963,14 @@ function recordStop(callback) {
screenLock
();
// アーカイブ保存処理
M
ainManRecordWithCollaboration
(
m
ainManRecordWithCollaboration
(
"stop"
,
serverInfo
.
cmsURL
+
"/chatapi/file/uploadArchive"
,
callback
);
}
function
M
ainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
function
m
ainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
try
{
mediaRecorder
.
stop
();
}
catch
(
exeption
)
{
...
...
@@ -995,7 +983,7 @@ function MainManRecordWithCollaboration(action, url, callback) {
console
.
log
(
"Recoding File upload.."
);
const
blob
=
new
Blob
(
recordedBlobs
,
{
type
:
"video/webm"
});
console
.
log
(
blob
);
var
uploadFileName
=
"record_"
+
g_webroom
+
"_"
+
g_shareCount
+
".webm"
;
const
uploadFileName
=
"record_"
+
g_webroom
+
"_"
+
g_shareCount
+
".webm"
;
g_shareCount
++
;
var
formData
=
new
FormData
();
formData
.
append
(
"fileData"
,
blob
,
uploadFileName
);
...
...
@@ -1031,7 +1019,7 @@ function MainManRecordWithCollaboration(action, url, callback) {
function
screenLock
()
{
// ロック用のdivを生成
var
element
=
document
.
createElement
(
"div"
);
const
element
=
document
.
createElement
(
"div"
);
element
.
id
=
"screenLock"
;
// ロック用のスタイル
...
...
@@ -1043,14 +1031,14 @@ function screenLock() {
element
.
style
.
zIndex
=
"9999"
;
element
.
style
.
opacity
=
"0"
;
var
objBody
=
document
.
getElementsByTagName
(
"body"
).
item
(
0
);
const
objBody
=
document
.
getElementsByTagName
(
"body"
).
item
(
0
);
objBody
.
appendChild
(
element
);
}
// div削除関数
function
delete_dom_obj
(
id_name
)
{
var
dom_obj
=
document
.
getElementById
(
id_name
);
var
dom_obj_parent
=
dom_obj
.
parentNode
;
const
dom_obj
=
document
.
getElementById
(
id_name
);
const
dom_obj_parent
=
dom_obj
.
parentNode
;
dom_obj_parent
.
removeChild
(
dom_obj
);
}
...
...
@@ -1073,13 +1061,16 @@ function penToggle() {
$
(
"#penBtn .pen"
).
addClass
(
"disable"
);
}
}
function
photo_open_place_holderToggle
()
{
$
(
"#open_file_upload"
).
trigger
(
"click"
);
}
function
eraserToggle
()
{
function
toggleEraser
()
{
$
(
"#coviewEraserCtrBtn"
).
click
();
}
function
captureToggle
()
{
function
toggleCapture
()
{
if
(
$
(
"#recordBtn"
).
hasClass
(
"bg_red"
))
{
screenLock
();
recordStop
(
function
()
{
...
...
@@ -1090,7 +1081,8 @@ function captureToggle() {
coview_api
.
Capture
(
serverInfo
.
cmsURL
+
"/chatapi/file/uploadArchive"
);
}
}
function
captureRequestToggle
()
{
function
toggleCaptureRequest
()
{
fw
.
sendToMsg
(
"others"
,
"CAPTURE_REQUEST"
,
{
name
:
currentUserInfo
.
loginId
,
});
...
...
public_new/js/views/contact/contact.js
View file @
6e009873
This diff is collapsed.
Click to expand it.
public_new/js/views/contact/namecard.js
View file @
6e009873
var
Namecard
=
{};
// archive_detail.html
// collaboration_overlay_user_list.html
// >> collaboration.js
// archive.js
// collaboration.js
// template_chatroom_user_list.html (CHATROOM_USER_LIST)
// >> chat-room.js
// template_group_user_list.html (GROUP_USER_LIST)
// >> contact.js
// template_user_list.html
// >> chat-room.js, contact.js
// template_user_message.html
// >> chat-websocket-message.js
// >> chat-room.js
CHAT_UI
.
makeNameCard
=
function
(
shopMemberId
)
{
Namecard
.
makeNameCard
=
function
(
shopMemberId
)
{
if
(
currentUserInfo
.
shopMemberId
==
shopMemberId
)
{
return
;
}
var
nameCardInfo
=
NativeBridgeDataSource
.
getNameCardData
(
shopMemberId
);
var
namecardTemplate
=
getTemplate
(
TemplateURL
.
USER_NAME_CARD
);
const
nameCardInfo
=
NativeBridgeDataSource
.
getNameCardData
(
shopMemberId
);
const
namecardTemplate
=
getTemplate
(
TemplateURL
.
USER_NAME_CARD
);
nameCardInfo
.
profileUrl
=
Common
.
getProfileImgUrl
(
nameCardInfo
.
profileUrl
);
let
namecardH
tml
=
Mustache
.
render
(
namecardTemplate
,
{
let
namecardH
TML
=
Mustache
.
render
(
namecardTemplate
,
{
shopMemberId
:
nameCardInfo
.
shopMemberId
,
profileUrl
:
nameCardInfo
.
profileUrl
,
name
:
nameCardInfo
.
shopMemberName
,
...
...
@@ -33,7 +19,7 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
isFavorite
:
nameCardInfo
.
isFavorite
,
});
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardH
tml
)).
on
(
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardH
TML
)).
on
(
"click"
,
function
()
{}
);
...
...
@@ -43,7 +29,7 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
};
// template_user_name_card.html
CHAT_UI
.
startChat
=
function
(
userShopMemberId
,
userName
)
{
Namecard
.
startChat
=
function
(
userShopMemberId
,
userName
)
{
Common
.
showLoadingIndicator
();
var
userIdList
=
[];
userIdList
.
push
(
userShopMemberId
);
...
...
@@ -60,16 +46,16 @@ CHAT_UI.startChat = function (userShopMemberId, userName) {
};
// template_user_name_card.html
CHAT_UI
.
startVoice
=
function
(
userShopMemberId
,
userName
)
{
Namecard
.
startVoice
=
function
(
userShopMemberId
,
userName
)
{
Common
.
showLoadingIndicator
();
var
userId
List
=
[];
userI
d
List
.
push
(
userShopMemberId
);
let
userID
List
=
[];
userI
D
List
.
push
(
userShopMemberId
);
// 参加ユーザ名でルーム名を生成
let
newRoomName
=
currentUserInfo
.
loginId
+
","
+
userName
;
NativeBridgeDelegate
.
createChatRoom
(
ChatRoomType
.
DM
,
userI
d
List
.
join
(
","
),
userI
D
List
.
join
(
","
),
newRoomName
,
MakeRoomFlag
.
NAME_CARD
,
true
...
...
@@ -80,18 +66,18 @@ CHAT_UI.startVoice = function (userShopMemberId, userName) {
// >> chat-room.js
// >> contact.js
// template_user_list.html
CHAT_UI
.
favoriteUserChange
=
function
(
shopMemberId
,
star
)
{
Namecard
.
favoriteUserChange
=
function
(
shopMemberId
,
star
)
{
if
(
$
(
star
).
hasClass
(
"active"
))
{
CHAT_UI
.
removeFavoriteUser
(
shopMemberId
);
Namecard
.
removeFavoriteUser
(
shopMemberId
);
}
else
if
(
$
(
star
).
hasClass
(
"disable"
))
{
CHAT_UI
.
insertFavoriteUser
(
shopMemberId
);
Namecard
.
insertFavoriteUser
(
shopMemberId
);
}
};
// modal_collabo_profile.html
// collaboration.js
// template_user_name_card.html
CHAT_UI
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
Namecard
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
Common
.
showLoadingIndicator
();
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
...
...
@@ -106,10 +92,9 @@ CHAT_UI.removeFavoriteUser = function (shopMemberId) {
Common
.
dismissLoadingIndicator
();
};
// modal_collabo_profile.html
// collaboration.js
// template_user_name_card.html
CHAT_UI
.
insertFavoriteUser
=
function
(
shopMemberId
)
{
// template_user_name_card.html (USER_NAME_CARD)
// >> Namecard.makeNameCard()
Namecard
.
insertFavoriteUser
=
function
(
shopMemberId
)
{
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
"#myNameCard"
).
modal
(
"hide"
);
const
result
=
NativeBridgeDataSource
.
addFavoriteUser
(
shopMemberId
);
...
...
@@ -123,114 +108,10 @@ CHAT_UI.insertFavoriteUser = function (shopMemberId) {
Common
.
dismissLoadingIndicator
();
};
// contact.html
// contact.js
// template_group_list.html (GROUP_LIST)
// >> contact.js
// template_group_path.html (GROUP_PATH)
// >> self
// template_user_name_card.html
// >> CHAT_UI.makeNameCard
//全グループ検索画面表示。
CHAT_UI
.
refreshAllGroupSearch
=
function
(
paramGroupId
)
{
var
groupId
=
paramGroupId
;
if
(
window
.
location
.
pathname
.
includes
(
"chat_room"
))
{
if
(
groupId
==
""
)
return
;
NativeBridgeDelegate
.
setToMoveGroupId
(
groupId
);
window
.
location
.
href
=
"contact.html"
;
}
Common
.
showLoadingIndicator
();
$
(
"#userNameCard"
).
modal
(
"hide"
);
$
(
".cancel"
).
addClass
(
"none"
);
$
(
".search_form input"
).
removeClass
(
"focus"
);
$
(
".search_form input"
).
val
(
""
);
$
(
".search_form form"
).
removeClass
();
$
(
".content"
).
removeClass
(
"none"
);
$
(
".overlay_src_msg"
).
empty
();
$
(
"#contactSearch"
).
attr
(
"placeholder"
,
getLocalizedString
(
"searchUserAndGroup"
)
);
$
(
"#tabAllGroup"
).
prop
(
"checked"
,
true
);
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate
.
updateGroupInfo
(
groupId
);
//画面エリアを初期化。
$
(
"#rootGroupBtn"
).
off
();
$
(
"#parentGroupBtn"
).
off
();
$
(
"#childGroupListArea"
).
html
(
""
);
$
(
"#userInGroupList"
).
html
(
""
);
$
(
"#groupPathArea"
).
html
(
""
);
//DBからグループ情報を取得。
var
result
=
NativeBridgeDataSource
.
getGroupInfo
(
groupId
);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if
(
typeof
result
.
parentGroupId
!==
"undefined"
)
{
$
(
"#parentGroupBtn"
).
on
(
"click"
,
function
()
{
CHAT_UI
.
refreshAllGroupSearch
(
result
.
parentGroupId
);
});
}
if
(
typeof
result
.
rootGroupId
!==
"undefined"
)
{
if
(
paramGroupId
==
0
)
{
groupId
=
result
.
rootGroupId
;
}
$
(
"#rootGroupBtn"
).
on
(
"click"
,
function
()
{
CHAT_UI
.
refreshAllGroupSearch
(
result
.
rootGroupId
);
});
}
if
(
groupId
==
result
.
rootGroupId
||
paramGroupId
==
"0"
)
{
$
(
"#rootGroupArea"
).
addClass
(
"none"
);
$
(
"#parentGroupArea"
).
addClass
(
"none"
);
}
else
{
$
(
"#rootGroupArea"
).
removeClass
(
"none"
);
$
(
"#parentGroupArea"
).
removeClass
(
"none"
);
}
//該当グループのパースを表示。
const
groupPathTemplate
=
getTemplate
(
TemplateURL
.
GROUP_PATH
);
result
.
groupPathList
.
forEach
(
function
(
groupPath
)
{
let
html
=
Mustache
.
render
(
groupPathTemplate
,
{
name
:
groupPath
.
groupName
,
id
:
groupPath
.
groupId
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#groupPathArea"
).
append
(
obj
);
});
//該当グループの下位グループ表示。
const
groupTemplate
=
getTemplate
(
TemplateURL
.
GROUP_LIST
);
result
.
childGroupList
.
forEach
(
function
(
childGroup
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
childGroup
.
groupName
,
id
:
childGroup
.
groupId
,
isFavorite
:
childGroup
.
isFavorite
,
});
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{});
$
(
"#childGroupListArea"
).
append
(
obj
);
});
//該当グループの所属ユーザを表示。
const
userTemplate
=
getTemplate
(
TemplateURL
.
USER_LIST
);
result
.
groupUserList
.
forEach
(
function
(
groupUser
)
{
groupUser
.
profileUrl
=
Common
.
getProfileImgUrl
(
groupUser
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
result
.
groupUserList
,
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
"#userInGroupList"
).
append
(
obj
);
Common
.
dismissLoadingIndicator
();
};
CHAT_UI
.
refreshForOnline
=
function
()
{
Namecard
.
refreshForOnline
=
function
()
{
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
false
);
};
CHAT_UI
.
refreshForOffline
=
function
()
{
Namecard
.
refreshForOffline
=
function
()
{
$
(
"#favoriteButton"
).
prop
(
"disabled"
,
true
);
};
public_new/modal_add_user_list.html
View file @
6e009873
...
...
@@ -20,14 +20,14 @@
</div>
<!-- .row -->
</nav>
<!-- nav -->
<div
class=
"content tabs"
>
<input
id=
"tabMyGroupOnAddUserInCollaboration"
type=
"radio"
name=
"tab_item"
checked
onclick=
"C
HAT_
UI.refreshMyGroupForAddUserInCollaboration();"
>
<input
id=
"tabMyGroupOnAddUserInCollaboration"
type=
"radio"
name=
"tab_item"
checked
onclick=
"C
ollaboration
UI.refreshMyGroupForAddUserInCollaboration();"
>
<label
class=
"tab_item m-0"
for=
"tabMyGroupOnAddUserInCollaboration"
>
マイグループ
</label>
<input
id=
"tabAllGroupOnAddUserInCollaboration"
type=
"radio"
name=
"tab_item"
onclick=
"C
HAT_
UI.refreshAllGroupForAddUserInCollaboration('0');"
>
<input
id=
"tabAllGroupOnAddUserInCollaboration"
type=
"radio"
name=
"tab_item"
onclick=
"C
ollaboration
UI.refreshAllGroupForAddUserInCollaboration('0');"
>
<label
class=
"tab_item m-0"
for=
"tabAllGroupOnAddUserInCollaboration"
>
全グループ
</label>
<div
class=
"tab_content"
id=
"tab1_content"
style=
"height: 100vh; overflow:scroll;"
>
<div
class=
"chat_list"
>
<!-- お気に入りグループ -->
<div
class=
"category"
onclick=
"C
HAT_
UI.toggleCategory(this);"
><div
class=
"category_name"
><span>
お気に入り
</span></div></div>
<div
class=
"category"
onclick=
"C
ollaboration
UI.toggleCategory(this);"
><div
class=
"category_name"
><span>
お気に入り
</span></div></div>
<div
id=
"favoriteListForAddUserInCollaboration"
></div>
<div
id=
"myGroupListForAddUserInCollaboration"
></div>
</div>
...
...
public_new/modal_collabo_profile.html
View file @
6e009873
...
...
@@ -19,7 +19,7 @@
<div
class=
"modal-footer border-0 justify-content-center"
>
{{#isFavorite}}
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"C
HAT_
UI.removeFavoriteUserInCollaboration({{shopMemberId}})"
id=
"favoriteButton"
>
onclick=
"C
ollaboration
UI.removeFavoriteUserInCollaboration({{shopMemberId}})"
id=
"favoriteButton"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_profile_favorite.png"
alt=
"お気に入り"
>
...
...
@@ -30,7 +30,7 @@
{{/isFavorite}}
{{^isFavorite}}
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"C
HAT_
UI.insertFavoriteUserInCollaboration({{shopMemberId}})"
id=
"favoriteButton"
>
onclick=
"C
ollaboration
UI.insertFavoriteUserInCollaboration({{shopMemberId}})"
id=
"favoriteButton"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_profile_favorite_white.png"
alt=
"お気に入り"
>
...
...
public_new/template/template_add_user_group_list.html
View file @
6e009873
<li
class=
"d-flex align-items-center"
style=
"border-bottom: 1px solid #e2e8f0;"
>
<a
href=
"#"
class=
"w-100"
onclick=
"C
HAT_UI
.refreshAllGroupForAddUser({{id}});"
>
<a
href=
"#"
class=
"w-100"
onclick=
"C
hatAddUser
.refreshAllGroupForAddUser({{id}});"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail-icon"
>
...
...
public_new/template/template_add_user_group_list_in_collaboration.html
View file @
6e009873
<li
class=
"d-flex align-items-center"
>
<a
href=
"#"
class=
"w-100"
onclick=
"C
HAT_
UI.refreshAllGroupForAddUserInCollaboration({{id}});"
>
<a
href=
"#"
class=
"w-100"
onclick=
"C
ollaboration
UI.refreshAllGroupForAddUserInCollaboration({{id}});"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail-icon"
>
...
...
public_new/template/template_add_user_group_path.html
View file @
6e009873
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"CHAT_UI.refreshAllGroupForAddUser({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"ChatAddUser.refreshAllGroupForAddUser({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
public_new/template/template_add_user_group_path_in_collaboration.html
View file @
6e009873
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"CHAT_UI.refreshAllGroupForAddUserInCollaboration({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"CollaborationUI.refreshAllGroupForAddUserInCollaboration({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
public_new/template/template_add_user_group_user_list.html
View file @
6e009873
<div
class=
"category"
onclick=
"C
HAT_
UI.toggleCategory(this);"
>
<div
class=
"category"
onclick=
"C
ollaboration
UI.toggleCategory(this);"
>
<div
class=
"category_name"
><span>
{{groupName}}
</span></div>
</div>
<ul
class=
"p-0 chat_make_room_list"
>
...
...
public_new/template/template_add_user_group_user_list_in_collaboration.html
View file @
6e009873
<div
class=
"category"
onclick=
"C
HAT_
UI.toggleCategory(this);"
>
<div
class=
"category"
onclick=
"C
ollaboration
UI.toggleCategory(this);"
>
<div
class=
"category_name"
><span>
{{groupName}}
</span></div>
</div>
<ul
class=
"p-0 chat_make_room_list"
>
...
...
public_new/template/template_chatroom_user_list.html
View file @
6e009873
{{#userList}}
<div
class=
"user_item"
>
<a
href=
"javascript:return false;"
onclick=
"
CHAT_UI
.makeNameCard({{shopMemberId}})"
>
<a
href=
"javascript:return false;"
onclick=
"
Namecard
.makeNameCard({{shopMemberId}})"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
>
...
...
public_new/template/template_group_list.html
View file @
6e009873
<li
class=
"d-flex align-items-center"
style=
"border-bottom: 1px solid #e2e8f0;"
>
<a
href=
"#"
class=
"w-100"
onclick=
"C
HAT_UI
.refreshAllGroupSearch({{id}});"
>
<a
href=
"#"
class=
"w-100"
onclick=
"C
ontact
.refreshAllGroupSearch({{id}});"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail-icon"
>
...
...
@@ -18,10 +18,10 @@
<div
class=
"chat_item_r"
>
<div
class=
"d-flex flex-column"
>
{{#isFavorite}}
<span
class=
"star active group_{{id}}"
onclick=
"C
HAT_UI
.favoriteGroupChange({{id}},this)"
></span>
<span
class=
"star active group_{{id}}"
onclick=
"C
ontact
.favoriteGroupChange({{id}},this)"
></span>
{{/isFavorite}}
{{^isFavorite}}
<span
class=
"star disable group_{{id}}"
onclick=
"C
HAT_UI
.favoriteGroupChange({{id}},this)"
></span>
<span
class=
"star disable group_{{id}}"
onclick=
"C
ontact
.favoriteGroupChange({{id}},this)"
></span>
{{/isFavorite}}
</div>
</div>
...
...
public_new/template/template_group_path.html
View file @
6e009873
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"CHAT_UI.refreshAllGroupSearch({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"Contact.refreshAllGroupSearch({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
public_new/template/template_group_user_list.html
View file @
6e009873
<div
class=
"category"
onclick=
"C
HAT_
UI.toggleCategory(this);"
><div
class=
"category_name"
><span>
{{groupName}}
</span></div></div>
<div
class=
"category"
onclick=
"C
ollaboration
UI.toggleCategory(this);"
><div
class=
"category_name"
><span>
{{groupName}}
</span></div></div>
<ul
class=
"p-0 chat_make_room_list"
>
{{#groupUserList}}
<li
class=
"d-flex align-items-center"
>
<a
href=
"javascript:return false;"
onclick=
"
CHAT_UI
.makeNameCard({{shopMemberId}})"
style=
"width: 100%;"
>
<a
href=
"javascript:return false;"
onclick=
"
Namecard
.makeNameCard({{shopMemberId}})"
style=
"width: 100%;"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail"
>
...
...
@@ -21,10 +21,10 @@
<div
class=
"chat_item_r"
>
<div
class=
"d-flex flex-column"
>
{{#isFavorite}}
<span
class=
"star active shopmember_{{shopMemberId}}"
onclick=
"
CHAT_UI
.favoriteUserChange({{shopMemberId}},this)"
></span>
<span
class=
"star active shopmember_{{shopMemberId}}"
onclick=
"
Namecard
.favoriteUserChange({{shopMemberId}},this)"
></span>
{{/isFavorite}}
{{^isFavorite}}
<span
class=
"star disable shopmember_{{shopMemberId}}"
onclick=
"
CHAT_UI
.favoriteUserChange({{shopMemberId}},this)"
></span>
<span
class=
"star disable shopmember_{{shopMemberId}}"
onclick=
"
Namecard
.favoriteUserChange({{shopMemberId}},this)"
></span>
{{/isFavorite}}
</div>
</div>
...
...
public_new/template/template_make_room_group_list.html
View file @
6e009873
<li
class=
"d-flex align-items-center"
style=
"border-bottom: 1px solid #e2e8f0;"
>
<a
href=
"#"
class=
"w-100"
onclick=
"ChatMa
nagementCommon
.refreshAllGroupForMakeRoom({{id}});"
>
<a
href=
"#"
class=
"w-100"
onclick=
"ChatMa
keRoom
.refreshAllGroupForMakeRoom({{id}});"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail-icon"
>
...
...
public_new/template/template_make_room_group_path.html
View file @
6e009873
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"ChatManagementCommon.refreshAllGroupForMakeRoom({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
<a
href=
"#"
class=
"breadcrumb_item"
onclick=
"ChatMakeRoom.refreshAllGroupForMakeRoom({{id}});"
><span>
{{name}}
</span></a>
\ No newline at end of file
public_new/template/template_make_room_group_user_list.html
View file @
6e009873
<div
class=
"category"
onclick=
"C
HAT_
UI.toggleCategory(this);"
>
<div
class=
"category"
onclick=
"C
ollaboration
UI.toggleCategory(this);"
>
<div
class=
"category_name"
><span>
{{groupName}}
</span></div>
</div>
<ul
class=
"p-0 chat_make_room_list"
>
...
...
public_new/template/template_user_list.html
View file @
6e009873
<ul
class=
"p-0 chat_make_room_list"
style=
"margin-top: 0px !important;border-top: none !important;"
>
{{#userList}}
<li
class=
"d-flex align-items-center"
>
<a
href=
"javascript:return false;"
onclick=
"
CHAT_UI
.makeNameCard({{shopMemberId}})"
style=
"width: 100%;"
>
<a
href=
"javascript:return false;"
onclick=
"
Namecard
.makeNameCard({{shopMemberId}})"
style=
"width: 100%;"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail"
>
...
...
@@ -20,10 +20,10 @@
<div
class=
"chat_item_r"
>
<div
class=
"d-flex flex-column"
>
{{#isFavorite}}
<span
class=
"star active shopmember_{{shopMemberId}}"
onclick=
"
CHAT_UI
.favoriteUserChange({{shopMemberId}},this)"
></span>
<span
class=
"star active shopmember_{{shopMemberId}}"
onclick=
"
Namecard
.favoriteUserChange({{shopMemberId}},this)"
></span>
{{/isFavorite}}
{{^isFavorite}}
<span
class=
"star disable shopmember_{{shopMemberId}}"
onclick=
"
CHAT_UI
.favoriteUserChange({{shopMemberId}},this)"
></span>
<span
class=
"star disable shopmember_{{shopMemberId}}"
onclick=
"
Namecard
.favoriteUserChange({{shopMemberId}},this)"
></span>
{{/isFavorite}}
</div>
</div>
...
...
public_new/template/template_user_message.html
View file @
6e009873
<div
class=
"room_left chat_message"
data-messageid=
"{{messageId}}"
>
<figure>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#profileModal1"
>
<img
src=
"{{profileImage}}"
onError=
"this.src='./img/noImage.png'"
onclick=
"
CHAT_UI
.makeNameCard({{shopMemberId}})"
>
<img
src=
"{{profileImage}}"
onError=
"this.src='./img/noImage.png'"
onclick=
"
Namecard
.makeNameCard({{shopMemberId}})"
>
</a>
</figure>
<div
class=
"room_left-text"
>
...
...
public_new/template/template_user_name_card.html
View file @
6e009873
...
...
@@ -13,12 +13,12 @@
</div>
<div
class=
"modal-body"
id=
"userNameCard-scroll"
>
{{#groupPathList}}
<li
onclick=
"C
HAT_UI
.refreshAllGroupSearch({{groupId}});"
><b>
{{groupPath}}
</b></li>
<li
onclick=
"C
ontact
.refreshAllGroupSearch({{groupId}});"
><b>
{{groupPath}}
</b></li>
{{/groupPathList}}
</div>
<div
class=
"modal-footer border-0 justify-content-center"
>
{{#isFavorite}}
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"
CHAT_UI
.removeFavoriteUser({{shopMemberId}})"
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"
Namecard
.removeFavoriteUser({{shopMemberId}})"
id=
"favoriteButton"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
...
...
@@ -29,7 +29,7 @@
</button>
{{/isFavorite}}
{{^isFavorite}}
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"
CHAT_UI
.insertFavoriteUser({{shopMemberId}})"
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"
Namecard
.insertFavoriteUser({{shopMemberId}})"
id=
"favoriteButton"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
...
...
@@ -39,7 +39,7 @@
</div>
</button>
{{/isFavorite}}
<button
type=
"button"
class=
"border-0 bg_green"
onclick=
"
CHAT_UI
.startVoice('{{shopMemberId}}','{{name}}');"
>
<button
type=
"button"
class=
"border-0 bg_green"
onclick=
"
Namecard
.startVoice('{{shopMemberId}}','{{name}}');"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_profile_phone.png"
alt=
"通話"
>
...
...
@@ -47,7 +47,7 @@
<span>
通話
</span>
</div>
</button>
<button
type=
"button"
class=
"border-0 bg_blue"
onclick=
"
CHAT_UI
.startChat('{{shopMemberId}}','{{name}}');"
>
<button
type=
"button"
class=
"border-0 bg_blue"
onclick=
"
Namecard
.startChat('{{shopMemberId}}','{{name}}');"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_profile_chat.png"
alt=
"チャット"
>
...
...
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