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
cdf37962
Commit
cdf37962
authored
Mar 31, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コードレビュー対応。
parent
a280f1c7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
36 deletions
+43
-36
public_new/chat.html
+1
-1
public_new/chat_room.html
+3
-0
public_new/contact.html
+2
-6
public_new/js/chat-ui.js
+15
-19
public_new/js/chat-websocket.js
+1
-1
public_new/js/chat.js
+14
-0
public_new/js/contact.js
+4
-6
public_new/loading.html
+2
-2
public_new/template/template_room_list.html
+1
-1
No files found.
public_new/chat.html
View file @
cdf37962
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
<!-- ローディング -->
<!-- ローディング -->
<!--#include virtual="loading.html" -->
<!--#include virtual="loading.html" -->
<div
id=
"loadingArea"
></div>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
<script
src=
"./js/libs/moment.js"
></script>
<script
src=
"./js/libs/moment.js"
></script>
<script
src=
"./js/libs/locale/ko.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/libs/locale/ko.js"
charset=
"UTF-8"
></script>
...
...
public_new/chat_room.html
View file @
cdf37962
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<link
rel=
"stylesheet"
href=
"./css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"./css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"./css/common.css"
>
<link
rel=
"stylesheet"
href=
"./css/common.css"
>
<link
rel=
"stylesheet"
href=
"./css/chat.css"
>
<link
rel=
"stylesheet"
href=
"./css/chat.css"
>
<link
rel=
"stylesheet"
href=
"./css/loading.css"
>
<link
rel=
"stylesheet"
href=
"./css/chat_room_footer.css"
>
<link
rel=
"stylesheet"
href=
"./css/chat_room_footer.css"
>
<link
rel=
"stylesheet"
href=
"./css/font-awesome.css"
>
<link
rel=
"stylesheet"
href=
"./css/font-awesome.css"
>
</head>
</head>
...
@@ -203,9 +204,11 @@
...
@@ -203,9 +204,11 @@
let
IS_MOBILE
=
true
;
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
let
IS_ONLINE
=
false
;
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
android
.
getLoginParameter
();
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
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
;
...
...
public_new/contact.html
View file @
cdf37962
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<a
href=
"#"
style=
"width: 100%;"
>
<a
href=
"#"
style=
"width: 100%;"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"chat_item_l"
>
<div
class=
"thubnail"
>
<div
class=
"thu
m
bnail"
>
<div
class=
"img_wrap"
><img
id=
"myImg"
src=
"img/noImage.png"
onError=
"this.src='./img/noImage.png'"
/></div>
<div
class=
"img_wrap"
><img
id=
"myImg"
src=
"img/noImage.png"
onError=
"this.src='./img/noImage.png'"
/></div>
</div>
</div>
</div>
</div>
...
@@ -195,11 +195,6 @@
...
@@ -195,11 +195,6 @@
<div
id=
"loadingArea"
></div>
<div
id=
"loadingArea"
></div>
<div
id=
"myProfileModal"
></div>
<div
id=
"myProfileModal"
></div>
<div
id=
"userProfileModal"
></div>
<div
id=
"userProfileModal"
></div>
<div
id=
"loader-bg"
>
<div
id=
"loader"
>
<i
class=
"fa fa-circle-o-notch fa-spin fa-3x fa-fw"
></i>
</div>
</div>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
<script
src=
"./js/libs/jquery-3.3.1.min.js"
></script>
<script
src=
"./js/libs/moment.js"
></script>
<script
src=
"./js/libs/moment.js"
></script>
<script
src=
"./js/libs/locale/ko.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/libs/locale/ko.js"
charset=
"UTF-8"
></script>
...
@@ -230,6 +225,7 @@
...
@@ -230,6 +225,7 @@
let
PLATFORM
=
''
;
let
PLATFORM
=
''
;
let
IS_MOBILE
=
true
;
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
let
IS_ONLINE
=
false
;
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
android
.
getLoginParameter
();
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
getGlobalParameter
();
...
...
public_new/js/chat-ui.js
View file @
cdf37962
...
@@ -566,12 +566,12 @@ CHAT_UI.scrollToLastMarkedUnseen = function(value) {
...
@@ -566,12 +566,12 @@ CHAT_UI.scrollToLastMarkedUnseen = function(value) {
//loadingIndicatorを表示
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
=
function
()
{
CHAT_UI
.
showLoadingIndicator
=
function
()
{
$
(
"#loadingIndicator"
).
addClass
(
'active undismissable
'
);
$
(
'.loading-indicator'
).
css
(
'display'
,
'block
'
);
}
}
//loadingIndicatorを表示しない
//loadingIndicatorを表示しない
CHAT_UI
.
dismissLoadingIndicator
=
function
()
{
CHAT_UI
.
dismissLoadingIndicator
=
function
()
{
$
(
"#loadingIndicator"
).
removeClass
(
'active undismissabl
e'
);
$
(
'.loading-indicator'
).
css
(
'display'
,
'non
e'
);
}
}
//画面の方向をcheck
//画面の方向をcheck
...
@@ -884,6 +884,7 @@ $('#chatButton').on('click', function(event) {
...
@@ -884,6 +884,7 @@ $('#chatButton').on('click', function(event) {
});
});
CHAT_UI
.
refreshContactScreen
=
function
()
{
CHAT_UI
.
refreshContactScreen
=
function
()
{
CHAT_UI
.
showLoadingIndicator
();
$
(
".modal-backdrop"
).
remove
();
$
(
".modal-backdrop"
).
remove
();
$
(
'#myProfileModal'
).
html
(
''
);
$
(
'#myProfileModal'
).
html
(
''
);
$
(
'#userProfileModal'
).
html
(
''
);
$
(
'#userProfileModal'
).
html
(
''
);
...
@@ -970,22 +971,6 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -970,22 +971,6 @@ CHAT_UI.refreshContactScreen = function() {
let
obj
=
jQuery
.
parseHTML
(
html
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'#favoriteList'
).
append
(
obj
);
$
(
'#favoriteList'
).
append
(
obj
);
/*favoriteUserList.forEach(function(favoriteUser) {
favoriteUser.profileImagePath = CHAT.getProfileImgUrl(favoriteUser.profileUrl)
let html = Mustache.render(userTemplate, {
shopMemberId: favoriteUser.shopMemberId,
profileImage: favoriteUser.profileImagePath,
name: favoriteUser.shopMemberName,
isFavorite: true
});
let obj = $(jQuery.parseHTML(html)).on('click', function() {
});
$('#favoriteList').append(obj);
})*/
var
myGroupList
=
CHAT_DB
.
getMyGroupUsers
();
var
myGroupList
=
CHAT_DB
.
getMyGroupUsers
();
myGroupList
.
forEach
(
function
(
myGroup
)
{
myGroupList
.
forEach
(
function
(
myGroup
)
{
...
@@ -1001,6 +986,7 @@ CHAT_UI.refreshContactScreen = function() {
...
@@ -1001,6 +986,7 @@ CHAT_UI.refreshContactScreen = function() {
$
(
'#myGroupList'
).
append
(
obj
);
$
(
'#myGroupList'
).
append
(
obj
);
})
})
CHAT_UI
.
dismissLoadingIndicator
();
}
}
CHAT_UI
.
refreshRoomList
=
function
(
roomType
)
{
CHAT_UI
.
refreshRoomList
=
function
(
roomType
)
{
...
@@ -1176,7 +1162,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
...
@@ -1176,7 +1162,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
// #36147
// #36147
message
.
message
=
message
.
message
.
toString
();
message
.
message
=
message
.
message
.
toString
();
var
replacePath
=
message
.
message
;
var
replacePath
=
message
.
message
;
replacePath
=
replacePath
.
replaceAll
(
'?fileName='
,
'?sid='
+
CHAT
.
globalLoginParameter
.
sid
+
'&fileName='
);
replacePath
=
replacePath
.
replaceAll
(
'?fileName='
,
'?sid='
+
CHAT
.
globalLoginParameter
.
sid
+
'&fileName='
);
message
.
message
=
replacePath
;
message
.
message
=
replacePath
;
/* if (message.message contain) {
/* if (message.message contain) {
}*/
}*/
...
@@ -1247,35 +1233,44 @@ CHAT_UI.favoriteGroupChange = function(groupId, star) {
...
@@ -1247,35 +1233,44 @@ CHAT_UI.favoriteGroupChange = function(groupId, star) {
}
}
CHAT_UI
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
CHAT_UI
.
removeFavoriteUser
=
function
(
shopMemberId
)
{
CHAT_UI
.
showLoadingIndicator
();
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
android
.
removeFavoriteUser
(
shopMemberId
);
android
.
removeFavoriteUser
(
shopMemberId
);
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
CHAT_UI
.
dismissLoadingIndicator
();
};
};
CHAT_UI
.
insertFavoriteUser
=
function
(
shopMemberId
)
{
CHAT_UI
.
insertFavoriteUser
=
function
(
shopMemberId
)
{
CHAT_UI
.
showLoadingIndicator
();
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
android
.
addFavoriteUser
(
shopMemberId
);
android
.
addFavoriteUser
(
shopMemberId
);
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'active'
);
CHAT_UI
.
dismissLoadingIndicator
();
};
};
CHAT_UI
.
removeFavoriteGroup
=
function
(
groupId
)
{
CHAT_UI
.
removeFavoriteGroup
=
function
(
groupId
)
{
CHAT_UI
.
showLoadingIndicator
();
android
.
removeFavoriteGroup
(
groupId
);
android
.
removeFavoriteGroup
(
groupId
);
$
(
'.group_'
+
groupId
).
removeClass
(
'active'
);
$
(
'.group_'
+
groupId
).
removeClass
(
'active'
);
$
(
'.group_'
+
groupId
).
addClass
(
'disable'
);
$
(
'.group_'
+
groupId
).
addClass
(
'disable'
);
CHAT_UI
.
dismissLoadingIndicator
();
};
};
CHAT_UI
.
insertFavoriteGroup
=
function
(
groupId
)
{
CHAT_UI
.
insertFavoriteGroup
=
function
(
groupId
)
{
CHAT_UI
.
showLoadingIndicator
();
android
.
addFavoriteGroup
(
groupId
);
android
.
addFavoriteGroup
(
groupId
);
$
(
'.group_'
+
groupId
).
removeClass
(
'disable'
);
$
(
'.group_'
+
groupId
).
removeClass
(
'disable'
);
$
(
'.group_'
+
groupId
).
addClass
(
'active'
);
$
(
'.group_'
+
groupId
).
addClass
(
'active'
);
CHAT_UI
.
dismissLoadingIndicator
();
};
};
//全グループ検索画面表示。
//全グループ検索画面表示。
CHAT_UI
.
refreshAllGroupSearch
=
function
(
groupId
)
{
CHAT_UI
.
refreshAllGroupSearch
=
function
(
groupId
)
{
CHAT_UI
.
showLoadingIndicator
();
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'.cancel'
).
addClass
(
'none'
);
$
(
'.cancel'
).
addClass
(
'none'
);
$
(
'.search_form input'
).
removeClass
(
'focus'
);
$
(
'.search_form input'
).
removeClass
(
'focus'
);
...
@@ -1366,6 +1361,7 @@ CHAT_UI.refreshAllGroupSearch = function(groupId) {
...
@@ -1366,6 +1361,7 @@ CHAT_UI.refreshAllGroupSearch = function(groupId) {
});
});
let
obj
=
jQuery
.
parseHTML
(
html
);
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'#userInGroupList'
).
append
(
obj
);
$
(
'#userInGroupList'
).
append
(
obj
);
CHAT_UI
.
dismissLoadingIndicator
();
}
}
...
...
public_new/js/chat-websocket.js
View file @
cdf37962
...
@@ -195,7 +195,7 @@ function setSocketAction () {
...
@@ -195,7 +195,7 @@ function setSocketAction () {
message
.
text
=
message
.
text
message
.
text
=
message
.
text
}
}
var
replacePath
=
message
.
text
;
var
replacePath
=
message
.
text
;
replacePath
=
replacePath
.
replaceAll
(
'?fileName='
,
'?sid='
+
CHAT
.
globalLoginParameter
.
sid
+
'&fileName='
);
replacePath
=
replacePath
.
replaceAll
(
'?fileName='
,
'?sid='
+
CHAT
.
globalLoginParameter
.
sid
+
'&fileName='
);
message
.
text
=
replacePath
;
message
.
text
=
replacePath
;
let
html
=
Mustache
.
render
(
template
,
{
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
text
,
text
:
message
.
text
,
...
...
public_new/js/chat.js
View file @
cdf37962
...
@@ -335,9 +335,23 @@ $(function() {
...
@@ -335,9 +335,23 @@ $(function() {
$
(
this
).
toggleClass
(
"filter"
);
$
(
this
).
toggleClass
(
"filter"
);
});
});
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(){
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
});
$
(
'#chat .search_form .cancel'
).
click
(
function
(){
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
});
// チャットメンバー検索
// チャットメンバー検索
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(){
$
(
'#chat .search_form input[type="search"]'
).
keyup
(
function
(){
$
(
'.overlay_src_msg'
).
empty
();
var
keyword
=
$
(
'#chat .search_form input[type="search"]'
).
val
();
var
keyword
=
$
(
'#chat .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
return
;
}
var
rooms
=
CHAT_DB
.
getRoomList
(
chatRoomType
.
ALL
,
keyword
);
var
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
);
...
...
public_new/js/contact.js
View file @
cdf37962
...
@@ -4,14 +4,12 @@ $(function() {
...
@@ -4,14 +4,12 @@ $(function() {
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
){
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
){
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
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
;
}
//全グループ検索画面
//全グループ検索画面
if
(
isAllGroup
)
{
if
(
isAllGroup
)
{
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
||
keyword
.
leght
<
2
)
{
return
;
}
//グループデータ検索
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
var
groupTemplate
;
...
...
public_new/loading.html
View file @
cdf37962
<div
id=
"loader-bg"
>
<div
id=
"loader-bg"
class=
"loading-indicator"
>
<div
id=
"loader"
>
<div
id=
"loader"
class=
"loading-indicator"
>
<i
class=
"fa fa-circle-o-notch fa-spin fa-3x fa-fw"
></i>
<i
class=
"fa fa-circle-o-notch fa-spin fa-3x fa-fw"
></i>
</div>
</div>
</div>
</div>
public_new/template/template_room_list.html
View file @
cdf37962
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<a
href=
"#"
class=
"w-100"
onclick=
"CHAT_UI.joinRoom({{roomId}},'{{roomName}}');"
>
<a
href=
"#"
class=
"w-100"
onclick=
"CHAT_UI.joinRoom({{roomId}},'{{roomName}}');"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"chat_item_l"
>
<div
class=
"thu
bnail{{thumbnailCount}} thu
bnail"
>
<div
class=
"thu
mbnail{{thumbnailCount}} thum
bnail"
>
{{#attendUsers}}
{{#attendUsers}}
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/></div>
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/></div>
{{/attendUsers}}
{{/attendUsers}}
...
...
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