Commit 5495c67d by Kang Donghun

Merge branch 'release_sp3' into features/release_sp3_collaboration_audio

# Conflicts:
#	public_new/js/chat-db.js
parents 085672d4 3bcc0e4d
...@@ -188,6 +188,7 @@ ...@@ -188,6 +188,7 @@
} else { } else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({}); webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({}); webkit.messageHandlers.getGlobalParameter.postMessage({});
webkit.messageHandlers.saveSelectedUserList.postMessage("");
} }
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
......
...@@ -191,6 +191,8 @@ ...@@ -191,6 +191,8 @@
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
} else { } else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
} }
...@@ -203,7 +205,7 @@ ...@@ -203,7 +205,7 @@
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg(); collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg); console.log(collaborationJoinFlg);
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg(); collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg); console.log(collaborationJoinFlg);
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg(); collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg); console.log(collaborationJoinFlg);
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg(); collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg); console.log(collaborationJoinFlg);
......
...@@ -867,12 +867,3 @@ input[name="tab_item"] { ...@@ -867,12 +867,3 @@ input[name="tab_item"] {
max-width: 75%; max-width: 75%;
} }
} }
/*************************** ネームカード *************************/
.prifile_name {
padding-top: 20px;
padding-bottom: 20px;
line-height: 1.2;
font-size: 16px;
margin-left: auto;
margin-right: auto;
}
\ No newline at end of file
...@@ -173,6 +173,10 @@ main { ...@@ -173,6 +173,10 @@ main {
.profile_modal .modal-header .profile_name { .profile_modal .modal-header .profile_name {
width: 100%; width: 100%;
text-align: center; text-align: center;
line-height: 1.2;
font-size: 16px;
margin-left: auto;
margin-right: auto;
} }
.modal-header { .modal-header {
width: 100%; width: 100%;
......
...@@ -4,8 +4,6 @@ var ARCHIVE_UI = {}; ...@@ -4,8 +4,6 @@ var ARCHIVE_UI = {};
$(function() { $(function() {
// アーカイブ検索 // アーカイブ検索
$('#archive .search_form input[type="search"]').keyup(function(e) { $('#archive .search_form input[type="search"]').keyup(function(e) {
var keyword = $('#archive .search_form input[type="search"]').val(); var keyword = $('#archive .search_form input[type="search"]').val();
if (e.KeyCode == 13 || e.key == "Enter") { if (e.KeyCode == 13 || e.key == "Enter") {
if (keyword.length != 0 && keyword != '') { if (keyword.length != 0 && keyword != '') {
...@@ -26,6 +24,14 @@ $(function() { ...@@ -26,6 +24,14 @@ $(function() {
} }
// 検索結果を表示 // 検索結果を表示
}); });
// iOSキーボード変換検知用
$('#archive .search_form input[type="search"]').on('compositionend', function() {
if (CHAT_UTIL.isIOS()) {
var keyword = $('#archive .search_form input[type="search"]').val();
$('.overlay_src_msg').empty();
ARCHIVE_UI.refreshSearchScreen(keyword);
}
});
}); });
ARCHIVE_UI.refreshSearchScreen = function(keyword) { ARCHIVE_UI.refreshSearchScreen = function(keyword) {
......
// 名前空間
var CHAT_ADD_USER = {};
$(function() { $(function() {
// メンバー検索 // メンバー検索
$('#chat_add_user .search_form input[type="search"]').click(function(e){ $('#chat_add_user .search_form input[type="search"]').click(function(e){
...@@ -7,20 +10,38 @@ $(function() { ...@@ -7,20 +10,38 @@ $(function() {
}) })
$('#chat_add_user .search_form input[type="search"]').keyup(function(e){ $('#chat_add_user .search_form input[type="search"]').keyup(function(e){
var keyword = $('#chat_add_user .search_form input[type="search"]').val();
if (e.key == "Enter" || e.KeyCode == 13) { if (e.key == "Enter" || e.KeyCode == 13) {
$('#chat_add_user .search_form input[type="search"]').blur(); if (keyword != '' && keyword.length != 0) {
$('#chat_add_user .search_form input[type="search"]').blur();
return false;
}
} else if (keyword == '' || keyword.length < 2) {
$('.overlay_src_msg').empty();
return false; return false;
} }
CHAT_ADD_USER.searchUser(keyword);
if (e.key == "Enter" || e.KeyCode == 13) {
$('#chat_add_user .search_form input[type="search"]').blur();
return;
}
});
// iOSキーボード変換検知用
$('#chat_add_user .search_form input[type="search"]').on('compositionend', function() {
if (CHAT_UTIL.isIOS()) {
var keyword = $('#chat_add_user .search_form input[type="search"]').val();
CHAT_ADD_USER.searchUser(keyword);
}
});
});
// ユーザー検索
CHAT_ADD_USER.searchUser = function(keyword) {
var isAllGroup = $('#tabAllGroupOnAddUser').is(':checked'); var isAllGroup = $('#tabAllGroupOnAddUser').is(':checked');
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
//全グループ検索画面 //全グループ検索画面
if (isAllGroup) { if (isAllGroup) {
var keyword = $('#chat_add_user .search_form input[type="search"]').val();
if (keyword == '') {
return;
}
//グループデータ検索 //グループデータ検索
var groupList = CHAT_DB.getGroupByName(keyword); var groupList = CHAT_DB.getGroupByName(keyword);
var groupTemplate; var groupTemplate;
...@@ -67,10 +88,6 @@ $(function() { ...@@ -67,10 +88,6 @@ $(function() {
} }
  //連絡先画面   //連絡先画面
} else { } else {
var keyword = $('#chat_add_user .search_form input[type="search"]').val();
if (keyword == '') {
return;
}
var userList = CHAT_DB.getMyGroupShopMemberNotInRoomByName(keyword); var userList = CHAT_DB.getMyGroupShopMemberNotInRoomByName(keyword);
var userTemplate; var userTemplate;
$.get({ url: "./template/template_make_room_user_list.html", async: false } $.get({ url: "./template/template_make_room_user_list.html", async: false }
...@@ -97,5 +114,4 @@ $(function() { ...@@ -97,5 +114,4 @@ $(function() {
$('.overlay_src_msg').append(noResultMsg); $('.overlay_src_msg').append(noResultMsg);
} }
} }
}); };
});
...@@ -329,4 +329,18 @@ CHAT_DB.getUserListByLoginId = function(loginIdList) { ...@@ -329,4 +329,18 @@ CHAT_DB.getUserListByLoginId = function(loginIdList) {
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.getUserListByLoginId(loginIdList.join(","))); return JSON.parse(android.getUserListByLoginId(loginIdList.join(",")));
} }
} }
\ No newline at end of file
CHAT_DB.getCollaborationJoinFlg = function() {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp("getCollaborationJoinFlg", {});
}
};
CHAT_DB.getUserInfoList = function(shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp("getUserInfoList", {"shopMemberId": shopMemberId});
}
};
...@@ -269,13 +269,14 @@ $('#video-form').on('submit', function(e) { ...@@ -269,13 +269,14 @@ $('#video-form').on('submit', function(e) {
var fd = new FormData($(this)[0]); var fd = new FormData($(this)[0]);
if(!file.type.includes("image")) { // video 保存 if(!file.type.includes("image")) { // video 保存
CHAT.createVideoThumbnailAndUpload(file, function(resizeFile, thumbnailCreated) { // CHAT.createVideoThumbnailAndUpload(file, function(resizeFile, thumbnailCreated) {
if(resizeFile && thumbnailCreated) { // if(resizeFile && thumbnailCreated) {
//ただ、画像の大きさが500pixel以下の場合はthumbnailは生成されない // //ただ、画像の大きさが500pixel以下の場合はthumbnailは生成されない
fd.append('thumb', resizeFile) // fd.append('thumb', resizeFile)
} // }
CHAT.uploadImage(fd); // CHAT.uploadImage(fd);
}) // })
CHAT.uploadImage(fd);
return; return;
} }
} }
...@@ -1302,8 +1303,15 @@ CHAT_UI.loadMessages = function(roomId, roomName) { ...@@ -1302,8 +1303,15 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
beforeDate = message.insertDate; beforeDate = message.insertDate;
if (message.messageType == messageType.COMMUNICATIONSTART || message.messageType == messageType.COMMUNICATIONEND) { if (message.messageType == messageType.COMMUNICATIONSTART || message.messageType == messageType.COMMUNICATIONEND) {
var collaborationInfo = JSON.parse(message.message); var collaborationInfo;
var userInCollaboration = JSON.parse(android.getUserInfoList(collaborationInfo.userList)); var userInCollaboration;
if (CHAT_UTIL.isIOS()) {
collaborationInfo = message.message;
userInCollaboration = JSON.parse(CHAT_DB.getUserInfoList(collaborationInfo.userList));
} else if (CHAT_UTIL.isAndroid()) {
collaborationInfo = JSON.parse(message.message);
userInCollaboration = JSON.parse(android.getUserInfoList(collaborationInfo.userList));
}
userInCollaboration.forEach(function(user) { userInCollaboration.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
...@@ -2459,7 +2467,7 @@ CHAT_UI.displayExistRoom = function(roomId) { ...@@ -2459,7 +2467,7 @@ CHAT_UI.displayExistRoom = function(roomId) {
CHAT_UI.joinCollaboration = function(collaborationType) { CHAT_UI.joinCollaboration = function(collaborationType) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS webkit.messageHandlers.joinCollaboration.postMessage(collaborationType);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.joinCollaboration(collaborationType); android.joinCollaboration(collaborationType);
} }
...@@ -2467,7 +2475,7 @@ CHAT_UI.joinCollaboration = function(collaborationType) { ...@@ -2467,7 +2475,7 @@ CHAT_UI.joinCollaboration = function(collaborationType) {
CHAT_UI.startCollaboration = function(collaborationType) { CHAT_UI.startCollaboration = function(collaborationType) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS webkit.messageHandlers.startCollaboration.postMessage(collaborationType);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.startCollaboration(collaborationType); android.startCollaboration(collaborationType);
} }
......
$(function() { // 名前空間
// メンバー検索 var CHAT_MAKE_ROOM = {};
$('#chatMakeRoom .search_form input[type="search"]').click(function(e) {
let contactListTitle = getLocalizedString("userSearch");
$('#makeRoomTitle').text(contactListTitle);
});
$('#chatMakeRoom .search_form input[type="search"]').keyup(function(e) { $(function() {
 //画面タイトル設定 // メンバー検索
var keyword = $('#chatMakeRoom .search_form input[type="search"]').val(); $('#chatMakeRoom .search_form input[type="search"]').click(function(e) {
if (e.KeyCode == 13 || e.key == "Enter") { let contactListTitle = getLocalizedString("userSearch");
if (keyword != '' && keyword.length != 0) { $('#makeRoomTitle').text(contactListTitle);
$('#chatMakeRoom .search_form input[type="search"]').blur(); });
$('#chatMakeRoom .search_form input[type="search"]').keyup(function(e) {
//画面タイトル設定
var keyword = $('#chatMakeRoom .search_form input[type="search"]').val();
if (e.KeyCode == 13 || e.key == "Enter") {
if (keyword != '' && keyword.length != 0) {
$('#chatMakeRoom .search_form input[type="search"]').blur();
return false;
}
} else if (keyword == '' || keyword.length < 2) {
$('.overlay_src_msg').empty();
return false; return false;
} }
} else if (keyword == '' || keyword.length < 2) { CHAT_MAKE_ROOM.searchUser(keyword);
$('.overlay_src_msg').empty(); if (e.key == "Enter" || e.KeyCode == 13) {
return false; $('#chatMakeRoom .search_form input[type="search"]').blur();
} return;
}
});
// iOSキーボード変換検知用
$('#chatMakeRoom .search_form input[type="search"]').on('compositionend', function() {
if (CHAT_UTIL.isIOS()) {
var keyword = $('#chatMakeRoom .search_form input[type="search"]').val();
CHAT_MAKE_ROOM.searchUser(keyword);
}
});
});
// メンバー検索
CHAT_MAKE_ROOM.searchUser = function(keyword) {
var isAllGroup = $('#tabAllGroupOnMakeRoom').is(':checked'); var isAllGroup = $('#tabAllGroupOnMakeRoom').is(':checked');
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
...@@ -95,11 +112,5 @@ $(function() { ...@@ -95,11 +112,5 @@ $(function() {
noResultMsg.append(getLocalizedString("noResult")) noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg); $('.overlay_src_msg').append(noResultMsg);
} }
} }
if (e.key == "Enter" || e.KeyCode == 13) { }
$('#chatMakeRoom .search_form input[type="search"]').blur();
return;
}
});
});
// 名前空間
var CONTACT = {};
$(function () { $(function () {
// メンバー検索 // メンバー検索
$('#contact .search_form input[type="search"]').keyup(function(e) { $('#contact .search_form input[type="search"]').keyup(function(e) {
var groupList;
var keyword = $('#contact .search_form input[type="search"]').val(); var keyword = $('#contact .search_form input[type="search"]').val();
if (e.key == "Enter" || e.KeyCode == 13) { if (e.key == "Enter" || e.KeyCode == 13) {
if (keyword != '' && keyword.length != 0) { if (keyword != '' && keyword.length != 0) {
...@@ -12,73 +14,87 @@ $(function () { ...@@ -12,73 +14,87 @@ $(function () {
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
return; return;
} }
$('.overlay_src_msg').empty(); CONTACT.searchUser(keyword);
var isAllGroup = $('#tabAllGroup').is(':checked'); if (e.key == "Enter" || e.KeyCode == 13) {
//全グループ検索画面 $('#contact .search_form input[type="search"]').blur();
if (isAllGroup) { return;
//グループデータ検索 }
groupList = CHAT_DB.getGroupByName(keyword); });
var groupTemplate; // iOSキーボード変換検知用
$.get({ url: "./template/template_group_list.html", async: false } $('#contact .search_form input[type="search"]').on('compositionend', function() {
, function(text) { if (CHAT_UTIL.isIOS()) {
groupTemplate = text; var keyword = $('#contact .search_form input[type="search"]').val();
}); CONTACT.searchUser(keyword);
}
});
});
groupList.forEach(function(group) { // ユーザー検索
let html = Mustache.render(groupTemplate, { CONTACT.searchUser = function(keyword) {
name: group.groupName, var groupList;
id: group.groupId, $('.overlay_src_msg').empty();
isFavorite: group.isFavorite var isAllGroup = $('#tabAllGroup').is(':checked');
});
let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj);
})
//ユーザデータ検索 //全グループ検索画面
var userList = CHAT_DB.getAllGroupShopMemberByName(keyword); if (isAllGroup) {
var userTemplate; //グループデータ検索
$.get({ url: "./template/template_user_list.html", async: false } groupList = CHAT_DB.getGroupByName(keyword);
, function(text) { var groupTemplate;
userTemplate = text; $.get({ url: "./template/template_group_list.html", async: false }
}); , function(text) {
userList.forEach(function(user) { groupTemplate = text;
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); });
});
let html = Mustache.render(userTemplate, { groupList.forEach(function(group) {
userList: userList let html = Mustache.render(groupTemplate, {
name: group.groupName,
id: group.groupId,
isFavorite: group.isFavorite
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj); $('.overlay_src_msg').append(obj);
if (userList.length == 0 && groupList.length == 0) { })
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult")) //ユーザデータ検索
$('.overlay_src_msg').append(noResultMsg); var userList = CHAT_DB.getAllGroupShopMemberByName(keyword);
} var userTemplate;
//連絡先画面 $.get({ url: "./template/template_user_list.html", async: false }
} else { , function(text) {
var userList = CHAT_DB.getMyGroupShopMemberByName(keyword); userTemplate = text;
var userTemplate; });
$.get({ url: "./template/template_user_list.html", async: false } userList.forEach(function(user) {
, function(text) { user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
userTemplate = text; });
}); let html = Mustache.render(userTemplate, {
userList.forEach(function(user) { userList: userList
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); });
}); let obj = jQuery.parseHTML(html);
let html = Mustache.render(userTemplate, { $('.overlay_src_msg').append(obj);
userList: userList if (userList.length == 0 && groupList.length == 0) {
}); const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
let obj = jQuery.parseHTML(html); noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').html(obj); $('.overlay_src_msg').append(noResultMsg);
if (userList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
} }
if (e.key == "Enter" || e.KeyCode == 13) { //連絡先画面
$('#contact .search_form input[type="search"]').blur(); } else {
return; var userList = CHAT_DB.getMyGroupShopMemberByName(keyword);
var userTemplate;
$.get({ url: "./template/template_user_list.html", async: false }
, function(text) {
userTemplate = text;
});
userList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
});
let html = Mustache.render(userTemplate, {
userList: userList
});
let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').html(obj);
if (userList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
} }
}); }
}); };
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<div class="prifile_desc d-flex flex-row"> <div class="profile_desc_ d-flex flex-row">
<img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/> <img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/>
<div class="prifile_name"><span>{{name}}</span></div> <div class="profile_name"><span>{{name}}</span></div>
</div> </div>
</div> </div>
<div class="modal-body" id="userNameCard-scroll"> <div class="modal-body" id="userNameCard-scroll">
......
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