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
954849fb
Commit
954849fb
authored
Jul 08, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree shaking for js
parent
b952b542
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
37 additions
and
483 deletions
+37
-483
public_new/chat_add_user_confirm.html
+0
-1
public_new/chat_room.html
+0
-1
public_new/collaboration.html
+0
-1
public_new/collaboration_documents.html
+0
-1
public_new/collaboration_picture.html
+0
-1
public_new/collaboration_video.html
+0
-1
public_new/collaboration_voice.html
+0
-1
public_new/collaboration_whiteboard.html
+0
-1
public_new/js/chat-error.js
+2
-9
public_new/js/chat-ui-clickEvents.js
+0
-206
public_new/js/chat-ui.js
+0
-0
public_new/js/chat.js
+20
-13
public_new/js/chatMakeRoom.js
+1
-1
public_new/js/common/native-bridge-datasource.js
+2
-3
public_new/js/languages/language_en.js
+0
-8
public_new/js/languages/language_ja.js
+0
-8
public_new/js/languages/language_ko.js
+0
-8
public_new/js/sockets/chat-websocket-refresh-group-list.js
+3
-85
public_new/js/sockets/chat-websocket-refresh-user-list-in-group.js
+0
-124
public_new/js/sockets/chat-websocket.js
+9
-10
No files found.
public_new/chat_add_user_confirm.html
View file @
954849fb
...
...
@@ -101,7 +101,6 @@
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
//CHAT_UI.showMakeRoomConfirmView();
CHAT_UI
.
showAddUserConfirmView
();
};
</script>
...
...
public_new/chat_room.html
View file @
954849fb
...
...
@@ -168,7 +168,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/collaboration.html
View file @
954849fb
...
...
@@ -149,7 +149,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/collaboration_documents.html
View file @
954849fb
...
...
@@ -92,7 +92,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/collaboration_picture.html
View file @
954849fb
...
...
@@ -153,7 +153,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/collaboration_video.html
View file @
954849fb
...
...
@@ -143,7 +143,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/collaboration_voice.html
View file @
954849fb
...
...
@@ -88,7 +88,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/collaboration_whiteboard.html
View file @
954849fb
...
...
@@ -145,7 +145,6 @@
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-group-list.js"
></script>
<script
src=
"./js/sockets/chat-websocket-refresh-user-list-in-group.js"
></script>
<!-- View -->
<script
src=
"./js/chat.js"
></script>
<script
src=
"./js/chat-ui.js"
></script>
...
...
public_new/js/chat-error.js
View file @
954849fb
jQuery
(
"#homeButton"
).
on
(
"click"
,
function
()
{
NativeBridgeDelegate
.
goHome
();
});
jQuery
(
"#reloadButton"
).
on
(
"click"
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要。
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
reload
();
}
});
});
\ No newline at end of file
public_new/js/chat-ui-clickEvents.js
View file @
954849fb
...
...
@@ -9,99 +9,6 @@ $("#createChatRoom").on("click", function () {
socket
.
emit
(
"getGroupList"
,
isInvite
);
});
// Room Delete
// チャットルーム削除ボタン処理
$
(
"#roomDeleteButton"
).
on
(
"click"
,
function
(
e
)
{
if
(
$
(
".deleteBox"
).
is
(
":visible"
))
{
// チャットルーム削除アイコンが表示されている時、ブラインド処理を行う
$
(
".deleteBox"
)
.
finish
()
.
show
()
.
fadeTo
(
"slow"
,
0
,
function
()
{
$
(
this
).
hide
();
});
// チャットリストについてクリックイベントを与える
$
(
".chat_list"
).
off
(
"click"
);
$
(
".chat_list:not(.active_chat)"
).
on
(
"click"
,
function
(
e
)
{
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
let
roomId
=
$
(
this
).
data
(
"roomId"
);
let
roomName
=
$
(
this
).
data
(
"roomname"
);
socket
.
emit
(
"joinRoom"
,
roomId
,
roomName
,
function
()
{
$
(
"#messages"
).
html
(
""
);
$
(
".titleRoomName"
).
text
(
roomName
).
data
(
"roomName"
,
roomName
);
$
(
"#pills-chat-tab"
).
tab
(
"show"
);
$
(
"#message-search"
).
attr
(
"placeholder"
,
getLocalizedString
(
"chat_search_placeholder"
)
);
});
});
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
$
(
".titleRoomName"
).
text
(
roomListTitle
);
$
(
".chat_list.active_chat"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#pills-chat-tab"
).
tab
(
"show"
);
});
}
else
{
// チャットルーム削除アイコンが表示されていない場合、表示する
$
(
".deleteBox"
).
finish
().
hide
().
fadeTo
(
"slow"
,
1
).
show
();
// #36129に対応
let
deleteRoomTitle
=
getLocalizedString
(
"deleteRoomTitle"
);
$
(
".titleRoomName"
).
text
(
deleteRoomTitle
);
// 重複処理を防ぐためにチャットリストのクリックイベントを消す
$
(
".chat_list"
).
off
(
"click"
);
// チャットルームの削除アイコンにクリックイベントを与える
$
(
".deleteBox"
).
off
(
"click"
);
$
(
".deleteBox"
).
on
(
"click"
,
function
(
e
)
{
// #36174
let
roomId
=
$
(
this
).
data
(
"roomId"
);
let
activeRoom
=
$
(
this
).
data
(
"activeRoom"
);
$
(
"#roomDeleteTitle"
).
text
(
getLocalizedString
(
"roomDeleteTitle"
));
$
(
"#roomDelete"
).
text
(
getLocalizedString
(
"roomDelete"
));
$
(
"#cancelTitle"
).
text
(
getLocalizedString
(
"cancelTitle"
));
// #36128
$
(
"#roomDeleteConfirm"
)
.
appendTo
(
"body"
)
.
modal
({
backdrop
:
"static"
,
keyboard
:
false
,
})
.
on
(
"click"
,
"#roomDelete"
,
function
(
e
)
{
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
// 現在接続されているチャットルームを離れるとメッセージテップを初期化する
if
(
activeRoom
)
{
$
(
"#messages"
).
html
(
""
);
CHAT
.
saveRoomInfo
(
""
,
""
);
}
// チャットルームから退場する
socket
.
emit
(
"exitRoom"
,
roomId
);
// #36129に対応
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
$
(
".titleRoomName"
).
text
(
roomListTitle
);
});
});
}
});
$
(
"#room-search"
).
on
(
"input"
,
function
(
event
)
{
if
(
$
(
"#room-search"
).
val
().
length
>
0
)
{
// 検索結果が有る場合、結果を表示する
socket
.
emit
(
"roomSearch"
,
encodeURIComponent
(
$
(
"#room-search"
).
val
()));
}
else
{
if
(
IS_ONLINE
==
"true"
)
{
NativeBridgeDelegate
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
ChatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
}
}
});
//メッセージ送信
$
(
"#messageInput"
).
on
(
"keypress"
,
function
(
event
)
{
if
(
event
.
which
==
13
)
{
...
...
@@ -183,119 +90,6 @@ $("#video-form").on("submit", function (e) {
}
});
$
(
"#message-search"
).
on
(
"input"
,
function
(
event
)
{
// チャットキーワードを入力するとページ内にある単語をハイライトする。(mark.js 使用)
if
(
$
(
this
).
val
())
{
$
(
".message_content"
).
unmark
();
$
(
".message_content"
).
mark
(
$
(
this
).
val
());
if
(
$
(
"[data-markjs=true]"
).
length
>
0
)
{
// マーキングされている単語があった場合、最後の単語にスクロールを移動する。
CHAT_UI
.
scrollToLastMarkedUnseen
(
$
(
this
).
val
());
}
else
{
// マーキングされている単語がない場合、下段にスクロールする。
CHAT_UI
.
scrollToBottom
();
}
}
else
{
// チャットキーワードが空欄になるとマーキングを解除し、下段にスクロールする。
$
(
".message_content"
).
unmark
();
CHAT_UI
.
scrollToBottom
();
}
});
//次のマーキングされた単語にスクロールを移動する。
$
(
"#pre-search"
).
on
(
"click"
,
function
(
event
)
{
CHAT_UI
.
scrollToLastMarkedUnseen
(
jQuery
(
"#message-search"
).
val
());
});
// Exit Room
$
(
"#exitRoom"
).
on
(
"click"
,
function
(
event
)
{
// 36174
$
(
"#exitRoomTitle"
).
text
(
getLocalizedString
(
"exitRoomTitle"
));
$
(
"#exitRoomOk"
).
text
(
getLocalizedString
(
"yesTitle"
));
$
(
"#noExit"
).
text
(
getLocalizedString
(
"cancelTitle"
));
$
(
"#exitRoomConfirm"
)
.
appendTo
(
"body"
)
.
modal
({
backdrop
:
"static"
,
keyboard
:
false
,
})
.
on
(
"click"
,
"#exitRoomOk"
,
function
(
e
)
{
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
// チャットルームから退場する
socket
.
emit
(
"exitRoom"
);
$
(
"#dismiss"
).
click
();
CHAT
.
saveRoomInfo
(
""
,
""
);
});
});
// Side Bar
$
(
"#sidebarCollapse"
).
on
(
"click"
,
function
()
{
// open sidebar
$
(
"#sidebar"
).
addClass
(
"active"
);
// fade in the overlay
$
(
".overlay"
).
addClass
(
"active"
);
$
(
".collapse.in"
).
toggleClass
(
"in"
);
$
(
"a[aria-expanded=true]"
).
attr
(
"aria-expanded"
,
"false"
);
});
$
(
"#dismiss, .overlay"
).
on
(
"click"
,
function
()
{
// hide sidebar
$
(
"#sidebar"
).
removeClass
(
"active"
);
// hide overlay if dismissable
$
(
".overlay:not(.undismissable)"
).
removeClass
(
"active"
);
});
//Invite User
//招待ボタンを押すとグループリストを持ってくる。(ボタンを動的に追加して微動作中)
$
(
"#addUser"
).
on
(
"click"
,
function
(
event
)
{
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
let
isInvite
=
true
;
CHAT
.
globalIsInvite
=
isInvite
;
socket
.
emit
(
"getGroupList"
,
isInvite
);
});
//グループ画面での検索
$
(
"#groupListKeyword"
).
on
(
"input"
,
function
(
event
)
{
// data-name値で当該キーワードが入っているグループのみを表示する。
if
(
$
(
this
).
val
())
{
$
(
'.group_list:not([data-name*="'
+
$
(
this
).
val
()
+
'" i])'
).
hide
();
$
(
'.group_list[data-name*="'
+
$
(
this
).
val
()
+
'" i]'
).
show
();
}
else
{
$
(
".group_list"
).
show
();
}
});
$
(
"#userListKeyword"
).
on
(
"input"
,
function
(
event
)
{
// data-name値で当該キーワードが入っているユーザーのみを表示する。
if
(
$
(
this
).
val
())
{
$
(
'.user_list:not([data-name*="'
+
$
(
this
).
val
()
+
'" i])'
).
hide
();
$
(
'.user_list[data-name*="'
+
$
(
this
).
val
()
+
'" i]'
).
show
();
}
else
{
$
(
".user_list"
).
show
();
}
});
$
(
"#selectListKeyword"
).
on
(
"input"
,
function
(
event
)
{
if
(
$
(
this
).
val
())
{
$
(
'.select_user_list:not([data-name*="'
+
$
(
this
).
val
()
+
'" i])'
).
hide
();
$
(
'.select_user_list[data-name*="'
+
$
(
this
).
val
()
+
'" i]'
).
show
();
}
else
{
$
(
".select_user_list"
).
show
();
}
});
$
(
"#contactButton"
).
on
(
"click"
,
function
(
event
)
{
CHAT_UI
.
refreshContactScreen
();
});
$
(
"#chatButton"
).
on
(
"click"
,
function
(
event
)
{
CHAT_UI
.
refreshRoomList
(
ChatRoomType
.
DM
);
});
$
(
"#tabDM"
).
on
(
"click"
,
function
(
e
)
{
CHAT_UI
.
refreshRoomList
(
ChatRoomType
.
DM
);
});
...
...
public_new/js/chat-ui.js
View file @
954849fb
This diff is collapsed.
Click to expand it.
public_new/js/chat.js
View file @
954849fb
...
...
@@ -18,7 +18,7 @@ var beforeScroll;
CHAT
.
saveRoomInfo
=
function
(
roomID
,
roomName
)
{
CHAT
.
globalLoginParameter
.
roomId
=
roomID
;
CHAT
.
globalLoginParameter
.
roomName
=
roomName
;
NativeBridgeDelegate
.
saveVisitRoomInfo
(
roomID
,
roomName
)
NativeBridgeDelegate
.
saveVisitRoomInfo
(
roomID
,
roomName
)
;
};
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
...
...
@@ -570,7 +570,10 @@ document.addEventListener("DOMContentLoaded", function () {
if
(
keyword
.
length
==
1
)
{
return
;
}
const
messages
=
NativeBridgeDataSource
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
));
const
messages
=
NativeBridgeDataSource
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
)
);
var
userMessageTemplate
=
getTemplate
(
TemplateURL
.
USER_MESSAGE
);
var
myMessageTemplate
=
getTemplate
(
TemplateURL
.
MY_MESSAGE
);
...
...
@@ -716,7 +719,10 @@ CHAT.searchMessage = function (keyword, workVal) {
const
selectedUser
=
$
(
".img_wrap.filter"
)[
user
];
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
"user-id"
));
});
var
messages
=
NativeBridgeDataSource
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
));
var
messages
=
NativeBridgeDataSource
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
","
)
);
var
userMessageTemplate
=
getTemplate
(
TemplateURL
.
USER_MESSAGE
);
var
myMessageTemplate
=
getTemplate
(
TemplateURL
.
MY_MESSAGE
);
...
...
@@ -765,15 +771,16 @@ CHAT.searchMessage = function (keyword, workVal) {
};
// 下スクロールでユーザーリストを非表示
var
startPos
=
0
,
winScrollTop
=
0
;
$
(
window
).
on
(
'scroll'
,
function
(){
winScrollTop
=
$
(
this
).
scrollTop
();
if
(
winScrollTop
>=
startPos
)
{
if
(
winScrollTop
>=
200
){
$
(
'#chat_room .user_list'
).
addClass
(
'hide'
);
}
}
else
{
$
(
'#chat_room .user_list'
).
removeClass
(
'hide'
);
var
startPos
=
0
;
var
winScrollTop
=
0
;
$
(
window
).
on
(
"scroll"
,
function
()
{
winScrollTop
=
$
(
this
).
scrollTop
();
if
(
winScrollTop
>=
startPos
)
{
if
(
winScrollTop
>=
200
)
{
$
(
"#chat_room .user_list"
).
addClass
(
"hide"
);
}
startPos
=
winScrollTop
;
}
else
{
$
(
"#chat_room .user_list"
).
removeClass
(
"hide"
);
}
startPos
=
winScrollTop
;
});
public_new/js/chatMakeRoom.js
View file @
954849fb
...
...
@@ -43,7 +43,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
var
userTemplate
=
getTemplate
(
TemplateURL
.
MAKE_ROOM_USER_LIST
);
let
html
=
renderUser
(
userTemplate
,
userList
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
".overlay_src_msg"
)
.
html
(
obj
);
overlayMessage
.
html
(
obj
);
hasNoData
=
userList
.
length
==
0
;
}
...
...
public_new/js/common/native-bridge-datasource.js
View file @
954849fb
// ios用
function
callNativeApp
(
iosKey
,
jsonData
)
{
console
.
log
(
"callNativeApp called: "
+
iosKey
);
console
.
log
(
"callNativeApp called: "
+
iosKey
);
var
result
;
try
{
var
key
=
iosKey
;
...
...
@@ -446,4 +446,4 @@ NativeBridgeDataSource.getHostRequestFlg = function () {
}
else
{
return
android
.
getHostRequestFlg
();
}
};
\ No newline at end of file
};
public_new/js/languages/language_en.js
View file @
954849fb
...
...
@@ -2,8 +2,6 @@ $.lang.en = {
"chat_placeholder"
:
"Type message"
,
"chat_search_placeholder"
:
" Search Message"
,
"room_search_placeholder"
:
" Search Room"
,
"participants"
:
"Member List"
,
"exitRoom"
:
"Exit "
,
"roomListTitle"
:
"Room List"
,
"deleteRoomTitle"
:
"Delete Room"
,
"inviteUsersButton"
:
"invite"
,
...
...
@@ -21,18 +19,12 @@ $.lang.en = {
"orderByTime"
:
"OrderByTime"
,
"orderByUnread"
:
"OrderByUnread"
,
"roomKeywordPlaceHolder"
:
"Search"
,
"okayLabel"
:
"Okay!"
,
"completeLabel"
:
"Complete."
,
"thankLabel"
:
"Thank you"
,
"startToWorkLabel"
:
"Start to work"
,
"groupListKeyword"
:
"Search"
,
"userSearch"
:
"User Search"
,
"groupSearch"
:
"Group Search"
,
"groupPageSubtitle"
:
"Groups"
,
"noMessages"
:
"No Messages"
,
"image"
:
"Image"
,
"chatKeyword"
:
"Search"
,
"userListKeyword"
:
"Search"
,
"newRoomName"
:
"Please input Room Name"
,
"everyoneIsHere"
:
"Everyone is in the chat."
,
"people"
:
"people"
,
...
...
public_new/js/languages/language_ja.js
View file @
954849fb
...
...
@@ -2,8 +2,6 @@ $.lang.ja = {
"chat_placeholder"
:
"メッセージを入力"
,
"chat_search_placeholder"
:
" メッセージ検索"
,
"room_search_placeholder"
:
" ルーム検索"
,
"participants"
:
"メンバーリスト"
,
"exitRoom"
:
"退出 "
,
"roomListTitle"
:
"チャット"
,
"deleteRoomTitle"
:
"ルーム削除"
,
"inviteUsersButton"
:
"招待"
,
...
...
@@ -20,18 +18,12 @@ $.lang.ja = {
"orderByTime"
:
"新着順"
,
"orderByUnread"
:
"未読優先"
,
"roomKeywordPlaceHolder"
:
"検索"
,
"okayLabel"
:
"了解しました。"
,
"completeLabel"
:
"完了しました。"
,
"thankLabel"
:
"ありがとうございます。"
,
"startToWorkLabel"
:
"作業開始します。"
,
"userSearch"
:
"ユーザー検索"
,
"groupSearch"
:
"グループ検索"
,
"groupListKeyword"
:
"検索"
,
"groupPageSubtitle"
:
"グループ"
,
"noMessages"
:
"メッセージがありません。"
,
"image"
:
"画像"
,
"chatKeyword"
:
"検索"
,
"userListKeyword"
:
"検索"
,
"invitedUser"
:
"参加者"
,
"newRoomName"
:
"ルーム名を入力してください"
,
"everyoneIsHere"
:
"招待可能なメンバーがいません。"
,
...
...
public_new/js/languages/language_ko.js
View file @
954849fb
...
...
@@ -2,8 +2,6 @@ $.lang.ko = {
"chat_placeholder"
:
"메시지를 입력하세요."
,
"chat_search_placeholder"
:
" 메세지검색"
,
"room_search_placeholder"
:
" 채팅방 검색"
,
"participants"
:
"멤버 리스트"
,
"exitRoom"
:
"나가기 "
,
"roomListTitle"
:
"채팅 리스트"
,
"deleteRoomTitle"
:
"채팅방 삭제"
,
"inviteUsersButton"
:
"유저 초대"
,
...
...
@@ -21,18 +19,12 @@ $.lang.ko = {
"orderByTime"
:
"최신순"
,
"orderByUnread"
:
"안 읽은 순"
,
"roomKeywordPlaceHolder"
:
"검색"
,
"okayLabel"
:
"알겠습니다."
,
"completeLabel"
:
"작업이 끝났습니다."
,
"thankLabel"
:
"감사합니다."
,
"startToWorkLabel"
:
"작업을 시작합니다."
,
"groupListKeyword"
:
"검색"
,
"userSearch"
:
"유저 검색"
,
"groupSearch"
:
"그룹 검색"
,
"groupPageSubtitle"
:
"그룹"
,
"noMessages"
:
"메시지가 없습니다."
,
"image"
:
"이미지"
,
"chatKeyword"
:
"검색"
,
"userListKeyword"
:
"검색"
,
"newRoomName"
:
"방 이름을 입력해주세요."
,
"everyoneIsHere"
:
"초대가능한 유저가 없습니다."
,
"people"
:
"명"
,
...
...
public_new/js/sockets/chat-websocket-refresh-group-list.js
View file @
954849fb
...
...
@@ -3,7 +3,7 @@ var bindOnRefreshGroupList = function () {
socket
.
on
(
SOCKET_KEY
.
REFRESH_GROUPLIST
,
function
(
groups
,
isInvite
)
{
const
groupListElement
=
$
(
"#group_list"
);
groupListElement
.
html
(
""
);
const
template
=
$
(
"#group-template"
).
html
();
if
(
groups
.
length
===
0
)
{
groupListElement
.
append
(
'<center class="text-secondary">'
+
...
...
@@ -12,92 +12,10 @@ var bindOnRefreshGroupList = function () {
);
}
addGroupNameAndNumberOfUsers
(
groups
);
// Rotate
handleRotate
();
updateTopBar
();
// Set Title
updateTopBar
(
isInvite
);
updateUserSelectionLength
();
setupBackButton
();
});
};
var
addGroupNameAndNumberOfUsers
=
function
(
groups
)
{
// グループ名と人数を表記する。
groups
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
template
,
{
name
:
group
.
groupName
,
info
:
group
.
memberCnt
+
getLocalizedString
(
"people"
),
});
// グループをクリックすると、該当グループのユーザーリストを読み込むようにイベントを与える
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
socket
.
emit
(
"getUserListInGroup"
,
group
.
groupId
,
isInvite
);
$
(
"#groupName"
).
text
(
group
.
groupName
);
});
groupListElement
.
append
(
obj
);
});
};
var
handleRotate
=
function
()
{
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".group_list"
).
addClass
(
"col-6"
).
removeClass
(
"col-12"
);
}
};
var
setupBackButton
=
function
()
{
const
backButton
=
$
(
"#backButton"
);
backButton
.
show
();
backButton
.
off
().
on
(
"click"
,
function
()
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
if
(
isInvite
)
{
$
(
"#pills-chat-tab"
).
tab
(
"show"
);
}
else
{
if
(
IS_ONLINE
==
"true"
)
{
// todo: peacekim:: needs to check it only needs for android or not.
NativeBridgeDelegate
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
ChatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
}
}
});
};
var
updateUserSelectionLength
=
function
()
{
const
userSelectionLength
=
$
(
"#userSelectionLength"
);
if
(
CHAT
.
globalSelectedUserList
.
length
>
0
)
{
userSelectionLength
.
text
(
CHAT
.
globalSelectedUserList
.
length
);
}
else
{
userSelectionLength
.
text
(
""
);
}
};
var
updateTopBar
=
function
(
isInvite
)
{
// Set Title
let
memberSelectTitle
=
getLocalizedString
(
"groupSearch"
);
$
(
"#pills-group-tab"
).
tab
(
"show"
);
const
titleRoomName
=
$
(
".titleRoomName"
);
const
userSelectionConfirmButton
=
$
(
"#userSelectionConfirmBtn"
);
titleRoomName
.
text
(
memberSelectTitle
);
if
(
isInvite
)
{
$
(
"#newRoomName, .roomListIcon, .chatRoomIcon"
).
hide
();
}
else
{
$
(
".roomListIcon, .chatRoomIcon, #newRoomName"
).
hide
();
}
userSelectionConfirmButton
.
show
();
userSelectionConfirmButton
.
off
().
on
(
"click"
,
function
()
{
CHAT_UI
.
setConfirmButtonEvent
(
isInvite
);
});
var
updateTopBar
=
function
()
{
$
(
"#newRoomName"
).
hide
();
};
public_new/js/sockets/chat-websocket-refresh-user-list-in-group.js
deleted
100644 → 0
View file @
b952b542
var
bindOnRefreshUserListInGroup
=
function
()
{
// Update User List(Invite)
// #36170
socket
.
on
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
,
function
(
users
,
groupId
,
isInvite
)
{
$
(
"#user_list"
).
html
(
""
);
// Set Title
updateTitle
();
addUserList
(
users
);
// Rotate
handleRotateOnUserListInGroup
();
setupBackButtonOnUserListInGroup
(
isInvite
);
setupUserSelectionConfirmButton
(
isInvite
);
updateUIOnUserListInGroup
();
}
);
};
var
updateTitle
=
function
()
{
let
memberSelectTitle
=
getLocalizedString
(
"userSearch"
);
$
(
".titleRoomName"
).
text
(
memberSelectTitle
);
};
var
addUserList
=
function
(
users
)
{
users
.
forEach
(
function
(
user
)
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
user
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
user
.
profileImagePath
);
// クリックするとactive クラスを与え、チェック表示を出させる。
let
obj
=
activateCheckUser
(
user
.
loginId
,
user
.
shopMemberId
,
user
.
profileImagePath
);
let
findObj
=
CHAT
.
globalSelectedUserList
.
find
(
function
(
selectedUser
)
{
return
selectedUser
.
loginId
==
user
.
loginId
;
});
if
(
findObj
)
{
$
(
obj
).
find
(
".userCheckBox"
).
toggleClass
(
"active"
);
}
$
(
"#user_list"
).
append
(
obj
);
});
};
var
renderUser
=
function
(
template
,
userID
,
profileImagePath
,
userName
)
{
return
Mustache
.
render
(
template
,
{
id
:
userID
,
profileImage
:
profileImagePath
,
name
:
userName
,
});
};
var
activateCheckUser
=
function
(
loginID
,
shopMemberID
,
profileImagePath
)
{
const
template
=
$
(
"#user-template"
).
html
();
let
html
=
renderUser
(
template
,
shopMemberID
,
profileImagePath
,
loginID
);
return
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{
if
(
$
(
this
).
find
(
".userCheckBox.active"
).
length
>
0
)
{
// remove
CHAT
.
globalSelectedUserList
=
filterRemovedUser
(
loginID
);
}
else
{
// add
addSelectedUser
(
loginID
,
shopMemberID
,
profileImagePath
);
}
$
(
this
).
find
(
".userCheckBox"
).
toggleClass
(
"active"
);
updateUserSelectionLength
();
});
};
var
filterRemovedUser
=
function
(
userID
)
{
return
CHAT
.
globalSelectedUserList
.
filter
(
function
(
element
)
{
return
userID
!=
element
.
loginId
;
});
};
var
addSelectedUser
=
function
(
loginID
,
shopMemberID
,
profileImagePath
)
{
CHAT
.
globalSelectedUserList
.
push
({
loginId
:
loginID
,
shopMemberId
:
shopMemberID
,
profileImagePath
:
profileImagePath
,
});
};
var
handleRotateOnUserListInGroup
=
function
()
{
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".user_list"
).
addClass
(
"col-6"
).
removeClass
(
"col-12"
);
$
(
".squareBoxContent span"
).
addClass
(
"landscape_span"
);
}
};
var
setupBackButtonOnUserListInGroup
=
function
(
isInvite
)
{
const
backButton
=
$
(
"#backButton"
);
backButton
.
off
().
on
(
"click"
,
function
()
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
socket
.
emit
(
"getGroupList"
,
isInvite
);
});
backButton
.
show
();
};
var
setupUserSelectionConfirmButton
=
function
(
isInvite
)
{
const
userSelectionConfirmButton
=
$
(
"#userSelectionConfirmBtn"
);
userSelectionConfirmButton
.
off
().
on
(
"click"
,
function
()
{
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
setConfirmButtonEvent
(
isInvite
);
});
userSelectionConfirmButton
.
show
();
};
var
updateUIOnUserListInGroup
=
function
()
{
$
(
".roomListIcon, .chatRoomIcon"
).
hide
();
$
(
".userCheckBox"
).
show
();
$
(
"#pills-user-tab"
).
tab
(
"show"
);
};
public_new/js/sockets/chat-websocket.js
View file @
954849fb
...
...
@@ -135,8 +135,6 @@ var emitJoin = function () {
return
;
}
updateRoomName
(
params
.
roomName
);
// loadingIndicatorを表示しない
CHAT_UI
.
dismissLoadingIndicator
();
});
...
...
@@ -157,12 +155,13 @@ var errorHandlingForEmitJoin = function () {
.
on
(
"click"
,
"#customAlertOk"
,
function
(
e
)
{});
};
var
updateRoomName
=
function
(
roomName
)
{
const
titleRoomName
=
$
(
".titleRoomName"
);
if
(
roomName
!=
undefined
)
{
titleRoomName
.
text
(
roomName
).
data
(
"roomName"
,
roomName
);
}
else
{
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
titleRoomName
.
text
(
roomListTitle
);
}
var
bindOnRefreshUserListInGroup
=
function
()
{
// Update User List(Invite)
// #36170
socket
.
on
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
,
function
(
users
,
groupId
,
isInvite
)
{
console
.
log
(
SOCKET_KEY
.
REFRESH_USERLIST_INGROUP
+
"message received but it does nothing."
);
}
);
};
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