Commit 83c48a91 by Takatoshi Miura

Merge branch 'origin/#526_myInfo' into 'release_sp3'

Origin/#526 my info

See merge request !47
parents dfe61f51 254b1548
......@@ -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());
......@@ -103,7 +103,7 @@ CHAT_DB.getGroupInfo = function(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 +130,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 +148,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));
......@@ -218,7 +218,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 +226,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());
......
......@@ -909,6 +909,7 @@ CHAT_UI.refreshContactScreen = function() {
$('#userNameCard').modal('hide');
$('#favoriteList').html('');
$('#myGroupList').html('');
$('.my_info_sell').css('display','block');
//画面タイトル設定
let contactListTitle = getLocalizedString("contactListTitle");
$('#title').text(contactListTitle);
......@@ -1312,12 +1313,22 @@ $('#tabAllGroupOnMakeRoom').on('click', function(e) {
});
$('#makeRoomConfirmBtn').on('click', function(e) {
if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList});
}
$('#makeRoomForm').submit();
});
$('#addUserConfirmBtn').on('click', function(e) {
if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList});
}
$('#addUserForm').submit();
});
......@@ -1417,6 +1428,7 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
$('.overlay_src_msg').empty();
$('#contactSearch').attr('placeholder', getLocalizedString('searchUserAndGroup'));
$('#tabAllGroup').prop('checked', true);
$('.my_info_sell').css('display','none');
//オンライン状態であればサーバから情報更新。
if (IS_ONLINE == 'true') {
......@@ -1747,10 +1759,17 @@ CHAT_UI.refreshMyGroupForMakeRoom = function() {
});
if (IS_ONLINE == 'true') {
if (typeof(android) != "undefined") {
android.updateGroupInfo('0');
android.updateMyInfo();
android.updateGroupUser();
android.updateFavorite();
} else {
webkit.messageHandlers.updateGroupInfo.postMessage("0");
webkit.messageHandlers.updateMyInfo.postMessage({});
webkit.messageHandlers.updateGroupUser.postMessage({});
webkit.messageHandlers.updateFavorite.postMessage({});
}
}
//お気に入りグループ取得。
......@@ -2104,10 +2123,17 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
});
if (IS_ONLINE == 'true') {
if (typeof(android) != "undefined") {
android.updateGroupInfo('0');
android.updateMyInfo();
android.updateGroupUser();
android.updateFavorite();
} else {
webkit.messageHandlers.updateGroupInfo.postMessage("0");
webkit.messageHandlers.updateMyInfo.postMessage({});
webkit.messageHandlers.updateGroupUser.postMessage({});
webkit.messageHandlers.updateFavorite.postMessage({});
}
}
//お気に入りグループ取得。
......
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