Commit 715f095d by Lee Munkyeong

Merge branch 'develop' of gitlab.agentec.jp:abookCommunication/chat_webview into…

Merge branch 'develop' of gitlab.agentec.jp:abookCommunication/chat_webview into feature/photo_collaboration_piucture_select_button

# Conflicts:
#	public_new/js/share.js
parents cf1c8b9e 2fc3ca18
......@@ -28,7 +28,8 @@
<div class="collabo_nav_r">
<div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn add_user_btn"></button>
<button type="button" name="button" class="btn start_pip_btn" onclick="CHAT_UI.startPipMode();"></button>
<button type="button" name="button" class="btn menu_btn"></button>
<button type="button" name="button" class="btn start_pip_btn" onclick="startPipMode();"></button>
</div>
</div>
</div>
......@@ -116,6 +117,14 @@
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function startPipMode() {
if (typeof(android) != "undefined") {
android.startPipMode();
} else if (CHAT_UTIL.isAndroid()) {
}
}
async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
......
......@@ -4,7 +4,7 @@
<div class="menu_wrap">
<div class="menu d-flex flex-row flex-wrap">
<div class="item">
<a href="collaboration_picture.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_picture.png" alt="写真共有">
</div>
......@@ -12,7 +12,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_video.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('video');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_videocam.png" alt="動画共有">
</div>
......@@ -20,7 +20,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_documents.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('docs');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有">
</div>
......@@ -28,7 +28,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_whiteboard.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_whiteboard.png" alt="落書き">
</div>
......
......@@ -27,6 +27,7 @@
<div class="collabo_nav_r">
<div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn user_btn"></button>
<button type="button" name="button" class="btn menu_btn"></button>
<button type="button" name="button" class="btn add_user_btn none"></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> -->
</div>
......@@ -78,7 +79,7 @@
<button type="button" name="button" class="footer_menu_btn"></button>
<div class="footer_menu-wrap d-flex justify-content-around h-100">
<div class="d-flex align-items-center h-100">
<div class="footer_menu_item photo_select_button">
<div class="footer_menu_item photo_select_button host_contents">
<a href="#">
<div class="img_wrap bg_blue" id="photo_open_place_holder">
<img src="icon/icon_collabo_picture.png" alt="写真">
......
......@@ -4,7 +4,7 @@
<div class="menu_wrap">
<div class="menu d-flex flex-row flex-wrap">
<div class="item">
<a href="collaboration_voice.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('audio');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_headset.png" alt="音声共有">
</div>
......@@ -12,7 +12,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_video.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('video');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_videocam.png" alt="動画共有">
</div>
......@@ -20,7 +20,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_documents.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('docs');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有">
</div>
......@@ -28,7 +28,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_whiteboard.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_whiteboard.png" alt="落書き">
</div>
......
......@@ -27,6 +27,7 @@
<div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn user_btn"></button>
<button type="button" name="button" class="btn add_user_btn none"></button>
<button type="button" name="button" class="btn menu_btn"></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> -->
</div>
</div>
......
......@@ -4,7 +4,7 @@
<div class="menu_wrap">
<div class="menu d-flex flex-row flex-wrap">
<div class="item">
<a href="collaboration_voice.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('audio');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_headset.png" alt="音声共有">
</div>
......@@ -12,7 +12,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_picture.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_picture.png" alt="写真共有">
</div>
......@@ -20,7 +20,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_documents.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('docs');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有">
</div>
......@@ -28,7 +28,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_whiteboard.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_whiteboard.png" alt="落書き">
</div>
......
......@@ -28,6 +28,7 @@
<div class="collabo_nav_r">
<div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn add_user_btn none"></button>
<button type="button" name="button" class="btn menu_btn"></button>
<!--<button type="button" name="button" class="btn menu_btn"></button>-->
</div>
</div>
......
......@@ -4,7 +4,7 @@
<div class="menu_wrap">
<div class="menu d-flex flex-row flex-wrap">
<div class="item">
<a href="collaboration_picture.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_picture.png" alt="写真共有">
</div>
......@@ -12,7 +12,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_video.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('video');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_videocam.png" alt="動画共有">
</div>
......@@ -20,7 +20,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_documents.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('docs');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有">
</div>
......@@ -28,7 +28,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_whiteboard.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_whiteboard.png" alt="落書き">
</div>
......
......@@ -27,6 +27,7 @@
<div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn user_btn"></button>
<button type="button" name="button" class="btn add_user_btn none"></button>
<button type="button" name="button" class="btn menu_btn"></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> -->
</div>
</div>
......
......@@ -4,7 +4,7 @@
<div class="menu_wrap">
<div class="menu d-flex flex-row flex-wrap">
<div class="item">
<a href="collaboration_voice.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('audio');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_headset.png" alt="音声共有">
</div>
......@@ -12,7 +12,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_video.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('video');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_videocam.png" alt="動画共有">
</div>
......@@ -20,7 +20,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_picture.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('image');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_picture.png" alt="写真共有">
</div>
......@@ -28,7 +28,7 @@
</a>
</div>
<div class="item">
<a href="collaboration_documents.html" class="d-flex flex-column align-items-center">
<a href="javascript:coview_api.ChangeCollaboration('docs');" class="d-flex flex-column align-items-center">
<div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有">
</div>
......
......@@ -764,6 +764,11 @@ input[name="tab_item"] {
}
/**************************** modal *************************/
#menuModalCenter {
width: 70% !important;
margin-left: 15% !important;
}
/* メニューモーダル */
.modal-body #modal_image {
width: 100%;
......
......@@ -8,7 +8,7 @@
</div>
</a>
</div>
<div class="footer_item none">
<div class="footer_item none host_contents">
<a href="#">
<div class="img_wrap bg_gray" id="recordBtn">
<img src="icon/icon_record.png" alt="録音">
......
......@@ -1261,7 +1261,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
if (message.messageType == messageType.SYSTEM) {
template = systemMessageTemplate;
}
if (message.messageType == messageType.COMMUNICATIONSTART) {
if (message.messageType == messageType.COMMUNICATIONSTART || message.messageType == messageType.COMMUNICATIONEND) {
template = openCollaborationMessageTemplate;
}
let messageTime = CHAT_UTIL.formatDate(message.insertDate);
......@@ -1330,7 +1330,8 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime,
createdAtYear: message.insertDate.substring(0,4) + getLocalizedString('year') + ' ',
isOtherYear: isOtherYear
isOtherYear: isOtherYear,
isEnded: message.messageType == messageType.COMMUNICATIONEND ? true : false
});
html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html;
workVal = html + workVal;
......@@ -2780,12 +2781,6 @@ CHAT_UI.insertFavoriteUserInCollaboration = function(shopMemberId) {
CHAT_UI.dismissLoadingIndicator();
};
CHAT_UI.startPipMode() = function() {
if (CHAT_UTIL.isIOS()) {
} else if (CHAT_UTIL.isAndroid()) {
android.startPipMode();
}
}
CHAT_UI.confirmInviteUserListInCollaboration = function() {
var selectedUsers = CHAT_DB.loadSelectedUsers();
......
......@@ -201,6 +201,10 @@ function setSocketAction () {
type = text[1];
if (type == messageType.COMMUNICATIONSTART || type == messageType.COMMUNICATIONEND) {
collaborationType = text[2];
var meetingId = 0;
if (collaborationType == CHAT_UTIL.getCollaborationType(collaborationTypeKey.DOCUMENT)) {
meetingId = text[3];
}
var userInCollaboration;
if (CHAT_UTIL.isIOS()) {
userInCollaboration = JSON.parse(CHAT_DB.getUserInfoList(message.userId));
......@@ -218,6 +222,7 @@ function setSocketAction () {
insertDate: message.insertDate,
collaborationType: collaborationType,
isToday: true,
meetingId: meetingId,
createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime,
isOtherYear: false
......
......@@ -122,16 +122,17 @@ $(function () {
$('#captureBtn').click(function () {
$('#coviewCaptureCtrBtn').click();
})
$('#recordBtn').click(function () {
$('#coviewRecCtrBtn').click();
if ($('#recordBtn').hasClass('bg_gray')) {
$('#recordBtn').removeClass('bg_gray');
$('#recordBtn').addClass('bg_red');
} else {
$('#recordBtn').addClass('bg_gray');
$('#recordBtn').removeClass('bg_red');
}
})
})
$('#recordBtn').click(function () {
if ($('#recordBtn').hasClass('bg_gray')) {
MainManRecord('on');
$('#recordBtn').removeClass('bg_gray');
$('#recordBtn').addClass('bg_red');
} else {
MainManRecord('stop', CMS_SERVER_URL + '/chatapi/file/uploadArchive');
$('#recordBtn').addClass('bg_gray');
$('#recordBtn').removeClass('bg_red');
}
})
});
......@@ -254,6 +254,7 @@ $(function () {
break;
case "JoinRoomResponse":
if (json.resultCode == 200) {
hostSearchInterval();
for (let key in g_participants) {
loginIdList.push(key);
}
......@@ -309,15 +310,16 @@ function Coview_moveToVideoShareArea() {
function Coview_exitCollaboration(isDocument = false) {
if (isDocument) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.exitMeetingRoom.postMessage({});
webkit.messageHandlers.exitMeetingRoom.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom();
android.exitMeetingRoom();
}
}
clearInterval(timeInterval);
coview_api.LeaveRoom();
if (coview_api.getRoomUsers()) { android.finishCollaboration() };
isLeaved = true;
if (collaborationJoinFlg != "2") {
if (collaborationJoinFlg != '2') {
CHAT_UI.joinRoom(
CHAT.globalLoginParameter.roomId,
CHAT.globalLoginParameter.name
......@@ -338,7 +340,23 @@ function Coview_changeHost(userId) {
function Coview_addLoginId(loginId) {
console.log("addUser loginId = " + loginId);
coview_api.addUser(loginId);
var url = "https://livetaskyell.abookcloud.com/auth/getuser";
$.ajax({
url : url,
method : 'post',
data : {
id : loginId
},
success : function (result) {
console.log("result", result);
if (result.statusCode != 200) {
coview_api.addUser(loginId);
}
},
error : function (err) {
console.log(err.toString());
}
});
}
function Coview_connect_audio_collaboration() {
......@@ -350,30 +368,31 @@ function Coview_connect_audio_collaboration() {
}
function hostSearchInterval() {
let hostName = "";
function hostSearch() {
if (hostName != g_isMainManUsername) {
if (hostName != "") {
$("#collaboration_user_" + hostName).removeClass("host");
}
$("#collaboration_user_" + g_isMainManUsername).addClass("host");
hostName = g_isMainManUsername;
} else {
if (hostName == "") {
if (!$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).hasClass("host") && coview_api.getRoomUsers()) {
$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).addClass("host");
}
} else {
if (!$("#collaboration_user_" + hostName).hasClass('host')) {
$("#collaboration_user_" + hostName).addClass("host");
}
}
let hostName = "";
if (g_isMainMan) {
$('.host_contents').removeClass('none');
} else {
$('.host_contents').addClass('none');
}
function hostSearch() {
if (hostName != g_isMainManUsername) {
if (hostName != "") {
$("#collaboration_user_" + hostName).removeClass("host");
}
$("#collaboration_user_" + g_isMainManUsername).addClass("host");
hostName = g_isMainManUsername;
} else {
if (hostName == "") {
if (!$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).hasClass("host") && coview_api.getRoomUsers()) {
$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).addClass("host");
}
if (g_isMainMan) {
$(".photo_select_button").removeClass("none");
} else {
$(".photo_select_button").addClass("none");
} else {
if (!$("#collaboration_user_" + hostName).hasClass('host')) {
$("#collaboration_user_" + hostName).addClass("host");
}
}
}
timeInterval = setInterval(hostSearch, 3000);
}
timeInterval = setInterval(hostSearch, 3000);
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
<span>{{createdAtDay}}</span><span>{{createdAtTime}}</span>
{{/isToday}}
</div>
<div class="collabo_area">
<div class="collabo_area {{#isEnded}} disable {{/isEnded}}">
<div class="collabo_desc">
<div class="collabo_room_name d-flex flex-row">
<span>{{roomName}}</span>
......@@ -27,7 +27,7 @@
</div>
</div>
<div class="collabo_btn">
<button type="button" name="button" onclick="CHAT_UI.joinCollaboration({{collaborationType}}, {{meetingId}})">
<button type="button" name="button" onclick="CHAT_UI.joinCollaboration({{collaborationType}}, {{meetingId}})" {{#isEnded}} disabled {{/isEnded}}>
<img src="icon/icon_profile_phone.png" alt="通話">
<span>参加する</span>
</button>
......
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