Commit 2824234e by Kim Peace

fixed to recoginze non-attendee in archive

parent 5b99c4f2
......@@ -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 {
......
......@@ -291,6 +291,7 @@ 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 })
......
......@@ -1525,9 +1525,6 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
// アーカイブ詳細取得
var archive = CHAT_DB.getArchiveDetail(archiveId);
// チャットルーム情報を取得
var roomId = archive.roomId;
//保存ユーザ情報を取得
var userInfo = CHAT_DB.getUserInfo(archive.saveUserId);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
......@@ -1642,27 +1639,24 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
// 初期化
$("#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,
......@@ -1672,11 +1666,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": // 画像
......@@ -1747,14 +1742,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);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment