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
50c56bc6
Commit
50c56bc6
authored
Feb 22, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DM,GROUP検索
parent
eefa57f7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
27 deletions
+58
-27
public/css/chat.css
+5
-0
public/index.html
+6
-8
public/js/chat-db.js
+2
-2
public/js/chat-ui.js
+18
-6
public/js/chat-websocket.js
+18
-8
public/js/language_en.js
+3
-1
public/js/language_ja.js
+3
-1
public/js/language_ko.js
+3
-1
No files found.
public/css/chat.css
View file @
50c56bc6
...
@@ -701,4 +701,8 @@ a.article:hover {
...
@@ -701,4 +701,8 @@ a.article:hover {
display
:
none
;
display
:
none
;
overflow
:
hidden
;
overflow
:
hidden
;
background-color
:
#f1f1f1
;
background-color
:
#f1f1f1
;
}
.chat-list-type-btn
{
width
:
30%
;
}
}
\ No newline at end of file
public/index.html
View file @
50c56bc6
...
@@ -22,15 +22,7 @@
...
@@ -22,15 +22,7 @@
let
IS_MOBILE
=
true
;
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
let
IS_ONLINE
=
false
;
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
CMS_SERVER_URL
=
cmsServerUrl
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
};
android
.
getGlobalParameter
();
</script>
</script>
</head>
</head>
<body>
<body>
...
@@ -149,12 +141,17 @@
...
@@ -149,12 +141,17 @@
</div>
</div>
<div
class=
"tab-content"
id=
"pills-tabContent"
>
<div
class=
"tab-content"
id=
"pills-tabContent"
>
<div
class=
"tab-pane fade show active"
id=
"pills-chatlist"
role=
"tabpanel"
aria-labelledby=
"pills-chatlist-tab"
>
<div
class=
"tab-pane fade show active"
id=
"pills-chatlist"
role=
"tabpanel"
aria-labelledby=
"pills-chatlist-tab"
>
<div
class=
"search-group"
>
<div
class=
"search-group"
>
<div
class=
"input-group search-bar-fixed"
>
<div
class=
"input-group search-bar-fixed"
>
<input
style=
"font-family:Arial, FontAwesome !important;"
id=
"room-search"
type=
"text"
class=
"write_msg form-control"
name=
"message"
placeholder=
""
autocomplete=
"off"
>
<input
style=
"font-family:Arial, FontAwesome !important;"
id=
"room-search"
type=
"text"
class=
"write_msg form-control"
name=
"message"
placeholder=
""
autocomplete=
"off"
>
</div>
</div>
</div>
</div>
<div
class=
"text-center"
>
<button
type=
"button"
class=
"btn btn-primary chat-list-type-btn"
id=
"dmBtn"
>
Ok
</button>
<button
type=
"button"
class=
"btn btn-primary chat-list-type-btn"
id=
"groupBtn"
>
Ok
</button>
</div>
<div
class=
"inbox_people"
>
<div
class=
"inbox_people"
>
<div
id=
"room_list"
class=
"inbox_chat row"
>
<div
id=
"room_list"
class=
"inbox_chat row"
>
</div>
</div>
...
@@ -163,6 +160,7 @@
...
@@ -163,6 +160,7 @@
</a>
</a>
</div>
</div>
</div>
</div>
<div
class=
"tab-pane fade"
id=
"pills-profile"
role=
"tabpanel"
aria-labelledby=
"pills-profile-tab"
>
<div
class=
"tab-pane fade"
id=
"pills-profile"
role=
"tabpanel"
aria-labelledby=
"pills-profile-tab"
>
...
...
</div>
</div>
...
...
public/js/chat-db.js
View file @
50c56bc6
...
@@ -3,12 +3,12 @@ var CHAT_DB = {};
...
@@ -3,12 +3,12 @@ var CHAT_DB = {};
//ロカールDBからルーム一覧情報を取得
//ロカールDBからルーム一覧情報を取得
CHAT_DB
.
getRoomList
=
function
(
input
)
{
CHAT_DB
.
getRoomList
=
function
(
roomType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS処理追加必要
//TODO IOS処理追加必要
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
//String形式をJsonに変更してReturn
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
());
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
}
}
};
};
...
...
public/js/chat-ui.js
View file @
50c56bc6
...
@@ -133,7 +133,7 @@ $('#room-search').on('input', function(event) {
...
@@ -133,7 +133,7 @@ $('#room-search').on('input', function(event) {
}
else
{
}
else
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
}
}
}
}
...
@@ -401,7 +401,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -401,7 +401,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
android
.
updateRoomList
();
android
.
updateRoomList
();
});
});
}
}
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
});
});
console
.
log
(
"show #pills-chat"
)
console
.
log
(
"show #pills-chat"
)
...
@@ -823,6 +823,9 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
...
@@ -823,6 +823,9 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
$
(
"#room-search"
).
attr
(
"placeholder"
,
$
(
"#room-search"
).
attr
(
"placeholder"
)
+
getLocalizedString
(
"room_search_placeholder"
));
$
(
"#room-search"
).
attr
(
"placeholder"
,
$
(
"#room-search"
).
attr
(
"placeholder"
)
+
getLocalizedString
(
"room_search_placeholder"
));
$
(
"#userListKeyword"
).
attr
(
"placeholder"
,
getLocalizedString
(
"userSearch"
))
$
(
"#userListKeyword"
).
attr
(
"placeholder"
,
getLocalizedString
(
"userSearch"
))
$
(
"#newRoomName"
).
attr
(
"placeholder"
,
getLocalizedString
(
"newRoomName"
))
$
(
"#newRoomName"
).
attr
(
"placeholder"
,
getLocalizedString
(
"newRoomName"
))
$
(
"#dmBtn"
).
text
(
getLocalizedString
(
"directMessageChatRoom"
))
$
(
"#groupBtn"
).
text
(
getLocalizedString
(
"groupChatRoom"
))
}
}
// 画像の読み込みが全て終わったタイミングでコールバック実行
// 画像の読み込みが全て終わったタイミングでコールバック実行
...
@@ -900,8 +903,8 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -900,8 +903,8 @@ CHAT_UI.refreshContactScreen = function() {
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
}
}
CHAT_UI
.
refreshRoomList
=
function
()
{
CHAT_UI
.
refreshRoomList
=
function
(
roomType
)
{
var
rooms
=
CHAT_DB
.
getRoomList
();
var
rooms
=
CHAT_DB
.
getRoomList
(
roomType
);
CHAT
.
globalIsInvite
=
false
;
CHAT
.
globalIsInvite
=
false
;
activeRoomId
=
null
;
activeRoomId
=
null
;
// #36146に対応
// #36146に対応
...
@@ -1061,4 +1064,13 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
...
@@ -1061,4 +1064,13 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
// チャットに遷移する
// チャットに遷移する
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
};
};
\ No newline at end of file
$
(
'#dmBtn'
).
on
(
'click'
,
function
(
e
){
CHAT_UI
.
refreshRoomList
(
"1"
);
});
$
(
'#groupBtn'
).
on
(
'click'
,
function
(
e
){
CHAT_UI
.
refreshRoomList
(
"0"
);
});
\ No newline at end of file
public/js/chat-websocket.js
View file @
50c56bc6
var
socket
;
var
socket
;
connectSocket
(
IS_ONLINE
);
function
connectSocket
(
isOnline
)
{
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
console
.
log
(
isOnline
)
CHAT_SERVER_URL
=
chatServerUrl
;
CMS_SERVER_URL
=
cmsServerUrl
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
connectSocket
();
};
android
.
getGlobalParameter
();
function
connectSocket
()
{
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
if
(
isOnline
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
socket
=
io
(
CHAT_SERVER_URL
);
socket
=
io
(
CHAT_SERVER_URL
);
console
.
log
(
'insOnline'
);
console
.
log
(
'insOnline'
);
setSocketAction
();
setSocketAction
();
android
.
updateRoomList
();
android
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#createChatRoom'
).
show
();
$
(
'#createChatRoom'
).
show
();
}
else
{
}
else
{
...
@@ -18,12 +27,13 @@ function connectSocket(isOnline) {
...
@@ -18,12 +27,13 @@ function connectSocket(isOnline) {
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOSの場合
//TODO IOSの場合
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
console
.
log
(
'insAnd'
);
//$('.overlay').removeClass('active undismissable');
//$('.overlay').removeClass('active undismissable');
// loadingIndicatorを表示
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
android
.
getLoginParameter
();
android
.
getLoginParameter
();
console
.
log
(
'init'
)
console
.
log
(
'init'
)
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#createChatRoom'
).
show
();
$
(
'#createChatRoom'
).
show
();
}
}
...
@@ -388,9 +398,9 @@ function setSocketAction () {
...
@@ -388,9 +398,9 @@ function setSocketAction () {
if
(
isInvite
)
{
if
(
isInvite
)
{
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
}
else
{
}
else
{
if
(
isOnline
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
}
}
}
}
...
...
public/js/language_en.js
View file @
50c56bc6
...
@@ -54,5 +54,7 @@ $.lang.en = {
...
@@ -54,5 +54,7 @@ $.lang.en = {
"photo"
:
"Photo"
,
"photo"
:
"Photo"
,
"video"
:
"Video"
,
"video"
:
"Video"
,
"contactListTitle"
:
"Contact"
,
"contactListTitle"
:
"Contact"
,
"contactSearch"
:
"Contact search"
"contactSearch"
:
"Contact search"
,
"directMessageChatRoom"
:
"DM"
,
"groupChatRoom"
:
"Group"
}
}
public/js/language_ja.js
View file @
50c56bc6
...
@@ -54,5 +54,7 @@ $.lang.ja = {
...
@@ -54,5 +54,7 @@ $.lang.ja = {
"photo"
:
"写真"
,
"photo"
:
"写真"
,
"video"
:
"動画"
,
"video"
:
"動画"
,
"contactListTitle"
:
"コンタクト"
,
"contactListTitle"
:
"コンタクト"
,
"contactSearch"
:
"コンタクト検索"
"contactSearch"
:
"コンタクト検索"
,
"directMessageChatRoom"
:
"DM"
,
"groupChatRoom"
:
"グループ"
}
}
public/js/language_ko.js
View file @
50c56bc6
...
@@ -54,5 +54,7 @@ $.lang.ko = {
...
@@ -54,5 +54,7 @@ $.lang.ko = {
"photo"
:
"사진"
,
"photo"
:
"사진"
,
"video"
:
"동영상"
,
"video"
:
"동영상"
,
"contactListTitle"
:
"연락처"
,
"contactListTitle"
:
"연락처"
,
"contactSearch"
:
"연락처 검색"
"contactSearch"
:
"연락처 검색"
,
"directMessageChatRoom"
:
"DM"
,
"groupChatRoom"
:
"그룹"
}
}
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