Commit 17b5062e by Takatoshi Miura

コードレビュー対応(tab統一)

parent 23102b19
......@@ -1267,48 +1267,48 @@ CHAT_UI.refreshArchiveScreen = function() {
// アーカイブ一覧取得&表示
var archiveList = CHAT_DB.getArchiveList();
archiveList.forEach(function(archive) {
var typeImage = "";
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 = "";
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, {
fileName: archive.archiveName,
insertDate: archive.archiveDate,
typeImage: typeImage
fileName: archive.archiveName,
insertDate: archive.archiveDate,
typeImage: typeImage
});
let obj = $(jQuery.parseHTML(html)).on('click', function() {
// アーカイブ詳細画面へ遷移
$('#homeButton').hide();
$('.titleRoomName').show();
$('#pills-archive').hide();
$('#archive_detail').show();
$('#bottomNav').hide();
$("#backButton").show();
$('#backButton').off().on('click', function() {
// アーカイブ一覧に戻る
$('#homeButton').show();
$("#backButton").hide();
$('.titleRoomName').show();
$('#archive_detail').hide();
$('#pills-archive').show();
$('#bottomNav').show();
});
$('#homeButton').hide();
$('.titleRoomName').show();
$('#pills-archive').hide();
$('#archive_detail').show();
$('#bottomNav').hide();
$("#backButton").show();
$('#backButton').off().on('click', function() {
// アーカイブ一覧に戻る
$('#homeButton').show();
$("#backButton").hide();
$('.titleRoomName').show();
$('#archive_detail').hide();
$('#pills-archive').show();
$('#bottomNav').show();
});
// データの受け渡し
CHAT_UI.refreshArchiveDetailScreen(archive.archiveId);
});
......@@ -1345,14 +1345,14 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
var roomId = archive.roomId;
var roomInfo = CHAT_DB.getChatRoomInfo(roomId);
// アーカイブ情報を表示
let html = Mustache.render(archiveDetailTemplate, {
fileName: archive.archiveName,
insertDate: archive.archiveDate,
chatRoomName: roomInfo.chatRoomName,
profileImage: "",
userName: archive.userName
});
// アーカイブ情報を表示
let html = Mustache.render(archiveDetailTemplate, {
fileName: archive.archiveName,
insertDate: archive.archiveDate,
chatRoomName: roomInfo.chatRoomName,
profileImage: "",
userName: archive.userName
});
let obj = $(jQuery.parseHTML(html));
$('#archive_detail').append(obj);
......@@ -1366,7 +1366,7 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
break;
case 2: // 音声
$('#archive_player').prepend('<audio class="archive_audio_player" src=' + archive.archiveUrl + ' controls></audio>');
$('#archive_player').prepend('<img class="archive_player" src=' + "./images/capture.png" + ' </img>');
$('#archive_player').prepend('<img class="archive_player" src=' + "./images/capture.png" + '>');
break;
case 3: // 文書
// リリースに文書とその他は含めないため今回は非表示
......@@ -1396,14 +1396,14 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
CHAT_UI.htmlElementTextInitialize(navigator.language);
// チャットルームへのリンク付け
document.getElementById('joinChatRoom').onclick = function() {
socket.emit('joinRoom', roomId, roomInfo.chatRoomName, function () {
$('#archive_detail').html('');
$('#messages').html('');
$('.titleRoomName').text(roomInfo.chatRoomName).data('roomName', roomInfo.chatRoomName);
$('#pills-chat-tab').tab('show');
});
}
document.getElementById('joinChatRoom').onclick = function() {
socket.emit('joinRoom', roomId, roomInfo.chatRoomName, function () {
$('#archive_detail').html('');
$('#messages').html('');
$('.titleRoomName').text(roomInfo.chatRoomName).data('roomName', roomInfo.chatRoomName);
$('#pills-chat-tab').tab('show');
});
}
// loadingIndicatorを非表示
CHAT_UI.dismissLoadingIndicator();
......
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