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
5b26391a
Commit
5b26391a
authored
Apr 08, 2021
by
Lee Daehyun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release_sp3' into bugFix/#486_全クループ画面から全社範囲と全社の下位グループのアコーディオン範囲が重なって動作する
parents
998e751a
5b684341
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
112 additions
and
78 deletions
+112
-78
public_new/archive.html
+3
-0
public_new/chat.html
+1
-2
public_new/chat_room.html
+6
-3
public_new/contact.html
+2
-3
public_new/js/chat-ui.js
+41
-29
public_new/js/chat.js
+27
-13
public_new/js/chatMakeRoom.js
+12
-10
public_new/js/contact.js
+14
-15
public_new/js/language_en.js
+2
-1
public_new/js/language_ja.js
+2
-1
public_new/js/language_ko.js
+2
-1
No files found.
public_new/archive.html
View file @
5b26391a
...
@@ -147,10 +147,13 @@
...
@@ -147,10 +147,13 @@
let
IS_ONLINE
=
false
;
let
IS_ONLINE
=
false
;
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat.html
View file @
5b26391a
...
@@ -130,8 +130,7 @@
...
@@ -130,8 +130,7 @@
android
.
getLoginParameter
();
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
android
.
saveSelectedUserList
(
""
);
android
.
saveSelectedUserList
(
""
);
}
}
else
{
if
(
typeof
(
webkit
)
!=
"undefined"
)
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
}
...
...
public_new/chat_room.html
View file @
5b26391a
...
@@ -21,11 +21,11 @@
...
@@ -21,11 +21,11 @@
<!-- ナビメニュー -->
<!-- ナビメニュー -->
<nav>
<nav>
<div
class=
"chat_room_src_form none"
>
<div
class=
"chat_room_src_form none"
>
<
form
class=
"d-flex flex-row h-100 align-items-center"
>
<
div
class=
"d-flex flex-row h-100 align-items-center"
>
<input
type=
"search"
name=
"search"
placeholder=
"ユーザー検索"
>
<input
type=
"search"
name=
"search"
placeholder=
"ユーザー検索"
>
<span
class=
"src_icon"
></span>
<span
class=
"src_icon"
></span>
<a
href=
"#"
class=
"cancel"
>
キャンセル
</a>
<a
href=
"#"
class=
"cancel"
>
キャンセル
</a>
</
form
>
</
div
>
</div>
</div>
<div
class=
"row nav_item_wrap h-100 align-items-center"
>
<div
class=
"row nav_item_wrap h-100 align-items-center"
>
<div
class=
"col-4 pr-0"
>
<div
class=
"col-4 pr-0"
>
...
@@ -178,10 +178,13 @@
...
@@ -178,10 +178,13 @@
$
(
"#pictureModal"
).
load
(
"./modal_chat_picture.html"
);
$
(
"#pictureModal"
).
load
(
"./modal_chat_picture.html"
);
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
();
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/contact.html
View file @
5b26391a
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<main
id=
"contact"
>
<main
id=
"contact"
>
<!-- ユーザー検索 -->
<!-- ユーザー検索 -->
<div
class=
"search_form"
>
<div
class=
"search_form"
>
<input
type=
"search"
name=
"search"
placeholder=
"ユーザー検索"
>
<input
type=
"search"
name=
"search"
id=
"contactSearch"
placeholder=
"ユーザー検索"
>
<span
class=
"src_icon"
></span>
<span
class=
"src_icon"
></span>
<a
href=
"#"
class=
"cancel none"
>
キャンセル
</a>
<a
href=
"#"
class=
"cancel none"
>
キャンセル
</a>
</div>
</div>
...
@@ -206,8 +206,7 @@
...
@@ -206,8 +206,7 @@
if
(
typeof
(
android
)
!=
"undefined"
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
}
}
else
{
if
(
typeof
(
webkit
)
!=
"undefined"
)
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
}
...
...
public_new/js/chat-ui.js
View file @
5b26391a
...
@@ -125,8 +125,11 @@ $('#room-search').on('input', function(event) {
...
@@ -125,8 +125,11 @@ $('#room-search').on('input', function(event) {
socket
.
emit
(
'roomSearch'
,
encodeURIComponent
(
$
(
'#room-search'
).
val
()));
socket
.
emit
(
'roomSearch'
,
encodeURIComponent
(
$
(
'#room-search'
).
val
()));
}
else
{
}
else
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
}
else
{
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({});
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({});
}
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
}
}
...
@@ -417,8 +420,11 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function(e) {
...
@@ -417,8 +420,11 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function(e) {
CHAT
.
saveRoomInfo
();
CHAT
.
saveRoomInfo
();
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
socket
.
emit
(
'leaveRoom'
,
function
()
{
socket
.
emit
(
'leaveRoom'
,
function
()
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({});
}
else
{
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({
"groupId"
:
"0"
});
}
});
});
}
}
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
...
@@ -684,20 +690,13 @@ CHAT_UI.showConfirmView = function(isInvite) {
...
@@ -684,20 +690,13 @@ CHAT_UI.showConfirmView = function(isInvite) {
//todo android create room api
//todo android create room api
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
createChatRoom
(
"1"
,
userIdList
.
join
(
','
),
newRoomName
);
android
.
createChatRoom
(
"1"
,
userIdList
.
join
(
','
),
newRoomName
);
}
else
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
createChatRoom
.
postMessage
({
"roomType"
:
"1"
,
"userIdList"
:
userIdList
.
join
(
','
),
"roomName"
:
newRoomName
});
// TODO
var
roomDic
=
{
roomType
:
"1"
,
userIdList
:
userIdList
.
join
(
','
),
roomName
:
newRoomName
};
webkit
.
messageHandlers
.
createChatRoom
.
postMessage
({
roomDic
});
}
}
/*socket.emit('createNewRoom', userIdList, encodedRoomName, function(newRoomId) {
/*socket.emit('createNewRoom', userIdList, encodedRoomName, function(newRoomId) {
socket.emit('joinRoom', newRoomId, newRoomName, function() {
socket.emit('joinRoom', newRoomId, newRoomName, function() {
CHAT.saveRoomInfo(newRoomId, newRoomName);
CHAT.saveRoomInfo(newRoomId, newRoomName);
...
@@ -914,6 +913,7 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -914,6 +913,7 @@ CHAT_UI.refreshContactScreen = function() {
let
contactListTitle
=
getLocalizedString
(
"contactListTitle"
);
let
contactListTitle
=
getLocalizedString
(
"contactListTitle"
);
$
(
'#title'
).
text
(
contactListTitle
);
$
(
'#title'
).
text
(
contactListTitle
);
// グループの様式を読み込む
// グループの様式を読み込む
var
groupTemplate
;
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
...
@@ -941,17 +941,13 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -941,17 +941,13 @@ CHAT_UI.refreshContactScreen = function() {
});
});
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
updateGroupInfo
(
'0'
);
android
.
updateGroupInfo
(
'0'
);
android
.
updateMyInfo
();
android
.
updateMyInfo
();
android
.
updateGroupUser
();
android
.
updateGroupUser
();
android
.
updateFavorite
();
android
.
updateFavorite
();
}
}
else
{
if
(
typeof
(
webkit
)
!=
"undefined"
)
{
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
(
"0"
);
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
({
"groupId"
:
"0"
});
webkit
.
messageHandlers
.
updateMyInfo
.
postMessage
({});
webkit
.
messageHandlers
.
updateGroupUser
.
postMessage
({});
webkit
.
messageHandlers
.
updateFavorite
.
postMessage
({});
}
}
}
}
...
@@ -1027,10 +1023,10 @@ CHAT_UI.refreshRoomList = function(roomType) {
...
@@ -1027,10 +1023,10 @@ CHAT_UI.refreshRoomList = function(roomType) {
}
}
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
updateRoomList
();
android
.
updateRoomList
();
}
else
{
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({});
}
}
}
}
var
rooms
=
CHAT_DB
.
getRoomList
(
roomType
,
null
);
var
rooms
=
CHAT_DB
.
getRoomList
(
roomType
,
null
);
...
@@ -1118,15 +1114,21 @@ CHAT_UI.refreshRoomList = function(roomType) {
...
@@ -1118,15 +1114,21 @@ CHAT_UI.refreshRoomList = function(roomType) {
CHAT_UI
.
joinRoom
=
function
(
roomId
,
roomName
)
{
CHAT_UI
.
joinRoom
=
function
(
roomId
,
roomName
)
{
//native側に入場対象のroomId,roomNameを保存。(ルーム詳細画面初期化の時に使用。)
//native側に入場対象のroomId,roomNameを保存。(ルーム詳細画面初期化の時に使用。)
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
joinRoom
(
roomId
,
roomName
);
android
.
joinRoom
(
roomId
,
roomName
);
}
else
{
webkit
.
messageHandlers
.
roomInfosaveMessageHandlerId
.
postMessage
({
"roomId"
:
roomId
,
"roomName"
:
roomName
});
webkit
.
messageHandlers
.
roomInfosaveMessageHandlerId
.
postMessage
({
"roomId"
:
roomId
,
"roomName"
:
roomName
});
}
};
};
CHAT_UI
.
loadMessages
=
function
(
roomId
,
roomName
)
{
CHAT_UI
.
loadMessages
=
function
(
roomId
,
roomName
)
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
CHAT_SOCKET
.
connectSocket
();
CHAT_SOCKET
.
connectSocket
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
updateMessages
(
roomId
);
android
.
updateMessages
(
roomId
);
}
else
{
webkit
.
messageHandlers
.
updateMessages
.
postMessage
({
roomId
});
webkit
.
messageHandlers
.
updateMessages
.
postMessage
({
roomId
});
}
socket
.
emit
(
'exitRoom'
,
roomId
);
socket
.
emit
(
'exitRoom'
,
roomId
);
socket
.
emit
(
'joinRoom'
,
roomId
,
roomName
,
function
()
{
socket
.
emit
(
'joinRoom'
,
roomId
,
roomName
,
function
()
{
});
});
...
@@ -1271,6 +1273,7 @@ $('#tabAllGroup').on('click', function(e) {
...
@@ -1271,6 +1273,7 @@ $('#tabAllGroup').on('click', function(e) {
});
});
$
(
'#tabMyGroup'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#tabMyGroup'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#contactSearch'
).
attr
(
'placeholder'
,
getLocalizedString
(
'userSearch'
));
CHAT_UI
.
refreshContactScreen
();
CHAT_UI
.
refreshContactScreen
();
});
});
...
@@ -1316,8 +1319,11 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) {
...
@@ -1316,8 +1319,11 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) {
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
removeFavoriteUser
(
shopMemberId
);
android
.
removeFavoriteUser
(
shopMemberId
);
}
else
{
webkit
.
messageHandlers
.
removeFavoriteUser
.
postMessage
({
shopMemberId
});
webkit
.
messageHandlers
.
removeFavoriteUser
.
postMessage
({
shopMemberId
});
}
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
...
@@ -1328,20 +1334,23 @@ CHAT_UI.insertFavoriteUser = function(shopMemberId) {
...
@@ -1328,20 +1334,23 @@ CHAT_UI.insertFavoriteUser = function(shopMemberId) {
$
(
'#myNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
var
result
=
android
.
addFavoriteUser
(
shopMemberId
);
var
result
=
android
.
addFavoriteUser
(
shopMemberId
);
if
(
!
result
)
{
if
(
!
result
)
{
$
(
'.shopmember_'
+
group
Id
).
addClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMember
Id
).
addClass
(
'disable'
);
$
(
'.shopmember_'
+
group
Id
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMember
Id
).
removeClass
(
'active'
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
return
;
return
;
}
else
{
}
else
{
$
(
'.shopmember_'
+
group
Id
).
removeClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMember
Id
).
removeClass
(
'disable'
);
$
(
'.shopmember_'
+
group
Id
).
addClass
(
'active'
);
$
(
'.shopmember_'
+
shopMember
Id
).
addClass
(
'active'
);
}
}
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
};
};
CHAT_UI
.
removeFavoriteGroup
=
function
(
groupId
)
{
CHAT_UI
.
removeFavoriteGroup
=
function
(
groupId
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
removeFavoriteGroup
(
groupId
);
android
.
removeFavoriteGroup
(
groupId
);
}
else
{
webkit
.
messageHandlers
.
removeFavoriteGroup
.
postMessage
({
groupId
});
webkit
.
messageHandlers
.
removeFavoriteGroup
.
postMessage
({
groupId
});
}
$
(
'.group_'
+
groupId
).
removeClass
(
'active'
);
$
(
'.group_'
+
groupId
).
removeClass
(
'active'
);
$
(
'.group_'
+
groupId
).
addClass
(
'disable'
);
$
(
'.group_'
+
groupId
).
addClass
(
'disable'
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
...
@@ -1373,15 +1382,15 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
...
@@ -1373,15 +1382,15 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
$
(
'.search_form form'
).
removeClass
();
$
(
'.search_form form'
).
removeClass
();
$
(
'.content'
).
removeClass
(
'none'
);
$
(
'.content'
).
removeClass
(
'none'
);
$
(
'.overlay_src_msg'
).
empty
();
$
(
'.overlay_src_msg'
).
empty
();
$
(
'#contactSearch'
).
attr
(
'placeholder'
,
getLocalizedString
(
'searchUserAndGroup'
));
$
(
'#tabAllGroup'
).
prop
(
'checked'
,
true
);
$
(
'#tabAllGroup'
).
prop
(
'checked'
,
true
);
//オンライン状態であればサーバから情報更新。
//オンライン状態であればサーバから情報更新。
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
({
groupId
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
updateGroupInfo
(
groupId
);
android
.
updateGroupInfo
(
groupId
);
}
else
{
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
({
groupId
});
}
}
}
}
...
@@ -1475,8 +1484,11 @@ CHAT_UI.startChat = function(userShopMemberId,userName) {
...
@@ -1475,8 +1484,11 @@ CHAT_UI.startChat = function(userShopMemberId,userName) {
// 参加ユーザ名でルーム名を生成
// 参加ユーザ名でルーム名を生成
let
newRoomName
=
CHAT
.
globalLoginParameter
.
loginId
+
','
+
userName
;
let
newRoomName
=
CHAT
.
globalLoginParameter
.
loginId
+
','
+
userName
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
createChatRoom
(
chatRoomType
.
DM
,
userIdList
.
join
(
','
),
newRoomName
);
android
.
createChatRoom
(
chatRoomType
.
DM
,
userIdList
.
join
(
','
),
newRoomName
);
}
else
{
webkit
.
messageHandlers
.
createChatRoom
.
postMessage
({
"roomType"
:
chatRoomType
.
DM
,
"userIdList"
:
userIdList
.
join
(
','
),
"roomName"
:
newRoomName
});
webkit
.
messageHandlers
.
createChatRoom
.
postMessage
({
"roomType"
:
chatRoomType
.
DM
,
"userIdList"
:
userIdList
.
join
(
','
),
"roomName"
:
newRoomName
});
}
CHAT_UI
.
hideNamecard
(
nameCardAreaId
.
USER
);
CHAT_UI
.
hideNamecard
(
nameCardAreaId
.
USER
);
};
};
...
...
public_new/js/chat.js
View file @
5b26391a
...
@@ -343,16 +343,19 @@ $(function() {
...
@@ -343,16 +343,19 @@ $(function() {
// チャットメンバー検索
// チャットメンバー検索
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(
e
){
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(
e
){
var
rooms
;
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
var
keyword
=
$
(
'#chat .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
.
length
!=
0
&&
keyword
!=
''
)
{
$
(
'#chat .search_form input[type="search"]'
).
blur
();
$
(
'#chat .search_form input[type="search"]'
).
blur
();
return
;
return
;
}
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
$
(
'.overlay_src_msg'
).
empty
();
var
keyword
=
$
(
'#chat .search_form input[type="search"]'
).
val
();
return
;
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
return
;
}
}
var
rooms
=
CHAT_DB
.
getRoomList
(
chatRoomType
.
ALL
,
keyword
);
$
(
'.overlay_src_msg'
).
empty
();
rooms
=
CHAT_DB
.
getRoomList
(
chatRoomType
.
ALL
,
keyword
);
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
var
template
;
var
template
;
...
@@ -360,7 +363,6 @@ $(function() {
...
@@ -360,7 +363,6 @@ $(function() {
,
function
(
text
)
{
,
function
(
text
)
{
template
=
text
;
template
=
text
;
});
});
rooms
.
forEach
(
function
(
room
)
{
rooms
.
forEach
(
function
(
room
)
{
room
.
profileImagePath
=
ASSET_PATH
+
'images/user-profile.png'
room
.
profileImagePath
=
ASSET_PATH
+
'images/user-profile.png'
if
(
room
.
message
)
{
if
(
room
.
message
)
{
...
@@ -405,26 +407,34 @@ $(function() {
...
@@ -405,26 +407,34 @@ $(function() {
if
(
CHAT_UI
.
isLandscapeMode
())
{
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".chat_list"
).
removeClass
(
"col-12"
).
addClass
(
"col-6"
);
$
(
".chat_list"
).
removeClass
(
"col-12"
).
addClass
(
"col-6"
);
}
}
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
$
(
'#chat .search_form input[type="search"]'
).
blur
();
return
;
}
});
});
// チャットルーム
// チャットルーム
// メッセージ検索イベント
// メッセージ検索イベント
$
(
'.chat_room_src_form input[type="search"]'
).
keyup
(
function
(
e
){
$
(
'.chat_room_src_form input[type="search"]'
).
keyup
(
function
(
e
){
var
keyword
=
$
(
'.chat_room_src_form input[type="search"]'
).
val
();
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'.chat_room_src_form input[type="search"]'
).
blur
();
$
(
'.chat_room_src_form input[type="search"]'
).
blur
();
return
;
return
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
;
}
}
let
workVal
=
""
;
let
workVal
=
""
;
var
keyword
=
$
(
'.chat_room_src_form input[type="search"]'
).
val
();
$
(
'.overlay_src_msg'
).
empty
();
$
(
'.overlay_src_msg'
).
empty
();
var
checkedUserList
=
[];
var
checkedUserList
=
[];
$
(
'.img_wrap.filter'
).
each
(
function
(
user
)
{
$
(
'.img_wrap.filter'
).
each
(
function
(
user
)
{
var
selectedUser
=
$
(
'.img_wrap.filter'
)[
user
];
var
selectedUser
=
$
(
'.img_wrap.filter'
)[
user
];
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
'user-id'
));
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
'user-id'
));
})
})
if
(
keyword
.
length
<
2
)
{
return
;
}
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
','
));
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
','
));
var
userMessageTemplate
;
var
userMessageTemplate
;
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
...
@@ -473,6 +483,10 @@ $(function() {
...
@@ -473,6 +483,10 @@ $(function() {
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
jQueryMessages
.
append
(
noResultMsg
);
jQueryMessages
.
append
(
noResultMsg
);
}
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
});
});
$
(
'.filter_img'
).
on
(
'click'
,
function
()
{
$
(
'.filter_img'
).
on
(
'click'
,
function
()
{
...
@@ -484,7 +498,7 @@ $(function() {
...
@@ -484,7 +498,7 @@ $(function() {
var
selectedUser
=
$
(
'.img_wrap.filter'
)[
user
];
var
selectedUser
=
$
(
'.img_wrap.filter'
)[
user
];
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
'user-id'
));
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
'user-id'
));
})
})
if
(
keyword
.
length
<
2
)
{
return
;
}
if
(
keyword
.
length
==
1
)
{
return
;
}
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
','
));
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
','
));
var
userMessageTemplate
;
var
userMessageTemplate
;
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
...
...
public_new/js/chatMakeRoom.js
View file @
5b26391a
...
@@ -2,21 +2,22 @@ $(function() {
...
@@ -2,21 +2,22 @@ $(function() {
// メンバー検索
// メンバー検索
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
false
;
return
false
;
}
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
false
;
}
var
isAllGroup
=
$
(
'#tabAllGroupOnMakeRoom'
).
is
(
':checked'
);
var
isAllGroup
=
$
(
'#tabAllGroupOnMakeRoom'
).
is
(
':checked'
);
$
(
'.overlay_src_msg'
).
empty
();
$
(
'.overlay_src_msg'
).
empty
();
//全グループ検索画面
//全グループ検索画面
if
(
isAllGroup
)
{
if
(
isAllGroup
)
{
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
//グループデータ検索
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
var
groupTemplate
;
...
@@ -63,10 +64,6 @@ $(function() {
...
@@ -63,10 +64,6 @@ $(function() {
}
}
//連絡先画面
//連絡先画面
}
else
{
}
else
{
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
var
userTemplate
;
$
.
get
({
url
:
"./template/template_make_room_user_list.html"
,
async
:
false
}
$
.
get
({
url
:
"./template/template_make_room_user_list.html"
,
async
:
false
}
...
@@ -92,6 +89,11 @@ $(function() {
...
@@ -92,6 +89,11 @@ $(function() {
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
;
}
}
});
});
});
});
public_new/js/contact.js
View file @
5b26391a
$
(
function
()
{
$
(
function
()
{
// メンバー検索
// メンバー検索
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
){
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
var
groupList
;
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
return
;
}
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
$
(
'.overlay_src_msg'
).
empty
();
$
(
'.overlay_src_msg'
).
empty
();
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
return
;
return
;
}
}
$
(
'.overlay_src_msg'
).
empty
();
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
//全グループ検索画面
//全グループ検索画面
if
(
isAllGroup
)
{
if
(
isAllGroup
)
{
//グループデータ検索
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
,
function
(
text
)
{
...
@@ -29,7 +30,6 @@ $(function () {
...
@@ -29,7 +30,6 @@ $(function () {
id
:
group
.
groupId
,
id
:
group
.
groupId
,
isFavorite
:
group
.
isFavorite
isFavorite
:
group
.
isFavorite
});
});
let
obj
=
jQuery
.
parseHTML
(
html
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
})
})
...
@@ -48,19 +48,14 @@ $(function () {
...
@@ -48,19 +48,14 @@ $(function () {
userList
:
userList
userList
:
userList
});
});
let
obj
=
jQuery
.
parseHTML
(
html
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
if
(
userList
.
length
==
0
&&
groupList
.
length
==
0
)
{
if
(
userList
.
length
==
0
&&
groupList
.
length
==
0
)
{
const
noResultMsg
=
$
(
'<div/>'
,{
width
:
'auto'
,
style
:
'text-align: center'
});
const
noResultMsg
=
$
(
'<div/>'
,{
width
:
'auto'
,
style
:
'text-align: center'
});
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
//連絡先画面
//連絡先画面
}
else
{
}
else
{
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
...
@@ -81,5 +76,9 @@ $(function () {
...
@@ -81,5 +76,9 @@ $(function () {
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
}
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
});
});
});
});
public_new/js/language_en.js
View file @
5b26391a
...
@@ -77,5 +77,6 @@ $.lang.en = {
...
@@ -77,5 +77,6 @@ $.lang.en = {
"archiveRoomName"
:
"ChatRoom Name"
,
"archiveRoomName"
:
"ChatRoom Name"
,
"archiveSaveUser"
:
"Save User"
,
"archiveSaveUser"
:
"Save User"
,
"archiveAttendUser"
:
"Attend User"
,
"archiveAttendUser"
:
"Attend User"
,
"noResult"
:
"there is no search result."
"noResult"
:
"there is no search result."
,
"searchUserAndGroup"
:
"search user and group."
}
}
public_new/js/language_ja.js
View file @
5b26391a
...
@@ -77,5 +77,6 @@ $.lang.ja = {
...
@@ -77,5 +77,6 @@ $.lang.ja = {
"archiveRoomName"
:
"チャットルーム名"
,
"archiveRoomName"
:
"チャットルーム名"
,
"archiveSaveUser"
:
"保存ユーザー"
,
"archiveSaveUser"
:
"保存ユーザー"
,
"archiveAttendUser"
:
"参加ユーザー"
,
"archiveAttendUser"
:
"参加ユーザー"
,
"noResult"
:
"検索結果がありませんでした。"
"noResult"
:
"検索結果がありませんでした。"
,
"searchUserAndGroup"
:
"ユーザーとグループ検索"
}
}
public_new/js/language_ko.js
View file @
5b26391a
...
@@ -77,5 +77,6 @@ $.lang.ko = {
...
@@ -77,5 +77,6 @@ $.lang.ko = {
"archiveRoomName"
:
"대화방 이름"
,
"archiveRoomName"
:
"대화방 이름"
,
"archiveSaveUser"
:
"저장 사용자"
,
"archiveSaveUser"
:
"저장 사용자"
,
"archiveAttendUser"
:
"참여자"
,
"archiveAttendUser"
:
"참여자"
,
"noResult"
:
"검색결과가 존재하지않습니다"
"noResult"
:
"검색결과가 존재하지않습니다"
,
"searchUserAndGroup"
:
"유저,그룹 검색"
}
}
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