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
e966ab66
Commit
e966ab66
authored
Apr 13, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
オフライン対応
parent
70abde24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
16 deletions
+46
-16
public_new/css/common.css
+4
-0
public_new/js/chat-ui.js
+40
-3
public_new/js/common.js
+0
-11
public_new/template/template_user_name_card.html
+2
-2
No files found.
public_new/css/common.css
View file @
e966ab66
...
...
@@ -158,6 +158,10 @@ main {
padding-right
:
1rem
;
margin-top
:
1rem
;
}
.disabled
{
background
:
darkgray
!important
;
}
.profile_modal
.modal-header
{
display
:
table
;
}
.profile_modal
.modal-header
,
.profile_modal
.modal-body
{
padding-bottom
:
0
;
}
.profile_modal
.modal-footer
button
{
width
:
33%
;
padding
:
5px
;
}
...
...
public_new/js/chat-ui.js
View file @
e966ab66
...
...
@@ -1132,6 +1132,7 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
CHAT_UI
.
loadMessages
=
function
(
roomId
,
roomName
)
{
if
(
IS_ONLINE
==
'true'
)
{
CHAT_UI
.
refreshForOnline
();
CHAT_SOCKET
.
connectSocket
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
updateMessages
(
roomId
);
...
...
@@ -1141,6 +1142,8 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
socket
.
emit
(
'exitRoom'
,
roomId
);
socket
.
emit
(
'joinRoom'
,
roomId
,
roomName
,
function
()
{
});
}
else
{
CHAT_UI
.
refreshForOffline
();
}
var
roomType
=
android
.
getRoomType
();
if
(
roomType
==
chatRoomType
.
DM
)
{
...
...
@@ -1330,12 +1333,19 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) {
$
(
'#userNameCard'
).
modal
(
'hide'
);
$
(
'#myNameCard'
).
modal
(
'hide'
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
removeFavoriteUser
(
shopMemberId
);
var
result
=
android
.
removeFavoriteUser
(
shopMemberId
);
if
(
!
result
)
{
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'disable'
);
}
else
{
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
}
}
else
{
webkit
.
messageHandlers
.
removeFavoriteUser
.
postMessage
({
shopMemberId
});
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
}
$
(
'.shopmember_'
+
shopMemberId
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMemberId
).
addClass
(
'disable'
);
CHAT_UI
.
dismissLoadingIndicator
();
};
...
...
@@ -2155,4 +2165,30 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
$
(
'#myGroupListForMakeRoom'
).
append
(
obj
);
})
}
CHAT_UI
.
refreshForOnline
=
function
()
{
IS_ONLINE
=
'true'
;
$
(
'.craeteRoomButton'
).
show
();
$
(
'#messageSend'
).
removeClass
(
'disabled'
);
$
(
'#messageSend'
).
attr
(
'disabled'
,
false
);
$
(
'#favoriteButton'
).
attr
(
'disabled'
,
false
);
$
(
'#roomMenu'
).
show
();
$
(
'.attach_file'
).
show
();
if
(
typeof
$
(
'#roomTitle'
).
val
()
!=
'undefined'
)
{
CHAT_SOCKET
.
connectSocket
();
socket
.
emit
(
'exitRoom'
,
CHAT
.
globalLoginParameter
.
roomId
);
socket
.
emit
(
'joinRoom'
,
CHAT
.
globalLoginParameter
.
roomId
,
CHAT
.
globalLoginParameter
.
roomName
,
function
()
{
});
}
}
CHAT_UI
.
refreshForOffline
=
function
()
{
IS_ONLINE
=
'false'
;
$
(
'.craeteRoomButton'
).
hide
();
$
(
'#messageSend'
).
addClass
(
'disabled'
);
$
(
'#messageSend'
).
attr
(
'disabled'
,
true
);
$
(
'#favoriteButton'
).
attr
(
'disabled'
,
true
);
$
(
'#roomMenu'
).
hide
();
$
(
'.attach_file'
).
hide
();
}
\ No newline at end of file
public_new/js/common.js
View file @
e966ab66
...
...
@@ -21,17 +21,6 @@ $(function() {
},
1000
);
});
// お気に入りボタン押下イベント
$
(
".star"
).
click
(
function
()
{
if
(
$
(
this
).
hasClass
(
"active"
))
{
$
(
this
).
removeClass
(
"active"
);
$
(
this
).
addClass
(
"disable"
);
}
else
{
$
(
this
).
removeClass
(
"disable"
);
$
(
this
).
addClass
(
"active"
);
}
});
// 共通検索フォーム キャンセルボタン表示
$
(
'.search_form input[type="search"]'
).
click
(
function
()
{
$
(
this
).
addClass
(
"focus"
);
...
...
public_new/template/template_user_name_card.html
View file @
e966ab66
...
...
@@ -17,7 +17,7 @@
</div>
<div
class=
"modal-footer border-0 justify-content-center"
>
{{#isFavorite}}
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"CHAT_UI.removeFavoriteUser({{shopMemberId}})"
>
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"CHAT_UI.removeFavoriteUser({{shopMemberId}})"
id=
"favoriteButton"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_profile_favorite.png"
alt=
"お気に入り"
>
...
...
@@ -27,7 +27,7 @@
</button>
{{/isFavorite}}
{{^isFavorite}}
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"CHAT_UI.insertFavoriteUser({{shopMemberId}})"
>
<button
type=
"button"
class=
"border-0 bg_navy"
onclick=
"CHAT_UI.insertFavoriteUser({{shopMemberId}})"
id=
"favoriteButton"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_profile_favorite_white.png"
alt=
"お気に入り"
>
...
...
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