Commit 254b1548 by Takatoshi Miura

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

# Conflicts:
#   public_new/js/chat-ui.js
parents 7575eeff dfe61f51
......@@ -197,7 +197,7 @@ CHAT_UI.setOrientation = function(isLandscapeMode) {
CHAT_UI.sendMessage = function(e) {
const messageTextBox = $('#messageInput');
const message = messageTextBox.val().length > 0 ? encodeURIComponent(messageTextBox.val() + " ") : "";
const message = messageTextBox.val().length > 0 ? encodeURIComponent(messageTextBox.val()) : "";
messageTextBox.val('');
if (message.length > 0) {
......@@ -1137,15 +1137,11 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
CHAT_UI.loadMessages = function(roomId, roomName) {
if (IS_ONLINE == 'true') {
CHAT_UI.refreshForOnline();
CHAT_SOCKET.connectSocket();
if (typeof(android) != "undefined") {
android.updateMessages(roomId);
} else {
webkit.messageHandlers.updateMessages.postMessage({roomId});
}
socket.emit('exitRoom',roomId);
socket.emit('joinRoom', roomId, roomName, function() {
});
} else {
CHAT_UI.refreshForOffline();
}
......@@ -2169,21 +2165,6 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
let obj = jQuery.parseHTML(html);
$('#favoriteListForMakeRoom').append(obj);
/*favoriteUserList.forEach(function(favoriteUser) {
favoriteUser.profileImagePath = CHAT.getProfileImgUrl(favoriteUser.profileUrl)
let html = Mustache.render(userTemplate, {
shopMemberId: favoriteUser.shopMemberId,
profileImage: favoriteUser.profileImagePath,
name: favoriteUser.shopMemberName,
isFavorite: true
});
let obj = $(jQuery.parseHTML(html)).on('click', function() {
});
$('#favoriteList').append(obj);
})*/
var myGroupList = CHAT_DB.getMyGroupUsersNotInRoom();
myGroupList.forEach(function(myGroup) {
......@@ -2218,8 +2199,7 @@ CHAT_UI.refreshForOnline = function() {
$('.fa-download').show();
if (typeof $('#roomTitle').val() != 'undefined') {
CHAT_SOCKET.connectSocket();
socket.emit('exitRoom',CHAT.globalLoginParameter.roomId);
socket.emit('joinRoom', CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.roomName, function() {
socket.emit('join', CHAT.globalLoginParameter, function() {
});
}
}
......
......@@ -242,38 +242,7 @@ getLoginParameter = function(sid, loginId, shopName, roomId = undefined, roomNam
languageCode = "en"
}
CHAT_UI.htmlElementTextInitialize(languageCode)
if (IS_ONLINE == 'true') {
socket.emit('join', loginParam, function(err) {
if (err) {
// #36174
$("#customAlertTitle").text(err);
$("#customAlertOk").text(getLocalizedString("yesTitle"));
$('#customAlert').appendTo("body").modal({
backdrop: 'static',
keyboard: false
})
.on('click', '#customAlertOk', function(e) {
});
} else {
if (loginParam.roomName != undefined && loginParam.roomName != "null") {
$('.titleRoomName').text(loginParam.roomName).data('roomName', loginParam.roomName);
} else {
// 設定されていたroomNameがない場合
let roomListTitle = getLocalizedString("roomListTitle")
$('.titleRoomName').text(roomListTitle).data('roomName', roomListTitle);
}
}
// loadingIndicatorを表示しない
CHAT_UI.dismissLoadingIndicator();
});
} else {
// loadingIndicatorを表示しない
CHAT_UI.dismissLoadingIndicator();
}
}
CHAT.leaveRoom = function() {
......
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