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
0b9baea9
Commit
0b9baea9
authored
Feb 24, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コードレビュー対応
parent
67e11f79
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
83 additions
and
32 deletions
+83
-32
public/css/chat.css
+21
-2
public/index.html
+28
-6
public/js/chat-ui.js
+0
-0
public/js/chat-websocket.js
+12
-14
public/js/chat.js
+1
-1
public/js/constant.js
+5
-0
public/js/language_en.js
+2
-0
public/js/language_ja.js
+2
-0
public/js/language_ko.js
+2
-0
public/js/libs/collapsible.js
+10
-9
No files found.
public/css/chat.css
View file @
0b9baea9
...
@@ -705,4 +705,24 @@ a.article:hover {
...
@@ -705,4 +705,24 @@ a.article:hover {
.chat-list-type-btn
{
.chat-list-type-btn
{
width
:
30%
;
width
:
30%
;
}
}
\ No newline at end of file
#my_info
>
div
>
div
{
padding-left
:
5%
;
}
#favorite_list
>
div
>
div
{
padding-left
:
5%
;
}
#my_group_list
>
div
>
div
{
padding-left
:
5%
;
}
.contact-seperator
{
width
:
100%
;
background-color
:
#095395
!important
;
color
:
white
;
margin-bottom
:
0px
;
}
public/index.html
View file @
0b9baea9
...
@@ -234,15 +234,15 @@
...
@@ -234,15 +234,15 @@
</div>
</div>
<div
id=
"my_info"
class=
"inbox_user row"
>
<div
id=
"my_info"
class=
"inbox_user row"
>
</div>
</div>
<div
class=
"collapsible-content"
>
<div
id=
"favorite_list"
class=
"inbox_user row"
>
<label
class=
"contact-seperator"
id=
"favorite-seperator"
>
Favorite
</label
>
</div
>
<div
id=
"favorite_list"
class=
"inbox_user row"
>
</div>
</div>
<div
class=
"collapsible-content"
>
<label
class=
"contact-seperator"
id=
"mygroup-seperator"
>
MY GROUP
</label>
<div
id=
"my_group_list"
class=
"inbox_user row"
>
<div
id=
"my_group_list"
class=
"inbox_user row"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -458,6 +458,28 @@
...
@@ -458,6 +458,28 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
</script>
</script>
<script
id=
"favorite-user-template"
type=
"text/template"
>
<
div
class
=
"user_list col-12"
data
-
name
=
"{{name}}"
>
<
div
class
=
"user_people"
>
<
div
class
=
"user_img"
>
<
img
src
=
"{{profileImage}}"
alt
=
""
>
<
/div
>
<
div
class
=
"user_ib"
>
<
h5
>
{{
name
}}
<
/h5
>
<
p
>
{{
info
}}
<
/p
>
<
/div
>
<
div
class
=
"squareBox userCheckBox"
data
-
name
=
"{{name}}"
data
-
id
=
"{{id}}"
>
<
div
class
=
"squareBoxContent"
>
<
div
>
<
span
>
<
i
class
=
"fas fa-check"
><
/i
>
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
</script>
<script
src=
"./socket.io/dist/socket.io.js"
></script>
<script
src=
"./socket.io/dist/socket.io.js"
></script>
<script
src=
"./js/libs/socket.io.js"
></script>
<script
src=
"./js/libs/socket.io.js"
></script>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
...
...
public/js/chat-ui.js
View file @
0b9baea9
This diff is collapsed.
Click to expand it.
public/js/chat-websocket.js
View file @
0b9baea9
var
socket
;
var
socket
;
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
CHAT_SERVER_URL
=
chatServerUrl
;
CMS_SERVER_URL
=
cmsServerUrl
;
CMS_SERVER_URL
=
cmsServerUrl
;
PLATFORM
=
platform
;
PLATFORM
=
platform
;
IS_MOBILE
=
isMobile
;
IS_MOBILE
=
isMobile
;
IS_ONLINE
=
isOnline
;
IS_ONLINE
=
isOnline
;
connectSocket
();
connectSocket
();
};
};
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
function
connectSocket
()
{
function
connectSocket
()
{
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
console
.
log
(
'isOnline'
);
socket
=
io
(
CHAT_SERVER_URL
);
socket
=
io
(
CHAT_SERVER_URL
);
console
.
log
(
'insOnline'
);
setSocketAction
();
setSocketAction
();
android
.
updateRoomList
();
android
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#createChatRoom'
).
show
();
$
(
'#createChatRoom'
).
show
();
}
else
{
}
else
{
console
.
log
(
'i
n
sOffline'
);
console
.
log
(
'isOffline'
);
//オフラインの場合、DBからルーム一覧を表示。
//オフラインの場合、DBからルーム一覧を表示。
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'
)
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
$
(
'#createChatRoom'
).
show
();
$
(
'#createChatRoom'
).
show
();
}
}
...
@@ -400,7 +398,7 @@ function setSocketAction () {
...
@@ -400,7 +398,7 @@ function setSocketAction () {
}
else
{
}
else
{
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
android
.
updateRoomList
();
android
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
"1"
);
CHAT_UI
.
refreshRoomList
(
chatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
}
}
}
}
...
...
public/js/chat.js
View file @
0b9baea9
...
@@ -272,7 +272,7 @@ CHAT.leaveRoom = function() {
...
@@ -272,7 +272,7 @@ CHAT.leaveRoom = function() {
CHAT
.
requestMyinfo
=
function
()
{
CHAT
.
requestMyinfo
=
function
()
{
jQuery
.
ajax
({
jQuery
.
ajax
({
async
:
true
,
async
:
true
,
url
:
CMS_SERVER_URL
+
"/chatapi/user?sid="
+
CHAT
.
globalLoginParameter
.
sid
+
"&cmd="
+
userAPICmd
.
MYINFO
,
url
:
CMS_SERVER_URL
+
"/chatapi/user?sid="
+
CHAT
.
globalLoginParameter
.
sid
+
"&cmd="
+
userAPICmd
.
MYINFO
,
type
:
"get"
,
type
:
"get"
,
processData
:
false
,
processData
:
false
,
contentType
:
false
contentType
:
false
...
...
public/js/constant.js
View file @
0b9baea9
...
@@ -20,3 +20,8 @@ const messageType = {
...
@@ -20,3 +20,8 @@ const messageType = {
const
userAPICmd
=
{
const
userAPICmd
=
{
MYINFO
:
9
MYINFO
:
9
}
}
const
chatRoomType
=
{
DM
:
"1"
,
GROUP
:
"0"
}
public/js/language_en.js
View file @
0b9baea9
...
@@ -56,5 +56,7 @@ $.lang.en = {
...
@@ -56,5 +56,7 @@ $.lang.en = {
"contactListTitle"
:
"Contact"
,
"contactListTitle"
:
"Contact"
,
"contactSearch"
:
"Contact search"
,
"contactSearch"
:
"Contact search"
,
"directMessageChatRoom"
:
"DM"
,
"directMessageChatRoom"
:
"DM"
,
"favorite"
:
"Favorite List"
,
"mygroup"
:
"My Group"
,
"groupChatRoom"
:
"Group"
"groupChatRoom"
:
"Group"
}
}
public/js/language_ja.js
View file @
0b9baea9
...
@@ -56,5 +56,7 @@ $.lang.ja = {
...
@@ -56,5 +56,7 @@ $.lang.ja = {
"contactListTitle"
:
"コンタクト"
,
"contactListTitle"
:
"コンタクト"
,
"contactSearch"
:
"コンタクト検索"
,
"contactSearch"
:
"コンタクト検索"
,
"directMessageChatRoom"
:
"DM"
,
"directMessageChatRoom"
:
"DM"
,
"favorite"
:
"お気に入りリスト"
,
"mygroup"
:
"マイグループ"
,
"groupChatRoom"
:
"グループ"
"groupChatRoom"
:
"グループ"
}
}
public/js/language_ko.js
View file @
0b9baea9
...
@@ -56,5 +56,7 @@ $.lang.ko = {
...
@@ -56,5 +56,7 @@ $.lang.ko = {
"contactListTitle"
:
"연락처"
,
"contactListTitle"
:
"연락처"
,
"contactSearch"
:
"연락처 검색"
,
"contactSearch"
:
"연락처 검색"
,
"directMessageChatRoom"
:
"DM"
,
"directMessageChatRoom"
:
"DM"
,
"favorite"
:
"즐겨찾기리스트"
,
"mygroup"
:
"마이그룹"
,
"groupChatRoom"
:
"그룹"
"groupChatRoom"
:
"그룹"
}
}
public/js/libs/collapsible.js
View file @
0b9baea9
...
@@ -2,13 +2,13 @@ var coll = document.getElementsByClassName("collapsible");
...
@@ -2,13 +2,13 @@ var coll = document.getElementsByClassName("collapsible");
var
i
;
var
i
;
for
(
i
=
0
;
i
<
coll
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
coll
.
length
;
i
++
)
{
coll
[
i
].
addEventListener
(
"click"
,
function
()
{
coll
[
i
].
addEventListener
(
"click"
,
function
()
{
this
.
classList
.
toggle
(
"collapsible-active"
);
this
.
classList
.
toggle
(
"collapsible-active"
);
var
content
=
this
.
nextElementSibling
;
var
content
=
this
.
nextElementSibling
;
if
(
content
.
style
.
display
===
"block"
)
{
if
(
content
.
style
.
display
===
"block"
)
{
content
.
style
.
display
=
"none"
;
content
.
style
.
display
=
"none"
;
}
else
{
}
else
{
content
.
style
.
display
=
"block"
;
content
.
style
.
display
=
"block"
;
}
}
});
});
}
}
\ No newline at end of file
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