Commit 6638f5dd by Lee Munkyeong

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

Merge branch 'release_sp3' of gitlab.agentec.jp:abookCommunication/chat_webview into features/release_sp3_collaboration_picture

# Conflicts:
#	public_new/js/constant.js
parents fbb06052 5b59f0d6
......@@ -30,7 +30,7 @@
<div class="col-4 pr-0">
<div class="nav-item">
<div class="nav_prev">
<a href="#"><span>ホーム</span></a>
<a href="#" class="home_btn"><span>ホーム</span></a>
</div>
</div>
</div>
......
......@@ -198,6 +198,8 @@
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
......
......@@ -53,10 +53,10 @@
<!-- タブ -->
<div class="content tabs">
<input id="tabMyGroupOnMakeRoom" type="radio" name="tab_item" checked>
<label class="tab_item" for="tabMyGroupOnMakeRoom">マイグループ</label>
<input id="tabAllGroupOnMakeRoom" type="radio" name="tab_item">
<label class="tab_item" for="tabAllGroupOnMakeRoom">全グループ</label>
<input id="tabMyGroupOnAddUser" type="radio" name="tab_item" checked>
<label class="tab_item" for="tabMyGroupOnAddUser">マイグループ</label>
<input id="tabAllGroupOnAddUser" type="radio" name="tab_item">
<label class="tab_item" for="tabAllGroupOnAddUser">全グループ</label>
<div class="tab_content" id="tab1_content">
<div class="chat_list">
<!-- お気に入りグループ -->
......@@ -154,8 +154,14 @@
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
android.getLoginParameter();
android.getGlobalParameter();
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
......
......@@ -85,8 +85,13 @@
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
android.getLoginParameter();
android.getGlobalParameter();
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
......
......@@ -86,8 +86,13 @@
let IS_ONLINE = false;
let roomId = 0;
$("#loadingArea").load("./loading.html");
android.getLoginParameter();
android.getGlobalParameter();
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
......
......@@ -91,8 +91,14 @@
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
android.getLoginParameter();
android.getGlobalParameter();
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
......
......@@ -22,9 +22,9 @@
<nav>
<div class="chat_room_src_form none">
<div class="d-flex flex-row h-100 align-items-center">
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" id="searchMessage" placeholder="メッセージ検索">
<span class="src_icon"></span>
<a href="#" class="cancel">キャンセル</a>
<a href="#" class="cancel" id="messageSearchCancle">キャンセル</a>
</div>
</div>
<div class="row nav_item_wrap h-100 align-items-center">
......@@ -58,7 +58,7 @@
<!-- フィルター -->
<div id="filter" class="user_list filter d-flex flex-row none"></div>
<div class="chat_list">
<div class="chat_list none" id="searchList">
<ul class="overlay_src_msg">
</ul>
</div>
......
......@@ -56,31 +56,30 @@
<input id="tabAllGroup" type="radio" name="tab_item">
<label class="tab_item" for="tabAllGroup">全グループ</label>
<div class="content chat_list my_info_sell">
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<a href="#" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" onError="this.src='./img/noImage.png'" /></div>
<!-- タブ -->
<div class="tab_content" id="tab1_content">
<div class="content chat_list my_info_sell">
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<a href="#" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center" style="background: none !important;">
<div class="chat_item_l">
<div class="thumbnail">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" onError="this.src='./img/noImage.png'" /></div>
</div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl" id="myName"></span>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl" id="myName"></span>
</div>
</div>
</div>
</div>
</div>
</a>
</li>
</ul>
</div>
<!-- タブ -->
<div class="tab_content" id="tab1_content">
</a>
</li>
</ul>
</div>
<div class="chat_list" id="myContactList">
<!-- お気に入りグループ -->
<div class="category"><div class="category_name"><span>お気に入り</span></div></div>
......@@ -204,6 +203,7 @@
let IS_MOBILE = true;
let IS_ONLINE = false;
$("#loadingArea").load("./loading.html");
if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
......
......@@ -41,6 +41,11 @@ input[name="tab_item"] {
display: block;
}
#tabMyGroupOnAddUser:checked ~ #tab1_content,
#tabAllGroupOnAddUser:checked ~ #tab2_content{
display: block;
}
#tabMyGroup:checked ~ #tab1_content,
#tabAllGroup:checked ~ #tab2_content{
display: block;
......@@ -94,6 +99,10 @@ input[name="tab_item"] {
right: 0px;
}
#searchList {
margin-bottom: 140px;
overflow: hidden;
}
/* リスト */
.chat_list .chat_item:hover {
background: aliceblue;
......@@ -205,7 +214,10 @@ input[name="tab_item"] {
.already_read {
background-color: #f1f2f2;
}
/* ダウンロードボタン*/
.fa-download {
width: 100%;
}
/**************************** make room *************************/
.chat_list .category {
text-align: left;
......@@ -220,8 +232,7 @@ input[name="tab_item"] {
}
.category_name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
overflow: scroll;
width: 90%;
}
.chat_list .category.open::after {
......
......@@ -16,4 +16,5 @@
}
.my_info_sell {
clear: both;
display: block;
}
......@@ -58,7 +58,7 @@ CHAT_DB.getMessages = function(roomId) {
CHAT_DB.getFavoriteUsersNotInRoom = function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
return JSON.parse(callNativeApp("getFavoriteUsersNotInRoom", {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteUsersNotInRoom());
......@@ -101,9 +101,18 @@ CHAT_DB.getGroupInfo = function(groupId) {
}
};
CHAT_DB.getGroupInfoForAddUser = function(groupId) {
if (CHAT_UTIL.isIOS()) {
//TODO getGroupInfoの処理でユーザ情報にルーム参加者が入ってない処理。
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupInfoForAddUser(groupId));
}
};
CHAT_DB.loadSelectedUsers = function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
return JSON.parse(callNativeApp("getSelectedUserList", {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
console.log(JSON.parse(android.getSelectedUserList()));
......@@ -130,7 +139,7 @@ CHAT_DB.getMyGroupShopMemberByName = function(shopMemberName) {
CHAT_DB.getMyGroupShopMemberNotInRoomByName = function(shopMemberName) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
return JSON.parse(callNativeApp("getMyGroupShopMemberNotInRoomByName", {"shopMemberName": shopMemberName}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupShopMemberNotInRoomByName(shopMemberName));
......@@ -148,7 +157,7 @@ CHAT_DB.getAllGroupShopMemberByName = function(shopMemberName) {
CHAT_DB.getAllGroupShopMemberNotInRoomByName = function(shopMemberName) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
return JSON.parse(callNativeApp("getAllGroupShopMemberNotInRoomByName", {"shopMemberName": shopMemberName}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getAllGroupShopMemberNotInRoomByName(shopMemberName));
......@@ -210,7 +219,7 @@ CHAT_DB.getArchiveDetail = function(archiveId) {
CHAT_DB.updateArchiveDetail = function(archiveId) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateArchiveDetail.postMessage({archiveId});
webkit.messageHandlers.updateArchiveDetail.postMessage(archiveId);
} else if (CHAT_UTIL.isAndroid()) {
android.updateArchiveDetail(archiveId);
}
......@@ -218,7 +227,7 @@ CHAT_DB.updateArchiveDetail = function(archiveId) {
CHAT_DB.searchMessages = function(keyword, userList) {
if (CHAT_UTIL.isIOS()) {
// TODO
return JSON.parse(callNativeApp("searchMessages", {"keyWord": keyword, "userList": userList}));
} else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.searchMessages(keyword, userList));
}
......@@ -226,7 +235,7 @@ CHAT_DB.searchMessages = function(keyword, userList) {
CHAT_DB.getMyGroupUsersNotInRoom = function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
return JSON.parse(callNativeApp("getMyGroupUsersNotInRoom", {}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupUsersNotInRoom());
......@@ -235,9 +244,59 @@ CHAT_DB.getMyGroupUsersNotInRoom = function() {
CHAT_DB.getUserInfo = function(shopMemberId) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
return JSON.parse(callNativeApp("getUserInfo", {"shopMemberId": shopMemberId}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getUserInfo(shopMemberId));
}
}
\ No newline at end of file
};
CHAT_DB.getBeforeRoomType = function() {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp("getBeforeRoomType", {});
}
};
CHAT_DB.getRoomType = function() {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp("getRoomType", {});
}
};
CHAT_DB.removeFavoriteUser = function(shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp("removeFavoriteUser", {"shopMemberId": shopMemberId});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.addFavoriteUser = function(shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp("addFavoriteUser", {"shopMemberId": shopMemberId});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.addFavoriteGroup = function(groupId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp("addFavoriteGroup", {"groupId": groupId});
if (result == "true") {
return true;
} else {
return false;
}
}
};
\ No newline at end of file
jQuery('#homeButton').on('click', function() {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要。
webkit.messageHandlers.goHome.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.goHome();
}
......
......@@ -15,7 +15,7 @@ $('#roomNameChangeBtn').click(function() {
//TODO validation
var changeRoomName = $('#roomNameInput').val();
if (CHAT_UTIL.isIOS()) {
//TODO
webkit.messageHandlers.changeRoomName.postMessage(changeRoomName);
} else if (CHAT_UTIL.isAndroid()) {
android.changeRoomName(changeRoomName);
}
......
......@@ -293,6 +293,10 @@ $(function() {
// フィルタ表示
$('#filter').removeClass('none');
$('#user_list').addClass('none');
$('.chat_room_src_form input[type="search"]').focus();
$('#searchMessage').addClass('onfocus');
$('.chat_list').removeClass('none');
});
$('.chat_room_src_form .cancel').click(function(){
$('.nav_item_wrap').removeClass('none');
......@@ -303,10 +307,28 @@ $(function() {
// ユーザーリスト表示
$('#filter').addClass('none');
$('#user_list').removeClass('none');
$('.chat_room_src_form input[type="search"]').blur();
$('#searchMessage').removeClass('onfocus');
$('.chat_list').addClass('none');
});
$('.chat_room_src_form input[type="search"]').click(function() {
if($('#searchMessage').hasClass('onfocus')) {
$('#searchMessage').removeClass('onfocus');
$('#searchMessage').blur();
} else {
$('#searchMessage').addClass('onfocus');
$('#searchMessage').focus();
}
})
$('#searchMessage').blur(function() {
$('#searchMessage').removeClass('onfocus');
})
// フィルタ選択イベント
$('#filter .img_wrap').click(function(){
$(document).on('click', '#filter .img_wrap', function(event) {
// チェックアイコン追加
$(this).toggleClass("filter");
});
......@@ -494,12 +516,13 @@ $(function() {
jQueryMessages.append(noResultMsg);
}
if (e.key == "Enter" || e.KeyCode == 13) {
$('#contact .search_form input[type="search"]').blur();
$('#searchMessage').removeClass('onfocus');
$('.chat_room_src_form input[type="search"]').blur();
return;
}
});
$('.filter_img').on('click', function() {
$(document).on('click', '.filter_img', function(event) {
let workVal = "";
var keyword = $('.chat_room_src_form input[type="search"]').val();
$('.overlay_src_msg').empty();
......
......@@ -5,7 +5,11 @@ $('.category').on('click', function() {
});
$('.home_btn').on('click', function() {
android.goHome();
if (CHAT_UTIL.isAndroid()) {
android.goHome();
} else if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.goHome.postMessage({});
}
});
$(function() {
var h = $(window).height(); //画面の高さを取得
......@@ -42,7 +46,7 @@ $(function() {
$('.craeteRoomButton').removeClass('none');
});
$('.message_input_form').click(function(){
$('.message_input_form').on('focus',function(e){
$('.message_input_send').removeClass('none');
$('.attach_file').addClass('none');
$('.footer_content_b').addClass('none');
......@@ -51,9 +55,10 @@ $(function() {
$('.message_input_form').on('focusout',function(e){
if($(e.relatedTarget).hasClass('message_input_send')){
CHAT_UI.sendMessage();
} else {
$('.message_input_send').addClass('none');
$('.attach_file').removeClass('none');
$('.footer_content_b').removeClass('none');
}
$('.message_input_send').addClass('none');
$('.attach_file').removeClass('none');
$('.footer_content_b').removeClass('none');
});
});
......@@ -43,5 +43,10 @@ const collaborationTypeKey = {
VIDEO : "video"
}
const makeRoomFlg = {
NAME_CARD : 0,
MAKE_ROOM : 1
}
const messageSeperator = "<::split>";
const dataMessageScheme = "::NOT_MESSAGE";
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