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
5e05ce42
Commit
5e05ce42
authored
Jun 16, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.agentec.jp:abookCommunication/chat_webview into develop
# Conflicts: # public_new/js/chat-ui.js
parents
05b206b3
750f11f0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
36 deletions
+46
-36
public_new/archive_detail.html
+16
-15
public_new/js/chat-db.js
+10
-3
public_new/js/chat-room.js
+5
-4
public_new/js/chat-ui.js
+13
-14
public_new/js/constant.js
+2
-0
No files found.
public_new/archive_detail.html
View file @
5e05ce42
...
...
@@ -18,19 +18,20 @@
</head>
<script>
var
archiveId
;
window
.
addEventListener
(
'DOMContentLoaded'
,
function
(){
var
urlPrm
=
new
Object
;
var
urlSearch
=
location
.
search
.
substring
(
1
).
split
(
'&'
);
var
kv
=
urlSearch
[
0
].
split
(
'='
);
urlPrm
[
kv
[
0
]]
=
kv
[
1
];
archiveId
=
urlPrm
.
archiveId
if
(
typeof
(
android
)
!=
"undefined"
)
{
}
else
{
CHAT_UI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
}
});
</script>
var
archiveId
;
window
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
var
urlPrm
=
new
Object
;
var
urlSearch
=
location
.
search
.
substring
(
1
).
split
(
'&'
);
var
kv
=
urlSearch
[
0
].
split
(
'='
);
urlPrm
[
kv
[
0
]]
=
kv
[
1
];
archiveId
=
urlPrm
.
archiveId
if
(
typeof
(
android
)
!=
"undefined"
)
{
}
else
{
CHAT_UI
.
refreshArchiveDetailScreen
(
urlPrm
.
archiveId
);
}
});
</script>
<body>
<!-- ナビメニュー -->
...
...
@@ -126,7 +127,7 @@
<
p
>
{{
userName
}}
<
/p
>
<
/li
>
</script>
<script
id=
"archive-namecard-template"
type=
"text/template"
>
<
div
class
=
"modal fade profile_modal"
id
=
"userNameCard"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"userNameCard"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered"
role
=
"document"
>
...
...
@@ -195,7 +196,7 @@
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
...
...
public_new/js/chat-db.js
View file @
5e05ce42
...
...
@@ -51,7 +51,11 @@ CHAT_DB.getMessages = function (roomId) {
CHAT_DB
.
getMessagesWithMessageId
=
function
(
messageId
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO メッセージ追加呼出。
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getMessageListFromMessageId
,
{
messageId
:
messageId
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
return
JSON
.
parse
(
android
.
getMessageListFromMessageId
(
messageId
));
}
...
...
@@ -270,8 +274,8 @@ CHAT_DB.searchMessages = function (keyword, userList) {
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
searchMessages
,
{
"keyWord"
:
keyword
,
"userList"
:
userList
,
keyWord
:
keyword
,
userList
:
userList
,
})
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
...
...
@@ -291,6 +295,9 @@ CHAT_DB.getMyGroupUsersNotInRoom = function () {
};
CHAT_DB
.
getUserInfo
=
function
(
shopMemberId
)
{
if
(
shopMemberId
==
""
)
{
return
;
}
if
(
CHAT_UTIL
.
isIOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getUserInfo
,
{
shopMemberId
:
shopMemberId
})
...
...
public_new/js/chat-room.js
View file @
5e05ce42
var
lastscrollvalue
;
window
.
onscroll
=
function
()
{
beforeScroll
=
window
.
scrollY
;
var
beforeHeight
=
$
(
".room_container"
).
height
();
const
beforeHeight
=
$
(
".room_container"
).
height
();
messageCount
=
$
(
".chat_message"
).
length
;
if
(
$
(
this
).
scrollTop
()
===
0
&&
messageCount
>=
PagingSize
.
MESSAGE
)
{
if
(
!
$
(
"#chatLoader"
).
is
(
":visible"
))
{
...
...
@@ -9,14 +9,15 @@ window.onscroll = function () {
'<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>'
);
$
(
"#messages"
).
prepend
(
loader
);
var
messageId
=
$
(
$
(
".chat_message"
).
get
(
0
)).
data
(
"messageid"
);
var
messages
;
const
messageId
=
$
(
$
(
".chat_message"
).
get
(
0
)).
data
(
"messageid"
);
let
messages
;
if
(
typeof
android
!=
"undefined"
)
{
if
(
IS_ONLINE
==
"true"
)
{
android
.
updatePreMessage
(
messageId
);
}
}
else
{
//TODO 追加メッセージUpdate、get
// 追加メッセージUpdate、get
webkit
.
messageHandlers
.
updatePreMessage
.
postMessage
({
messageId
:
messageId
});
}
messages
=
CHAT_DB
.
getMessagesWithMessageId
(
messageId
);
CHAT_UI
.
prependMessage
(
messages
);
...
...
public_new/js/chat-ui.js
View file @
5e05ce42
...
...
@@ -1413,7 +1413,7 @@ CHAT_UI.refreshAllGroupSearch = function (paramGroupId) {
$("#parentGroupArea").removeClass("none");
}
//該当グループのパースを表示。
var
groupPathTemplate = getTemplate(TemplateURL.GROUP_PATH);
const
groupPathTemplate = getTemplate(TemplateURL.GROUP_PATH);
result.groupPathList.forEach(function (groupPath) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
...
...
@@ -1424,7 +1424,7 @@ CHAT_UI.refreshAllGroupSearch = function (paramGroupId) {
});
//該当グループの下位グループ表示。
var
groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
const
groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
result.childGroupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
...
...
@@ -1437,7 +1437,7 @@ CHAT_UI.refreshAllGroupSearch = function (paramGroupId) {
});
//該当グループの所属ユーザを表示。
var
userTemplate = getTemplate(TemplateURL.USER_LIST);
const
userTemplate = getTemplate(TemplateURL.USER_LIST);
result.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = CHAT.getProfileImgUrl(groupUser.profileUrl);
...
...
@@ -1522,24 +1522,21 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
// 初期化
$("#archiveDetail").html("");
// アーカイブ詳細の様式を読み込む
const archiveDetailTemplate = $("#archive-detail-template").html();
if (IS_ONLINE == "true") {
CHAT_DB.updateArchiveDetail(archiveId);
}
// アーカイブ詳細取得
var archive = CHAT_DB.getArchiveDetail(archiveId);
// チャットルーム情報を取得
var roomId = archive.roomId;
const archive = CHAT_DB.getArchiveDetail(archiveId);
//保存ユーザ情報を取得
var
userInfo = CHAT_DB.getUserInfo(archive.saveUserId);
//
保存ユーザ情報を取得
const
userInfo = CHAT_DB.getUserInfo(archive.saveUserId);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
// アーカイブ情報を表示
var
html = Mustache.render(archiveDetailTemplate, {
const
html = Mustache.render(archiveDetailTemplate, {
fileName: archive.archiveName,
insertDate: archive.archiveDate,
chatRoomName: archive.roomName,
...
...
@@ -1549,11 +1546,12 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
userId: userInfo.shopMemberId,
});
var obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#archiveDetail").append(obj);
// プレイヤーの切り替え
var
archiveFilePath = CHAT.createGetDataUrl(archive.filePath, archive.roomId);
const
archiveFilePath = CHAT.createGetDataUrl(archive.filePath, archive.roomId);
switch (archive.archiveType) {
case "0": // 画像
...
...
@@ -1624,14 +1622,15 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
}
attendUserList
.
forEach
(
function
(
user
)
{
if
(
user
==
""
)
{
return
;
}
var
userInfo
=
CHAT_DB
.
getUserInfo
(
user
);
userInfo
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
userInfo
.
profileUrl
);
var
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
const
html
=
Mustache
.
render
(
archiveUserTemplate
,
{
profileImage
:
userInfo
.
profileUrl
,
userName
:
userInfo
.
shopMemberName
,
});
var
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{
const
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
"click"
,
function
()
{
// ネームカード表示
CHAT_UI
.
makeNameCard
(
user
);
});
...
...
public_new/js/constant.js
View file @
5e05ce42
...
...
@@ -157,4 +157,6 @@ const NATIVE_KEY_IOS = {
getMyGroupUsersNotInRoom
:
"getMyGroupUsersNotInRoom"
,
getUserInfo
:
"getUserInfo"
,
getUserListByLoginId
:
"getUserListByLoginId"
,
getMessageListFromMessageId
:
"getMessageListFromMessageId"
,
updatePreMessage
:
"updatePreMessage"
,
};
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