Commit 60f2d2fd by Lee Munkyeong

Merge branch 'release_sp3' into 'features/#531_チャットルームキーボード表示'

# Conflicts:
#   public_new/js/chat.js
parents 9615d166 b95bf3fb
...@@ -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;
if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); 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;
if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); 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");
if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); 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;
if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); 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();
......
...@@ -220,8 +220,7 @@ input[name="tab_item"] { ...@@ -220,8 +220,7 @@ input[name="tab_item"] {
} }
.category_name { .category_name {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: scroll;
text-overflow: ellipsis;
width: 90%; width: 90%;
} }
.chat_list .category.open::after { .chat_list .category.open::after {
......
...@@ -691,7 +691,7 @@ CHAT_UI.showConfirmView = function(isInvite) { ...@@ -691,7 +691,7 @@ CHAT_UI.showConfirmView = function(isInvite) {
//todo android create room api //todo android create room api
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.createChatRoom("1",userIdList.join(','),newRoomName); android.createChatRoom("1", userIdList.join(','), newRoomName, makeRoomFlg.MAKE_ROOM);
} else { } else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName}); webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName});
} }
...@@ -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); 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();
}); });
...@@ -1530,7 +1534,7 @@ CHAT_UI.startChat = function(userShopMemberId,userName) { ...@@ -1530,7 +1534,7 @@ CHAT_UI.startChat = function(userShopMemberId,userName) {
// 参加ユーザ名でルーム名を生成 // 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName; let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName); android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName, makeRoomFlg.NAME_CARD);
} else { } else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": chatRoomType.DM, "userIdList": userIdList.join(','), "roomName": newRoomName}); webkit.messageHandlers.createChatRoom.postMessage({"roomType": chatRoomType.DM, "userIdList": userIdList.join(','), "roomName": newRoomName});
} }
...@@ -1543,6 +1547,9 @@ CHAT_UI.startVoice = function() { ...@@ -1543,6 +1547,9 @@ CHAT_UI.startVoice = function() {
CHAT_UI.makeNameCard = function(shopMemberId) { CHAT_UI.makeNameCard = function(shopMemberId) {
if (CHAT.globalLoginParameter.shopMemberId == shopMemberId) {
return;
}
var nameCardInfo = CHAT_DB.getNameCardData(shopMemberId); var nameCardInfo = CHAT_DB.getNameCardData(shopMemberId);
var namecardTemplate; var namecardTemplate;
$.get({ url: "./template/template_user_name_card.html", async: false } $.get({ url: "./template/template_user_name_card.html", async: false }
...@@ -2011,8 +2018,12 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -2011,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); 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("\'")
...@@ -2055,8 +2066,11 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -2055,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); 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});
}
} }
}); });
} }
...@@ -2197,6 +2211,7 @@ CHAT_UI.refreshForOnline = function() { ...@@ -2197,6 +2211,7 @@ CHAT_UI.refreshForOnline = function() {
$('#roomMenu').show(); $('#roomMenu').show();
$('.attach_file').show(); $('.attach_file').show();
$('.fa-download').show(); $('.fa-download').show();
$('.chat_room_footer').show();
if (typeof $('#roomTitle').val() != 'undefined') { if (typeof $('#roomTitle').val() != 'undefined') {
CHAT_SOCKET.connectSocket(); CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function() { socket.emit('join', CHAT.globalLoginParameter, function() {
...@@ -2213,4 +2228,5 @@ CHAT_UI.refreshForOffline = function() { ...@@ -2213,4 +2228,5 @@ CHAT_UI.refreshForOffline = function() {
$('#roomMenu').hide(); $('#roomMenu').hide();
$('.attach_file').hide(); $('.attach_file').hide();
$('.fa-download').hide(); $('.fa-download').hide();
$('.chat_room_footer').hide();
} }
\ No newline at end of file
...@@ -36,5 +36,10 @@ const nameCardAreaId = { ...@@ -36,5 +36,10 @@ const nameCardAreaId = {
USER : "userNamecard" USER : "userNamecard"
} }
const makeRoomFlg = {
NAME_CARD : 0,
MAKE_ROOM : 1
}
const messageSeperator = "<::split>"; const messageSeperator = "<::split>";
const dataMessageScheme = "::NOT_MESSAGE"; 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