Commit 862e02b5 by Takatoshi Miura

js連携

parent 4aee10e4
......@@ -784,7 +784,11 @@ CHAT_UI.showConfirmView = function(isInvite) {
// ルーム名のtrimmingした後、URIencodingを行う
const encodedRoomName = encodeURIComponent(trimmedRoomName);
android.createChatRoom("1",userIdList.join(','),encodedRoomName);
if (typeof(android) != "undefined") {
android.createChatRoom("1",userIdList.join(','),encodedRoomName);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": encodedRoomName});
}
}
}
......@@ -1317,7 +1321,7 @@ $('#makeRoomConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList});
webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
}
$('#makeRoomForm').submit();
});
......@@ -1327,7 +1331,7 @@ $('#addUserConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList});
webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
}
$('#addUserForm').submit();
});
......@@ -2011,7 +2015,11 @@ CHAT_UI.showMakeRoomConfirmView = function() {
// 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(',');
android.createChatRoom("1",userIdList.join(','),newRoomName);
if (typeof(android) != "undefined") {
android.createChatRoom("1",userIdList.join(','),newRoomName);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName});
}
} else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@")
|| trimmedRoomName.includes('&') || trimmedRoomName.includes('=') || trimmedRoomName.includes("+") || trimmedRoomName.includes('$') || trimmedRoomName.includes(",") || trimmedRoomName.includes('-')
......@@ -2055,7 +2063,11 @@ CHAT_UI.showMakeRoomConfirmView = function() {
// ルーム名のtrimmingした後、URIencodingを行う
const encodedRoomName = encodeURIComponent(trimmedRoomName);
android.createChatRoom("1",userIdList.join(','),encodedRoomName);
if (typeof(android) != "undefined") {
android.createChatRoom("1",userIdList.join(','),encodedRoomName);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": encodedRoomName});
}
}
});
......
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