Commit 65d67803 by Takatoshi Miura

アーカイブ単体テスト後修正

parent 7a493931
......@@ -761,18 +761,20 @@ a.article:hover {
}
.inbox_archive {
float: left;
overflow: hidden;
width: 100%;
}
#archive_list {
margin: 0;
padding: 5px 5px 5px;
overflow-y: scroll;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
height: calc(100vh - 200px);
}
.archive_data {
overflow:hidden;
overflow-y: scroll;
clear:both;
}
......@@ -783,8 +785,7 @@ a.article:hover {
}
.archive_img img {
height: auto;
max-height: 90px;
height: 80px;
}
.archive_ib {
......@@ -804,6 +805,10 @@ a.article:hover {
max-width: 100%;
}
.archive_file_name {
overflow-x: hidden;
}
.type_image {
text-align: center;
background-color: seagreen;
......@@ -856,6 +861,7 @@ a.article:hover {
.fileName, .insertDate, .chatRoomName, .saveUser, .joinUser {
padding: 10px;
padding-left: 10px;
display: inline;
}
......
......@@ -263,7 +263,7 @@
</div>
</div>
<div class="archive_detail" id="archive_detail">
<div id="archive_detail" class="archive_detail" >
</div>
<div class="tab-pane fade" id="pills-group" role="tabpanel" aria-labelledby="pills-group-tab">
......@@ -549,7 +549,7 @@
<span class="text-truncate col-2 {{type}}">{{archiveType}}</span>
</div>
</div>
<p class="text-truncate float-left">{{fileName}}</p>
<p class="archive_file_name text-truncate">{{fileName}}</p>
</div>
</div>
</div>
......
......@@ -101,3 +101,26 @@ CHAT_DB.updateArchiveDetail = function(archiveId) {
//TODO Android処理追加必要
}
};
CHAT_DB.getChatRoomInfo = function(roomId) {
if (CHAT_UTIL.isIOS()) {
// String形式をJsonに変更してReturn
webkit.messageHandlers.getChatRoomInfo.postMessage({roomId});
return JSON.parse(iosRoomInfo);
} else if (CHAT_UTIL.isAndroid()) {
//TODO Android処理追加必要
}
}
var iosRoomInfo;
CHAT_DB.getIosRoomInfo = function(roomInfo) {
iosRoomInfo = roomInfo;
};
CHAT_DB.updateChatRoomInfo = function(roomId) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateChatRoomInfo.postMessage({roomId});
} else if (CHAT_UTIL.isAndroid()) {
//TODO Android処理追加必要
}
};
......@@ -1251,25 +1251,25 @@ CHAT_UI.refreshArchiveScreen = function() {
var css = '';
switch(archive.archiveType) {
case 0:
archiveType = '画像';
archiveType = getLocalizedString("archiveTypeImage");
css = 'type_image';
break;
case 1:
archiveType = '動画';
archiveType = getLocalizedString("archiveTypeMovie");
css = 'type_movie';
break;
case 2:
archiveType = '音声';
archiveType = getLocalizedString("archiveTypeSound");
css = 'type_sound';
break;
case 3:
// 今回のリリースに文書とその他は含めないため非表示
archiveType = '文書';
archiveType = getLocalizedString("archiveTypeDocument");
css = 'type_document';
break;
default:
// 今回のリリースに文書とその他は含めないため非表示
archiveType = 'その他';
archiveType = getLocalizedString("archiveTypeOther");
css = 'type_other';
}
......@@ -1328,29 +1328,25 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
if (IS_ONLINE == 'true') {
CHAT_DB.updateArchiveDetail(archiveId);
}
// アーカイブ詳細取得&表示
// アーカイブ詳細取得
var archive = CHAT_DB.getArchiveDetail(archiveId);
// TODO チャットIDからルーム名を取得
// タイトル文字取得
let fileNameTitle = getLocalizedString("fileNameTitle");
let saveDateTitle = getLocalizedString("saveDateTitle");
let roomNameTitle = getLocalizedString("roomNameTitle");
let saveUserTitle = getLocalizedString("saveUserTitle");
let attendUserTitle = getLocalizedString("attendUserTitle");
// チャットルーム情報を取得
var roomId = archive.roomId;
var roomInfo = CHAT_DB.getChatRoomInfo(roomId);
// アーカイブ情報を表示
let html = Mustache.render(archiveDetailTemplate, {
fileNameTitle: fileNameTitle,
fileNameTitle: getLocalizedString("fileNameTitle"),
fileName: archive.archiveName,
saveDateTitle: saveDateTitle,
saveDateTitle: getLocalizedString("saveDateTitle"),
insertDate: archive.archiveDate,
roomNameTitle: roomNameTitle,
chatRoomName: "チャットルーム名",
saveUserTitle: saveUserTitle,
attendUserTitle: attendUserTitle
roomNameTitle: getLocalizedString("roomNameTitle"),
chatRoomName: roomInfo.chatRoomName,
saveUserTitle: getLocalizedString("saveUserTitle"),
attendUserTitle: getLocalizedString("attendUserTitle")
});
let obj = $(jQuery.parseHTML(html));
$('#archive_detail').append(obj);
......@@ -1376,13 +1372,10 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
// チャットルームへのリンク付け
document.getElementById('joinChatRoom').onclick = function() {
var roomId = archive.roomId;
// TODO
var roomName = "test3,test2";
socket.emit('joinRoom', roomId, roomName, function (){
socket.emit('joinRoom', roomId, roomInfo.chatRoomName, function (){
$('#archive_detail').html('');
$('#messages').html('');
$('.titleRoomName').text(roomName).data('roomName', roomName);
$('.titleRoomName').text(roomInfo.chatRoomName).data('roomName', roomInfo.chatRoomName);
$('#pills-chat-tab').tab('show');
});
}
......@@ -1391,23 +1384,25 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
const archiveUserTemplate = $('#archive-user-template').html();
// 保存ユーザ情報を表示
// TODO 保存ユーザリストを取得
saveUserList.forEach(function(archive) {
let saveUserList = archive.saveUserId;
saveUserList.forEach(function(user) {
// TODO ユーザIDからユーザ情報を取得
let html = Mustache.render(archiveUserTemplate, {
profileImage: "プロフィール画像",
userName: "ユーザ名"
});
let obj = $(jQuery.parseHTML(html)).on('click', function() {
//TODO ポップアップを出す処理
//TODO ネームカードのポップアップを出す処理
});
$('#save_user').append(obj);
})
// 参加ユーザ情報を表示
// TODO 保存ユーザリストを取得
joinUserList.forEach(function(archive) {
let attendUserList = archive.attendUserId;
attendUserList.forEach(function(user) {
// TODO ユーザIDからユーザ情報を取得
let html = Mustache.render(archiveUserTemplate, {
profileImage: "プロフィール画像",
userName: "ユーザ名"
......
......@@ -60,6 +60,11 @@ $.lang.en = {
"mygroup":"My Group",
"groupChatRoom":"Group",
"archiveListTitle":"Archive",
"archiveTypeImage":"Image",
"archiveTypeMovie":"Movie",
"archiveTypeSound":"Sound",
"archiveTypeDocument":"Document",
"archiveTypeOther":"Other",
"archiveDetailTitle":"Detail",
"fileNameTitle":"File Name",
"saveDateTitle":"Save Date",
......
......@@ -60,6 +60,11 @@ $.lang.ja = {
"mygroup":"マイグループ",
"groupChatRoom":"グループ",
"archiveListTitle":"アーカイブ",
"archiveTypeImage":"画像",
"archiveTypeMovie":"動画",
"archiveTypeSound":"音声",
"archiveTypeDocument":"文書",
"archiveTypeOther":"その他",
"archiveDetailTitle":"詳細",
"fileNameTitle":"ファイル名",
"saveDateTitle":"保存日",
......
......@@ -60,6 +60,11 @@ $.lang.ko = {
"mygroup":"마이그룹",
"groupChatRoom":"그룹",
"archiveListTitle":"아카이브",
"archiveTypeImage":"이미지",
"archiveTypeMovie":"동영상",
"archiveTypeSound":"음성",
"archiveTypeDocument":"문서",
"archiveTypeOther":"기타",
"archiveDetailTitle":"세부 묘사",
"fileNameTitle":"파일 이름",
"saveDateTitle":"저장 일",
......
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