Commit a8d13870 by Takatoshi Miura

Merge branch 'origin/develop_apply_design_archive' into 'release_sp3'

Origin/develop apply design archive

See merge request !7
parents 9ca6a036 17b5062e
......@@ -1274,132 +1274,157 @@ input:checked + .tab_class + .content_class {
/* --------------------------------------------------- */
/* Archive STYLE */
/* --------------------------------------------------- */
/**************************** archive list *************************/
.player {
background-color: black;
text-align : center;
}
.inbox_archive {
.archive_player {
width: auto;
max-width: 100%;
max-height: 50vh;
}
.archive_audio_player {
width: 100%;
}
#archive_list {
margin: 0;
padding: 5px 5px 5px;
.archive_list ul {
padding: 0;
overflow-y: scroll;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
height: calc(100vh - 200px);
height: calc(100vh - 195px);
}
.archive_data {
overflow-y: scroll;
clear: both;
.arhive_img .img_wrap {
width: 50px;
height: 50px;
border-radius: 50%;
text-align: center;
line-height: 46px;
}
.archive_img {
float: left;
.arhive_img img {
width: 40px;
height: 40px;
}
.archive_list ul li {
list-style: none;
border-bottom: 1px solid #e2e8f0;
position: relative;
}
.archive_row {
padding: 10px;
width: 20%;
color: #323743;
}
.archive_img img {
height: 80px;
.archive_row:hover {
background: aliceblue;
}
.archive_ib {
float: left;
padding: 15px;
width: 80%;
line-height: 1.8;
.bg_blue {
background: #0070ca;
}
.archive_date_font {
font: 1rem !important;
color:#464646;
.bg_green {
background: #4dca00;
}
.archive_date {
display: inline-flex;
max-width: 100%;
.bg_orange {
background: #ca6d00;
}
.archive_file_name {
overflow-x: hidden;
.archive_list ul li:first-child {
border-top: 1px solid #e2e8f0;
}
.type_image {
text-align: center;
background-color: seagreen;
color: white;
.archive_desc {
padding-left: 10px;
position: relative;
width: calc(100% - 100px);
overflow: hidden;
white-space: nowrap;
}
.type_movie {
text-align: center;
background-color: blue;
color: white;
.archive_date span {
color: #323743;
font-size: 14px;
}
.type_sound {
text-align: center;
background-color: orange;
color: white;
.archive_name span {
color: #323743;
font-size: 16px;
font-weight: 500;
}
.type_document {
/* 今回のリリースに文書とその他は含めないため非表示 */
display: none;
.archive_name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.type_other {
/* 今回のリリースに文書とその他は含めないため非表示 */
display: none;
/**************************** archive detail *************************/
.archive_detail .ttl {
font-size: 18px;
font-weight: bold;
}
.player {
background-color: black;
text-align : center;
.archive_detail .item {
margin-bottom: 20px;
}
.archive_player {
width: auto;
max-width: 100%;
max-height: 50vh;
.archive_detail .archive_detail_desc img, .attendUser img {
width: 80px;
height: 80px;
border-radius: 50%;
}
.archive_audio_player {
width: 100%;
.archive_detail .archive_detail_desc .archive_detail_user_list ul {
padding-left: 0;
overflow-x: scroll;
}
.archive_info {
overflow-y: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
height: calc(50vh - 50px);
.archive_detail .archive_detail_desc .archive_detail_user_list ul li {
list-style: none;
margin: 0 5px;
}
.fileName, .insertDate, .chatRoomName, .saveUser, .joinUser {
padding: 10px;
padding-left: 10px;
display: inline;
.archive_detail_desc {
margin: 0 10px;
}
.save_user_list, .join_user_list {
overflow-x: auto;
.archive_detail .archive_detail_desc .archive_detail_user_list span,
.archive_detail .archive_detail_desc .archive_detail_sv_user span {
text-align: center;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
overflow: hidden;
text-overflow: ellipsis;
width: 90px;
}
.archive_user {
display: inline-block;
width: 100px;
margin: 10px;
#joinChatRoom {
-webkit-appearance: none;
border: none;
width: 24px;
height: 24px;
padding: 0;
}
.archive_user img {
border-radius: 50%;
width: 100px;
height: 100px;
object-fit: cover;
#joinChatRoom img {
width: 24px;
height: 24px;
}
.archive_user p {
text-align: center;
overflow: hidden;
@media screen and (max-width: 768px) {
.archive_name {
font-size: 14px;
}
.archive_detail .ttl {
font-size: 16px;
}
.archive_detail_desc span {
font-size: 14px;
}
}
......@@ -388,20 +388,23 @@
</div>
<div class="tab-pane fade" id="pills-archive" role="tabpanel" aria-labelledby="pills-archive-tab">
<div class="inbox_archive">
<div class="heading_srch">
<div class="srch_bar">
<div class="stylish-input-group">
<input id="contactListKeyword" type="text" class="search-bar" placeholder="Search">
<span class="input-group-addon">
<button type="button"> <i class="fa fa-search" aria-hidden="true"></i> </button>
</span>
</div>
</div>
<main id="archive">
<div class="search_form">
<form>
<input type="search" name="search" placeholder="Search">
<span class="src_icon"></span>
<a href="#" class="cancel none" id="archiveCancel">Cancel</a>
</form>
</div>
<div class="archive_list content">
<ul id="archiveListUl">
</ul>
</div>
<div id="archive_list" class="inbox_archive row">
<div class="archive_list">
<ul class="overlay_src_msg">
</ul>
</div>
</div>
</main>
</div>
<div id="archive_detail" class="archive_detail" >
......@@ -757,59 +760,67 @@
</div>
</script>
<script id="archive-template" type="text/template">
<div class="archive_list col-12">
<div class="archive_data">
<div class="archive_img">
<img src={{thumbnailImage}} alt="">
</div>
<div class="archive_ib">
<div class="row">
<div class="archive_date_font col-10">
<span class="archive_date">{{insertDate}}</span>
<li class="d-flex align-items-center">
<div class="w-100 archive_row">
<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_type">
<span class="text-truncate col-2 {{type}}">{{archiveType}}</span>
<div class="archive_date">
<span>{{insertDate}}</span>
</div>
</div>
<p class="archive_file_name text-truncate">{{fileName}}</p>
</div>
</div>
</div>
</li>
</script>
<script id="archive-detail-template" type="text/template">
<div id="archive_player" class="player">
</div>
<ul class="archive_info">
<li class="fileName">
<h5>{{fileNameTitle}}</h5>
<p class="text-truncate">{{fileName}}</p>
</li>
<li class="insertDate">
<h5>{{saveDateTitle}}</h5>
<p class="text-truncate">{{insertDate}}</p>
</li>
<li class="chatRoomName">
<h5>{{roomNameTitle}}</h5>
<p class="text-truncate">{{chatRoomName}}
<input type="button" value=">" id="joinChatRoom">
</p>
</li>
<li class="saveUser">
<h5>{{saveUserTitle}}</h5>
<ul class="save_user_list" id="save_user">
</ul>
</li>
<li class="joinUser">
<h5>{{attendUserTitle}}</h5>
<ul class="join_user_list" id="join_user">
<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>{{chatRoomName}}</span>
<button id="joinChatRoom">
<img src="./icon/icon_archive_joinRoom.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="プロフィール画像">
<span>{{userName}}</span>
</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>
</li>
</ul>
</div>
</div>
</script>
<script id="archive-user-template" type="text/template">
<li class="archive_user">
<img src="{{profileImage}}" alt="">
<p>{{userName}}</p>
<li>
<div class="d-flex flex-column attendUser">
<img src="{{profileImage}}" alt="プロフィール画像">
<span>{{userName}}</span>
</div>
</li>
</script>
<script src="./socket.io/dist/socket.io.js"></script>
......
......@@ -892,6 +892,14 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
$("#collaborationAllGroup").text(getLocalizedString("collaborationAllGroup"))
$("#collaborationFavorite").text(getLocalizedString("collaborationFavorite"))
$("#coviewCapture").text(getLocalizedString("coviewCapture"))
$("#archiveCancel").text(getLocalizedString("archiveCancel"))
$("#archiveCancel").text(getLocalizedString("archiveCancel"))
$("#archiveFileName").text(getLocalizedString("archiveFileName"))
$("#archiveInsertDate").text(getLocalizedString("archiveInsertDate"))
$("#archiveRoomName").text(getLocalizedString("archiveRoomName"))
$("#archiveSaveUser").text(getLocalizedString("archiveSaveUser"))
$("#archiveAttendUser").text(getLocalizedString("archiveAttendUser"))
}
// 画像の読み込みが全て終わったタイミングでコールバック実行
......@@ -1246,7 +1254,7 @@ CHAT_UI.refreshArchiveScreen = function() {
$('.titleRoomName').text(archiveListTitle);
// 初期化
$('#archive_list').html('');
$('#archiveListUl').html('');
$('#pills-archive-tab').tab('show');
// アーカイブの様式を読み込む
......@@ -1258,50 +1266,39 @@ CHAT_UI.refreshArchiveScreen = function() {
// アーカイブ一覧取得&表示
var archiveList = CHAT_DB.getArchiveList();
archiveList.forEach(function(archive) {
var archiveType = '';
var css = '';
var typeImage = "";
switch(archive.archiveType) {
case 0:
archiveType = getLocalizedString("archiveTypeImage");
css = 'type_image';
case 0: // 画像
typeImage = "./icon/icon_collabo_picture.png";
break;
case 1:
archiveType = getLocalizedString("archiveTypeMovie");
css = 'type_movie';
case 1: // 動画
typeImage = "./icon/icon_collabo_videocam.png";
break;
case 2:
archiveType = getLocalizedString("archiveTypeSound");
css = 'type_sound';
case 2: // 音声
typeImage = "./icon/icon_collabo_headset.png";
break;
case 3:
// 今回のリリースに文書とその他は含めないため非表示
archiveType = getLocalizedString("archiveTypeDocument");
css = 'type_document';
case 3: // 文書
typeImage = "./icon/icon_collabo_document.png";
break;
default:
// 今回のリリースに文書とその他は含めないため非表示
archiveType = getLocalizedString("archiveTypeOther");
css = 'type_other';
default: // その他
typeImage = "";
}
let html = Mustache.render(archiveTemplate, {
id: archive.archiveId,
fileName: archive.archiveName,
thumbnailImage: archive.archiveUrl,
insertDate: archive.archiveDate,
archiveType: archiveType,
archiveTypeCSS: css
typeImage: typeImage
});
let obj = $(jQuery.parseHTML(html)).on('click', function() {
// アーカイブ詳細画面へ遷移
$('#homeButton').hide();
$('.titleRoomName').show();
$('#archive_list').hide();
$('#pills-archive').hide();
$('#archive_detail').show();
$('#bottomNav').hide();
$("#backButton").show();
$('#backButton').off().on('click', function() {
// アーカイブ一覧に戻る
......@@ -1309,16 +1306,15 @@ CHAT_UI.refreshArchiveScreen = function() {
$("#backButton").hide();
$('.titleRoomName').show();
$('#archive_detail').hide();
$('#archive_list').show();
$('#pills-archive').show();
$('#bottomNav').show();
});
// データの受け渡し
CHAT_UI.refreshArchiveDetailScreen(archive.archiveId);
});
$('#archive_list').append(obj);
$('.archive_list').css('border-bottom', '1px solid #c4c4c4');
})
$('#archiveListUl').append(obj);
});
// loadingIndicatorを非表示
CHAT_UI.dismissLoadingIndicator();
......@@ -1341,7 +1337,6 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
if (IS_ONLINE == 'true') {
CHAT_DB.updateArchiveDetail(archiveId);
}
// アーカイブ詳細取得
var archive = CHAT_DB.getArchiveDetail(archiveId);
......@@ -1350,17 +1345,14 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
var roomId = archive.roomId;
var roomInfo = CHAT_DB.getChatRoomInfo(roomId);
// アーカイブ情報を表示
let html = Mustache.render(archiveDetailTemplate, {
fileNameTitle: getLocalizedString("fileNameTitle"),
// アーカイブ情報を表示
let html = Mustache.render(archiveDetailTemplate, {
fileName: archive.archiveName,
saveDateTitle: getLocalizedString("saveDateTitle"),
insertDate: archive.archiveDate,
roomNameTitle: getLocalizedString("roomNameTitle"),
chatRoomName: roomInfo.chatRoomName,
saveUserTitle: getLocalizedString("saveUserTitle"),
attendUserTitle: getLocalizedString("attendUserTitle")
});
insertDate: archive.archiveDate,
chatRoomName: roomInfo.chatRoomName,
profileImage: "",
userName: archive.userName
});
let obj = $(jQuery.parseHTML(html));
$('#archive_detail').append(obj);
......@@ -1374,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=' + "https://via.placeholder.com/1280x720" + ' </img>');
$('#archive_player').prepend('<img class="archive_player" src=' + "./images/capture.png" + '>');
break;
case 3: // 文書
// リリースに文書とその他は含めないため今回は非表示
......@@ -1383,35 +1375,9 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
// リリースに文書とその他は含めないため今回は非表示
}
// チャットルームへのリンク付け
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');
});
}
// ユーザの様式を読み込む
const archiveUserTemplate = $('#archive-user-template').html();
// 保存ユーザ情報を表示
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 ネームカードのポップアップを出す処理
});
$('#save_user').append(obj);
})
// 参加ユーザ情報を表示
let attendUserList = archive.attendUserId;
attendUserList.forEach(function(user) {
......@@ -1425,8 +1391,19 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
//TODO ポップアップを出す処理
});
$('#save_user').append(obj);
$('#attendUser').append(obj);
})
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');
});
}
// loadingIndicatorを非表示
CHAT_UI.dismissLoadingIndicator();
......
......@@ -76,15 +76,11 @@ $.lang.en = {
"collaborationAllGroup":"All Group",
"coviewCapture":"Capture",
"archiveListTitle":"Archive",
"archiveTypeImage":"Image",
"archiveTypeMovie":"Movie",
"archiveTypeSound":"Sound",
"archiveTypeDocument":"Document",
"archiveTypeOther":"Other",
"archiveDetailTitle":"Detail",
"fileNameTitle":"File Name",
"saveDateTitle":"Save Date",
"roomNameTitle":"ChatRoom Name",
"saveUserTitle":"Save User",
"attendUserTitle":"Attend User"
"archiveCancel":"Cancel",
"archiveFileName":"File Name",
"archiveInsertDate":"Insert Date",
"archiveRoomName":"ChatRoom Name",
"archiveSaveUser":"Save User",
"archiveAttendUser":"Attend User"
}
......@@ -76,15 +76,11 @@ $.lang.ja = {
"collaborationAllGroup":"全グループ",
"coviewCapture":"キャプチャ",
"archiveListTitle":"アーカイブ",
"archiveTypeImage":"画像",
"archiveTypeMovie":"動画",
"archiveTypeSound":"音声",
"archiveTypeDocument":"文書",
"archiveTypeOther":"その他",
"archiveDetailTitle":"詳細",
"fileNameTitle":"ファイル名",
"saveDateTitle":"保存日",
"roomNameTitle":"チャットルーム名",
"saveUserTitle":"保存ユーザー",
"attendUserTitle":"参加ユーザー"
"archiveCancel":"キャンセル",
"archiveFileName":"ファイル名",
"archiveInsertDate":"保存日",
"archiveRoomName":"チャットルーム名",
"archiveSaveUser":"保存ユーザー",
"archiveAttendUser":"参加ユーザー"
}
......@@ -76,15 +76,11 @@ $.lang.ko = {
"collaborationAllGroup":"전체그룹",
"coviewCapture":"캡처",
"archiveListTitle":"아카이브",
"archiveTypeImage":"이미지",
"archiveTypeMovie":"동영상",
"archiveTypeSound":"음성",
"archiveTypeDocument":"문서",
"archiveTypeOther":"기타",
"archiveDetailTitle":"세부 묘사",
"fileNameTitle":"파일 이름",
"saveDateTitle":"저장 일",
"roomNameTitle":"대화방 이름",
"saveUserTitle":"저장 사용자",
"attendUserTitle":"참여 사용자"
"archiveCancel":"취소",
"archiveFileName":"파일 이름",
"archiveInsertDate":"저장 일",
"archiveRoomName":"대화방 이름",
"archiveSaveUser":"저장 사용자",
"archiveAttendUser":"참여 사용자"
}
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