Commit 65d67803 by Takatoshi Miura

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

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