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
a3158b49
Commit
a3158b49
authored
Apr 22, 2021
by
Kang Donghun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release_sp3' into features/release_sp3_collaboration_audio
parents
e4851d0a
3f529f16
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
28 deletions
+47
-28
public_new/chat_room.html
+2
-0
public_new/css/common.css
+3
-0
public_new/css/footer.css
+1
-0
public_new/js/chat-db.js
+12
-0
public_new/js/chat-ui.js
+28
-23
public_new/js/chat.js
+1
-5
No files found.
public_new/chat_room.html
View file @
a3158b49
...
...
@@ -150,6 +150,7 @@
<script
src=
"./js/libs/jquery.mark.min.js"
></script>
<script
src=
"./js/common.js"
></script>
<script
src=
"./js/language.js"
></script>
<script
src=
"./js/loading.js"
></script>
<script
src=
"./js/language_ko.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/language_ja.js"
charset=
"UTF-8"
></script>
<script
src=
"./js/language_en.js"
charset=
"UTF-8"
></script>
...
...
@@ -169,6 +170,7 @@
String
.
prototype
.
replaceAll
=
function
(
org
,
dest
)
{
return
this
.
split
(
org
).
join
(
dest
);
}
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
let
CHAT_SERVER_URL
=
''
;
let
CMS_SERVER_URL
=
''
;
...
...
public_new/css/common.css
View file @
a3158b49
...
...
@@ -174,6 +174,9 @@ main {
width
:
100%
;
text-align
:
center
;
}
.modal-header
{
width
:
100%
;
}
.profile_modal
.modal-header
.profile_name
span
{
line-height
:
60px
;
font-weight
:
bold
;
...
...
public_new/css/footer.css
View file @
a3158b49
...
...
@@ -38,6 +38,7 @@ footer .footer_item p {
color
:
#707070
;
font-weight
:
bold
;
margin
:
0
;
white-space
:
nowrap
;
}
footer
.footer_item
.active
{
color
:
#0070ca
;
...
...
public_new/js/chat-db.js
View file @
a3158b49
...
...
@@ -289,6 +289,18 @@ CHAT_DB.addFavoriteUser = function(shopMemberId) {
}
};
CHAT_DB
.
removeFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
"removeFavoriteGroup"
,
{
"groupId"
:
groupId
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
...
...
public_new/js/chat-ui.js
View file @
a3158b49
...
...
@@ -554,8 +554,8 @@ CHAT_UI.scrollToBottom = function() {
const
scrollHeight
=
messages
.
prop
(
'scrollHeight'
);
//messages.scrollTop(scrollHeight);
$
(
'html, body'
).
animate
({
scrollTop
:
9999999
},
5
00
);
scrollTop
:
scrollHeight
},
1
00
);
};
CHAT_UI
.
scrollToLastMarkedUnseen
=
function
(
value
)
{
...
...
@@ -879,6 +879,24 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
// 画像の読み込みが全て終わったタイミングでコールバック実行
// FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。
CHAT_UI
.
waitForLoadingVideo
=
function
(
div
,
callback
)
{
CHAT_UI
.
showLoadingIndicator
();
// var imgs = document.getElementsByTagName("video");
var
video
=
div
.
find
(
"video"
);
var
count
=
video
.
length
;
if
(
count
==
0
)
callback
();
var
loaded
=
0
;
video
.
each
(
function
()
{
this
.
addEventListener
(
'loadeddata'
,
function
(
e
)
{
loaded
++
;
if
(
loaded
===
count
)
{
callback
();
CHAT_UI
.
dismissLoadingIndicator
();
}
});
});
}
CHAT_UI
.
waitForLoadingImage
=
function
(
div
,
callback
)
{
var
imgs
=
div
.
find
(
"img"
);
console
.
log
(
imgs
);
...
...
@@ -897,10 +915,8 @@ CHAT_UI.waitForLoadingImage = function(div, callback) {
if
(
this
.
complete
||
this
.
readyState
===
readyState
.
COMPLETED
)
{
$
(
this
).
trigger
(
"load"
);
}
});
}
$
(
'#contactButton'
).
on
(
'click'
,
function
(
event
)
{
CHAT_UI
.
refreshContactScreen
();
});
...
...
@@ -1323,27 +1339,13 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
workVal
=
html
+
workVal
;
}
})
// メッセージの画面描画
jQueryMessages
.
prepend
(
workVal
);
if
(
beforeHeight
!==
0
)
{
// 追加のメッセージ読み込み時は読み込み前のスクロール位置を維持
setTimeout
(
function
()
{
jQueryMessages
.
scrollTop
(
jQueryMessages
.
prop
(
'scrollHeight'
)
-
beforeHeight
);
},
400
);
}
else
{
// 新規に入室の場合は最下部へスクロール
CHAT_UI
.
waitForLoadingImage
(
jQueryMessages
,
CHAT_UI
.
scrollToBottom
);
// タブレット等、画面サイズが大きい場合、スクロール出来なくならないよう追加で10件メッセージを取得
if
(
$
(
window
).
height
()
>
jQueryMessages
.
height
())
{
$
(
'#messages'
).
scroll
();
}
}
CHAT_UI
.
waitForLoadingImage
(
jQueryMessages
,
CHAT_UI
.
scrollToBottom
);
CHAT_UI
.
waitForLoadingVideo
(
jQueryMessages
,
CHAT_UI
.
scrollToBottom
);
// ユーザ削除ボタン表示しない
$
(
"#userSelectionDeleteBtn"
).
hide
();
setInterval
(
updateDuration
,
1000
);
CHAT_UI
.
scrollToBottom
();
};
...
...
@@ -1469,7 +1471,7 @@ CHAT_UI.removeFavoriteGroup = function(groupId) {
if
(
typeof
(
android
)
!=
"undefined"
)
{
result
=
android
.
removeFavoriteGroup
(
groupId
);
}
else
{
result
=
webkit
.
messageHandlers
.
removeFavoriteGroup
.
postMessage
(
groupId
);
result
=
CHAT_DB
.
removeFavoriteGroup
(
groupId
);
}
if
(
!
result
)
{
$
(
'.group_'
+
groupId
).
addClass
(
'active'
);
...
...
@@ -2166,7 +2168,6 @@ CHAT_UI.showAddUserConfirmView = function() {
var
selectedUserList
=
CHAT_DB
.
loadSelectedUsers
();
console
.
log
(
"check = "
+
selectedUserList
);
selectedUserList
.
forEach
(
function
(
user
){
let
html
=
Mustache
.
render
(
userTemplate
,
{
id
:
user
.
shopMemberId
,
...
...
@@ -2430,7 +2431,11 @@ CHAT_UI.refreshForOffline = function() {
CHAT_UI
.
displayExistRoom
=
function
(
roomId
)
{
if
(
confirm
(
'error_already_exist_same_user'
))
{
android
.
joinRoom
(
roomId
,
''
);
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
joinRoom
.
postMessage
({
"roomId"
:
roomId
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
joinRoom
(
roomId
,
''
);
}
}
return
;
}
...
...
public_new/js/chat.js
View file @
a3158b49
...
...
@@ -87,7 +87,7 @@ CHAT.createVideoThumbnailAndUpload = function(sourceImage, callback) {
// Load video in Safari / IE11
video
.
muted
=
true
;
video
.
playsInline
=
true
;
video
.
p
lay
();
video
.
p
ause
();
};
fileReader
.
readAsArrayBuffer
(
sourceImage
);
}
...
...
@@ -409,10 +409,6 @@ $(function() {
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".chat_list"
).
removeClass
(
"col-12"
).
addClass
(
"col-6"
);
}
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
$
(
'#chat .search_form input[type="search"]'
).
blur
();
return
;
...
...
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