Commit 69c96185 by Kim Peace

Fixed for some js bug

- could not found js file
- could not found CHAT_UI.refreshArchiveScreen method
parent d12c2257
......@@ -108,6 +108,7 @@
<script src="./js/chat-ui.js"></script>
<script src="./js/chat-util.js"></script>
<script src="./js/chat-db.js"></script>
<script src="./js/chat-db-foriOS.js"></script>
<script id="archive-template" type="text/template">
<li class="d-flex align-items-center">
......
......@@ -82,6 +82,7 @@
<script src="./js/chat-ui.js"></script>
<script src="./js/chat-util.js"></script>
<script src="./js/chat-db.js"></script>
<script src="./js/chat-db-foriOS.js"></script>
<script id="archive-detail-template" type="text/template">
<div id="archive_player" class="player">
......
......@@ -142,6 +142,7 @@
<script src="./js/chat-ui.js"></script>
<script src="./js/chat-util.js"></script>
<script src="./js/chat-db.js"></script>
<script src="./js/chat-db-foriOS.js"></script>
<script src="./js/chat-add-user.js"></script>
<script>
String.prototype.replaceAll = function(org, dest) {
......
......@@ -75,6 +75,7 @@
<script src="./js/chat-ui.js"></script>
<script src="./js/chat-util.js"></script>
<script src="./js/chat-db.js"></script>
<script src="./js/chat-db-foriOS.js"></script>
<script>
String.prototype.replaceAll = function(org, dest) {
return this.split(org).join(dest);
......
......@@ -1963,6 +1963,61 @@ CHAT_UI.checkForMakeChat = function (checkMemberId) {
}
};
// アーカイブ一覧
CHAT_UI.refreshArchiveScreen = function () {
// loadingIndicatorを表示
CHAT_UI.showLoadingIndicator();
// 初期化
$("#archiveList").html("");
// アーカイブの様式を読み込む
const archiveTemplate = $("#archive-template").html();
// アーカイブ一覧取得
if (IS_ONLINE == "true") {
CHAT_DB.updateArchiveList();
}
// ローカルDBのデータを表示
var archiveList = CHAT_DB.getArchiveList();
if (typeof archiveList == "undefined") {
CHAT_UI.dismissLoadingIndicator();
return;
}
archiveList.forEach(function (archive) {
var typeImage = "";
switch (archive.archiveType) {
case 0: // 画像
typeImage = "icon/icon_collabo_picture.png";
break;
case 1: // 動画
typeImage = "icon/icon_collabo_videocam.png";
break;
case 2: // 音声
typeImage = "icon/icon_collabo_headset.png";
break;
case 3: // 文書
typeImage = "icon/icon_collabo_document.png";
break;
default:
// その他
typeImage = "";
}
let html = Mustache.render(archiveTemplate, {
archiveId: archive.archiveId,
fileName: archive.archiveName,
insertDate: archive.archiveDate,
typeImage: typeImage,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#archiveList").append(obj);
});
// loadingIndicatorを非表示
CHAT_UI.dismissLoadingIndicator();
};
CHAT_UI.showMakeRoomConfirmView = function () {
$("#selectedUserList").html("");
......
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