Commit 17b5062e by Takatoshi Miura

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

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