Commit 2824234e by Kim Peace

fixed to recoginze non-attendee in archive

parent 5b99c4f2
...@@ -19,18 +19,19 @@ ...@@ -19,18 +19,19 @@
</head> </head>
<script> <script>
var archiveId; var archiveId;
window.addEventListener('DOMContentLoaded', function(){ window.addEventListener('DOMContentLoaded', function () {
var urlPrm = new Object; var urlPrm = new Object;
var urlSearch = location.search.substring(1).split('&'); var urlSearch = location.search.substring(1).split('&');
var kv = urlSearch[0].split('='); var kv = urlSearch[0].split('=');
urlPrm[kv[0]]=kv[1]; urlPrm[kv[0]] = kv[1];
archiveId = urlPrm.archiveId archiveId = urlPrm.archiveId
if (typeof(android) != "undefined") { if (typeof (android) != "undefined") {
} else { } else {
CHAT_UI.refreshArchiveDetailScreen(urlPrm.archiveId); CHAT_UI.refreshArchiveDetailScreen(urlPrm.archiveId);
} }
}); });
</script> </script>
<body> <body>
<!-- ナビメニュー --> <!-- ナビメニュー -->
...@@ -195,7 +196,7 @@ ...@@ -195,7 +196,7 @@
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
if (typeof(android) != "undefined") { if (typeof (android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
} else { } else {
......
...@@ -291,6 +291,7 @@ CHAT_DB.getMyGroupUsersNotInRoom = function () { ...@@ -291,6 +291,7 @@ CHAT_DB.getMyGroupUsersNotInRoom = function () {
}; };
CHAT_DB.getUserInfo = function (shopMemberId) { CHAT_DB.getUserInfo = function (shopMemberId) {
if (shopMemberId == "") { return; }
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
return JSON.parse( return JSON.parse(
callNativeApp(NATIVE_KEY_IOS.getUserInfo, { shopMemberId: shopMemberId }) callNativeApp(NATIVE_KEY_IOS.getUserInfo, { shopMemberId: shopMemberId })
......
...@@ -1525,9 +1525,6 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) { ...@@ -1525,9 +1525,6 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
// アーカイブ詳細取得 // アーカイブ詳細取得
var archive = CHAT_DB.getArchiveDetail(archiveId); var archive = CHAT_DB.getArchiveDetail(archiveId);
// チャットルーム情報を取得
var roomId = archive.roomId;
//保存ユーザ情報を取得 //保存ユーザ情報を取得
var userInfo = CHAT_DB.getUserInfo(archive.saveUserId); var userInfo = CHAT_DB.getUserInfo(archive.saveUserId);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl); userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
...@@ -1645,24 +1642,21 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) { ...@@ -1645,24 +1642,21 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
// 初期化 // 初期化
$("#archiveDetail").html(""); $("#archiveDetail").html("");
// アーカイブ詳細の様式を読み込む // アーカイブ詳細の様式を読み込む
const archiveDetailTemplate = $("#archive-detail-template").html(); const archiveDetailTemplate = $("#archive-detail-template").html();
if (IS_ONLINE == "true") { if (IS_ONLINE == "true") {
CHAT_DB.updateArchiveDetail(archiveId); CHAT_DB.updateArchiveDetail(archiveId);
} }
// アーカイブ詳細取得 // アーカイブ詳細取得
var archive = CHAT_DB.getArchiveDetail(archiveId); const archive = CHAT_DB.getArchiveDetail(archiveId);
// チャットルーム情報を取得
var roomId = archive.roomId;
//保存ユーザ情報を取得 // 保存ユーザ情報を取得
var userInfo = CHAT_DB.getUserInfo(archive.saveUserId); const userInfo = CHAT_DB.getUserInfo(archive.saveUserId);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl); userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
// アーカイブ情報を表示 // アーカイブ情報を表示
var html = Mustache.render(archiveDetailTemplate, { const html = Mustache.render(archiveDetailTemplate, {
fileName: archive.archiveName, fileName: archive.archiveName,
insertDate: archive.archiveDate, insertDate: archive.archiveDate,
chatRoomName: archive.roomName, chatRoomName: archive.roomName,
...@@ -1672,11 +1666,12 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) { ...@@ -1672,11 +1666,12 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
userId: userInfo.shopMemberId, userId: userInfo.shopMemberId,
}); });
var obj = $(jQuery.parseHTML(html)).on("click", function () {}); var obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#archiveDetail").append(obj); $("#archiveDetail").append(obj);
// プレイヤーの切り替え // プレイヤーの切り替え
var archiveFilePath = CHAT.createGetDataUrl(archive.filePath, archive.roomId); const archiveFilePath = CHAT.createGetDataUrl(archive.filePath, archive.roomId);
switch (archive.archiveType) { switch (archive.archiveType) {
case "0": // 画像 case "0": // 画像
...@@ -1747,14 +1742,15 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) { ...@@ -1747,14 +1742,15 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
} }
attendUserList.forEach(function (user) { attendUserList.forEach(function (user) {
if (user == "") { return; }
var userInfo = CHAT_DB.getUserInfo(user); var userInfo = CHAT_DB.getUserInfo(user);
userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl); userInfo.profileUrl = CHAT.getProfileImgUrl(userInfo.profileUrl);
var html = Mustache.render(archiveUserTemplate, { const html = Mustache.render(archiveUserTemplate, {
profileImage: userInfo.profileUrl, profileImage: userInfo.profileUrl,
userName: userInfo.shopMemberName, userName: userInfo.shopMemberName,
}); });
var obj = $(jQuery.parseHTML(html)).on("click", function () { const obj = $(jQuery.parseHTML(html)).on("click", function () {
// ネームカード表示 // ネームカード表示
CHAT_UI.makeNameCard(user); 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