Commit 139a0c52 by Takatoshi Miura

js連動

parent bf3ec123
...@@ -58,7 +58,7 @@ CHAT_DB.getMessages = function(roomId) { ...@@ -58,7 +58,7 @@ CHAT_DB.getMessages = function(roomId) {
CHAT_DB.getFavoriteUsersNotInRoom = function() { CHAT_DB.getFavoriteUsersNotInRoom = function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getFavoriteUsersNotInRoom", {}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteUsersNotInRoom()); return JSON.parse(android.getFavoriteUsersNotInRoom());
...@@ -103,7 +103,7 @@ CHAT_DB.getGroupInfo = function(groupId) { ...@@ -103,7 +103,7 @@ CHAT_DB.getGroupInfo = function(groupId) {
CHAT_DB.loadSelectedUsers = function() { CHAT_DB.loadSelectedUsers = function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getSelectedUserList", {}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
console.log(JSON.parse(android.getSelectedUserList())); console.log(JSON.parse(android.getSelectedUserList()));
...@@ -218,7 +218,7 @@ CHAT_DB.updateArchiveDetail = function(archiveId) { ...@@ -218,7 +218,7 @@ CHAT_DB.updateArchiveDetail = function(archiveId) {
CHAT_DB.searchMessages = function(keyword, userList) { CHAT_DB.searchMessages = function(keyword, userList) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
// TODO return JSON.parse(callNativeApp("searchMessages", {"keyWord": keyword, "userList": userList}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.searchMessages(keyword, userList)); return JSON.parse(android.searchMessages(keyword, userList));
} }
......
...@@ -1316,12 +1316,22 @@ $('#tabAllGroupOnMakeRoom').on('click', function(e) { ...@@ -1316,12 +1316,22 @@ $('#tabAllGroupOnMakeRoom').on('click', function(e) {
}); });
$('#makeRoomConfirmBtn').on('click', function(e) { $('#makeRoomConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(",")); if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList});
}
$('#makeRoomForm').submit(); $('#makeRoomForm').submit();
}); });
$('#addUserConfirmBtn').on('click', function(e) { $('#addUserConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(",")); if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList});
}
$('#addUserForm').submit(); $('#addUserForm').submit();
}); });
...@@ -1751,10 +1761,17 @@ CHAT_UI.refreshMyGroupForMakeRoom = function() { ...@@ -1751,10 +1761,17 @@ CHAT_UI.refreshMyGroupForMakeRoom = function() {
}); });
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo('0'); if (typeof(android) != "undefined") {
android.updateMyInfo(); android.updateGroupInfo('0');
android.updateGroupUser(); android.updateMyInfo();
android.updateFavorite(); android.updateGroupUser();
android.updateFavorite();
} else {
webkit.messageHandlers.updateGroupInfo.postMessage("0");
webkit.messageHandlers.updateMyInfo.postMessage({});
webkit.messageHandlers.updateGroupUser.postMessage({});
webkit.messageHandlers.updateFavorite.postMessage({});
}
} }
//お気に入りグループ取得。 //お気に入りグループ取得。
...@@ -2108,10 +2125,17 @@ CHAT_UI.refreshMyGroupForAddUser = function() { ...@@ -2108,10 +2125,17 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
}); });
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo('0'); if (typeof(android) != "undefined") {
android.updateMyInfo(); android.updateGroupInfo('0');
android.updateGroupUser(); android.updateMyInfo();
android.updateFavorite(); 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