Commit 1d31b4bf by Takatoshi Miura

Merge branch 'features/#525' into 'release_sp3'

[iOS] ユーザー表示

See merge request !57
parents e65f703a 541d030a
...@@ -198,6 +198,8 @@ ...@@ -198,6 +198,8 @@
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
} else { } else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
} }
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
......
...@@ -154,8 +154,14 @@ ...@@ -154,8 +154,14 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; 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) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -85,8 +85,13 @@ ...@@ -85,8 +85,13 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
android.getLoginParameter(); if (typeof(android) != "undefined") {
android.getGlobalParameter(); android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -86,8 +86,13 @@ ...@@ -86,8 +86,13 @@
let IS_ONLINE = false; let IS_ONLINE = false;
let roomId = 0; let roomId = 0;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
android.getLoginParameter(); if (typeof(android) != "undefined") {
android.getGlobalParameter(); android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -91,8 +91,14 @@ ...@@ -91,8 +91,14 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; 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) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -204,6 +204,7 @@ ...@@ -204,6 +204,7 @@
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
......
...@@ -784,8 +784,12 @@ CHAT_UI.showConfirmView = function(isInvite) { ...@@ -784,8 +784,12 @@ CHAT_UI.showConfirmView = function(isInvite) {
// ルーム名のtrimmingした後、URIencodingを行う // ルーム名のtrimmingした後、URIencodingを行う
const encodedRoomName = encodeURIComponent(trimmedRoomName); const encodedRoomName = encodeURIComponent(trimmedRoomName);
android.createChatRoom("1", userIdList.join(','), encodedRoomName, makeRoomFlg.MAKE_ROOM); if (typeof(android) != "undefined") {
android.createChatRoom("1", userIdList.join(','), encodedRoomName, makeRoomFlg.MAKE_ROOM);
} else {
//TODO
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": encodedRoomName});
}
} }
} }
} }
...@@ -1140,7 +1144,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) { ...@@ -1140,7 +1144,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.updateMessages(roomId); android.updateMessages(roomId);
} else { } else {
webkit.messageHandlers.updateMessages.postMessage({roomId}); webkit.messageHandlers.updateMessages.postMessage(roomId);
} }
} else { } else {
CHAT_UI.refreshForOffline(); CHAT_UI.refreshForOffline();
...@@ -1317,7 +1321,7 @@ $('#makeRoomConfirmBtn').on('click', function(e) { ...@@ -1317,7 +1321,7 @@ $('#makeRoomConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(",")); android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else { } else {
var userList = CHAT.globalSelectedUserList.join(","); var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList}); webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
} }
$('#makeRoomForm').submit(); $('#makeRoomForm').submit();
}); });
...@@ -1327,7 +1331,7 @@ $('#addUserConfirmBtn').on('click', function(e) { ...@@ -1327,7 +1331,7 @@ $('#addUserConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(",")); android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else { } else {
var userList = CHAT.globalSelectedUserList.join(","); var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage({userList}); webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
} }
$('#addUserForm').submit(); $('#addUserForm').submit();
}); });
...@@ -2014,8 +2018,12 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -2014,8 +2018,12 @@ CHAT_UI.showMakeRoomConfirmView = function() {
// 参加ユーザ名でルーム名を生成 // 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(','); let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(',');
android.createChatRoom("1", userIdList.join(','), newRoomName, makeRoomFlg.MAKE_ROOM); if (typeof(android) != "undefined") {
android.createChatRoom("1", userIdList.join(','), newRoomName, makeRoomFlg.MAKE_ROOM);
} else {
//TODO
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName});
}
} else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@") } else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@")
|| trimmedRoomName.includes('&') || trimmedRoomName.includes('=') || trimmedRoomName.includes("+") || trimmedRoomName.includes('$') || trimmedRoomName.includes(",") || trimmedRoomName.includes('-') || trimmedRoomName.includes('&') || trimmedRoomName.includes('=') || trimmedRoomName.includes("+") || trimmedRoomName.includes('$') || trimmedRoomName.includes(",") || trimmedRoomName.includes('-')
|| trimmedRoomName.includes('_') || trimmedRoomName.includes('.') || trimmedRoomName.includes('!') || trimmedRoomName.includes('~') || trimmedRoomName.includes('*') || trimmedRoomName.includes("\'") || trimmedRoomName.includes('_') || trimmedRoomName.includes('.') || trimmedRoomName.includes('!') || trimmedRoomName.includes('~') || trimmedRoomName.includes('*') || trimmedRoomName.includes("\'")
...@@ -2058,8 +2066,11 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -2058,8 +2066,11 @@ CHAT_UI.showMakeRoomConfirmView = function() {
// ルーム名のtrimmingした後、URIencodingを行う // ルーム名のtrimmingした後、URIencodingを行う
const encodedRoomName = encodeURIComponent(trimmedRoomName); const encodedRoomName = encodeURIComponent(trimmedRoomName);
android.createChatRoom("1", userIdList.join(','), encodedRoomName, makeRoomFlg.MAKE_ROOM); if (typeof(android) != "undefined") {
android.createChatRoom("1", userIdList.join(','), encodedRoomName, makeRoomFlg.MAKE_ROOM);
} 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