Commit dbb5490c by Kim Peace

Fixed for archives

parent 94af1176
......@@ -15,12 +15,6 @@
<link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="./css/loading.css">
<link rel="stylesheet" href="./css/font-awesome.css">
<script>
window.addEventListener('DOMContentLoaded', function () {
ArchiveUI.refreshArchiveScreen();
});
</script>
</head>
<body>
......@@ -119,33 +113,12 @@
<!-- view -->
<script src="./js/views/archive/archive.js"></script>
<!-- Template archive -->
<script id="archive-template" type="text/template">
<li class="d-flex align-items-center">
<a href="archive_detail.html?archiveId={{archiveId}}" class="w-100">
<div class="archive_item d-flex flex-row align-items-center w-100">
<div class="arhive_img">
<div class="img_wrap bg_blue">
<img src="{{typeImage}}" alt="動画" />
</div>
</div>
<div class="archive_desc">
<div class="archive_name">
<span>{{fileName}}</span>
</div>
<div class="archive_date">
<span>{{insertDate}}</span>
</div>
</div>
</div>
</a>
</li>
</script>
<script>
$("#loadingArea").load("./loading.html");
window.addEventListener('DOMContentLoaded', function () {
ArchiveUI.refreshArchiveScreen();
});
</script>
</body>
......
......@@ -74,69 +74,19 @@
<script src="./js/Models/serverinfo.js"></script>
<script src="./js/Models/userinfo.js"></script>
<!-- view -->
<script src="./js/views/contact/namecard.js"></script>
<script src="./js/views/archive/archive.js"></script>
<!-- Template archive-detail -->
<script id="archive-detail-template" type="text/template">
<div id="archive_player" class="player">
</div>
<div class="archive_detail_desc">
<div class="archive_detail_fl_nm item">
<h2 class="ttl" id="archiveFileName">FileName</h2>
<span>{{fileName}}</span>
</div>
<div class="archive_detail_sv_date item">
<h2 class="ttl" id="archiveInsertDate">InsertDate</h2>
<span>{{insertDate}}</span>
</div>
<div class="archive_detail_room_nm item">
<h2 class="ttl" id="archiveRoomName">ChatRoomName</h2>
<span class="archive_chat_room">{{chatRoomName}}</span>
<button id="joinChatRoom">
<img src="icon/icon_join_room.png" alt="">
</button>
</div>
<div class="archive_detail_sv_user item">
<h2 class="ttl" id="archiveSaveUser">SaveUser</h2>
<div class="d-flex flex-row">
<div class="d-flex flex-column">
<img src="{{profileImage}}" alt="プロフィール画像" onclick="Namecard.makeNameCard({{userId}})" >
<p>{{userName}}</p>
</div>
</div>
</div>
<div class="archive_detail_user_list item">
<h2 class="ttl" id="archiveAttendUser">AttendUser</h2>
<ul class="d-flex flex-row" id="attendUser">
</ul>
</div>
</div>
</script>
<!-- Template archive-user -->
<script id="archive-user-template" type="text/template">
<li class="archive_user">
<img src="{{profileImage}}" alt="">
<p>{{userName}}</p>
</li>
</script>
<script>
var archiveId;
ArchiveUI.refreshArchiveDetailScreen(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 {
ArchiveUI.refreshArchiveDetailScreen(urlPrm.archiveId);
}
});
</script>
</body>
......
......@@ -78,6 +78,9 @@ const TemplateURL = {
USER_LIST: "./template/template_user_list.html",
USER_NAME_CARD: "./template/template_user_name_card.html",
USER_MESSAGE: "./template/template_user_message.html",
ARCHIVE: "./template/template_archive.html",
ARCHIVE_DETAIL: "./template/template_archive_detail.html",
ARCHIVE_USER: "./template/template_archive_user.html",
MY_NAME_CARD: "./template/template_my_name_card.html",
MY_MESSAGE: "./template/template_my_message.html",
OPEN_COLLABORATION_MESSAGE:
......
......@@ -165,7 +165,7 @@ var appendArchiveDetailScreen = function (archive) {
userInfo.profileUrl = Common.getProfileImgUrl(userInfo.profileUrl);
// アーカイブ詳細の様式を読み込む
const archiveDetailTemplate = $("#archive-detail-template").html();
const archiveDetailTemplate = getTemplate(TemplateURL.ARCHIVE_DETAIL);
// アーカイブ情報を表示
const html = Mustache.render(archiveDetailTemplate, {
......@@ -260,16 +260,14 @@ var appendVoiceTypePlayer = function (filePath) {
var appendAttendUsers = function (attendedUserList) {
// ユーザの様式を読み込む
const archiveUserTemplate = $("#archive-user-template").html();
const archiveUserTemplate = getTemplate(TemplateURL.ARCHIVE_USER);
// 参加ユーザ情報を表示
let attendUserList = archive.attendUserIds;
if (typeof android != "undefined") {
// ios実装不要
attendUserList = JSON.parse(archive.attendUserIds);
attendedUserList = JSON.parse(attendedUserList);
}
attendUserList.forEach(function (user) {
attendedUserList.forEach(function (user) {
if (user == "") {
return;
}
......@@ -310,7 +308,7 @@ ArchiveUI.refreshArchiveScreen = function () {
$("#archiveList").html("");
// アーカイブの様式を読み込む
const archiveTemplate = $("#archive-template").html();
const archiveTemplate = getTemplate(TemplateURL.ARCHIVE);
// アーカイブ一覧取得
if (serverInfo.isOnline == "true") {
......
<li class="d-flex align-items-center">
<a href="archive_detail.html?archiveId={{archiveId}}" class="w-100">
<div class="archive_item d-flex flex-row align-items-center w-100">
<div class="arhive_img">
<div class="img_wrap bg_blue">
<img src="{{typeImage}}" alt="動画" />
</div>
</div>
<div class="archive_desc">
<div class="archive_name">
<span>{{fileName}}</span>
</div>
<div class="archive_date">
<span>{{insertDate}}</span>
</div>
</div>
</div>
</a>
</li>
\ No newline at end of file
<div id="archive_player" class="player">
</div>
<div class="archive_detail_desc">
<div class="archive_detail_fl_nm item">
<h2 class="ttl" id="archiveFileName">FileName</h2>
<span>{{fileName}}</span>
</div>
<div class="archive_detail_sv_date item">
<h2 class="ttl" id="archiveInsertDate">InsertDate</h2>
<span>{{insertDate}}</span>
</div>
<div class="archive_detail_room_nm item">
<h2 class="ttl" id="archiveRoomName">ChatRoomName</h2>
<span class="archive_chat_room">{{chatRoomName}}</span>
<button id="joinChatRoom">
<img src="icon/icon_join_room.png" alt="">
</button>
</div>
<div class="archive_detail_sv_user item">
<h2 class="ttl" id="archiveSaveUser">SaveUser</h2>
<div class="d-flex flex-row">
<div class="d-flex flex-column">
<img src="{{profileImage}}" alt="プロフィール画像" onclick="Namecard.makeNameCard({{userId}})">
<p>{{userName}}</p>
</div>
</div>
</div>
<div class="archive_detail_user_list item">
<h2 class="ttl" id="archiveAttendUser">AttendUser</h2>
<ul class="d-flex flex-row" id="attendUser">
</ul>
</div>
</div>
\ No newline at end of file
<li class="archive_user">
<img src="{{profileImage}}" alt="">
<p>{{userName}}</p>
</li>
\ No newline at end of file
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