Commit cdf37962 by Lee Munkyeong

コードレビュー対応。

parent a280f1c7
......@@ -101,7 +101,7 @@
<!-- ローディング -->
<!--#include virtual="loading.html" -->
<div id="loadingArea"></div>
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.js"></script>
<script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
......
......@@ -10,6 +10,7 @@
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/chat.css">
<link rel="stylesheet" href="./css/loading.css">
<link rel="stylesheet" href="./css/chat_room_footer.css">
<link rel="stylesheet" href="./css/font-awesome.css">
</head>
......@@ -203,9 +204,11 @@
let IS_MOBILE = true;
let IS_ONLINE = false;
$("#chatMenuModal").load("./modal_chat_menu.html");
$("#loadingArea").load("./loading.html");
android.getLoginParameter();
android.getGlobalParameter();
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
......
......@@ -54,7 +54,7 @@
<a href="#" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="thumbnail">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" onError="this.src='./img/noImage.png'" /></div>
</div>
</div>
......@@ -195,11 +195,6 @@
<div id="loadingArea"></div>
<div id="myProfileModal"></div>
<div id="userProfileModal"></div>
<div id="loader-bg">
<div id="loader">
<i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i>
</div>
</div>
<script src="./js/libs/jquery-3.3.1.min.js"></script>
<script src="./js/libs/moment.js"></script>
<script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
......@@ -230,6 +225,7 @@
let PLATFORM = '';
let IS_MOBILE = true;
let IS_ONLINE = false;
$("#loadingArea").load("./loading.html");
android.getLoginParameter();
android.getGlobalParameter();
......
......@@ -566,12 +566,12 @@ CHAT_UI.scrollToLastMarkedUnseen = function(value) {
//loadingIndicatorを表示
CHAT_UI.showLoadingIndicator = function() {
$("#loadingIndicator").addClass('active undismissable');
$('.loading-indicator').css('display', 'block');
}
//loadingIndicatorを表示しない
CHAT_UI.dismissLoadingIndicator = function() {
$("#loadingIndicator").removeClass('active undismissable');
$('.loading-indicator').css('display', 'none');
}
//画面の方向をcheck
......@@ -884,6 +884,7 @@ $('#chatButton').on('click', function(event) {
});
CHAT_UI.refreshContactScreen = function() {
CHAT_UI.showLoadingIndicator();
$(".modal-backdrop").remove();
$('#myProfileModal').html('');
$('#userProfileModal').html('');
......@@ -970,22 +971,6 @@ CHAT_UI.refreshContactScreen = function() {
let obj = jQuery.parseHTML(html);
$('#favoriteList').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.getMyGroupUsers();
myGroupList.forEach(function(myGroup) {
......@@ -1001,6 +986,7 @@ CHAT_UI.refreshContactScreen = function() {
$('#myGroupList').append(obj);
})
CHAT_UI.dismissLoadingIndicator();
}
CHAT_UI.refreshRoomList = function(roomType) {
......@@ -1176,7 +1162,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
// #36147
message.message = message.message.toString();
var replacePath = message.message;
replacePath = replacePath.replaceAll('?fileName=','?sid='+CHAT.globalLoginParameter.sid+'&fileName=');
replacePath = replacePath.replaceAll('?fileName=', '?sid=' + CHAT.globalLoginParameter.sid + '&fileName=');
message.message = replacePath;
/* if (message.message contain) {
}*/
......@@ -1247,35 +1233,44 @@ CHAT_UI.favoriteGroupChange = function(groupId, star) {
}
CHAT_UI.removeFavoriteUser = function(shopMemberId) {
CHAT_UI.showLoadingIndicator();
$('#userNameCard').modal('hide');
$('#myNameCard').modal('hide');
android.removeFavoriteUser(shopMemberId);
$('.shopmember_'+shopMemberId).removeClass('active');
$('.shopmember_'+shopMemberId).addClass('disable');
CHAT_UI.dismissLoadingIndicator();
};
CHAT_UI.insertFavoriteUser = function(shopMemberId) {
CHAT_UI.showLoadingIndicator();
$('#userNameCard').modal('hide');
$('#myNameCard').modal('hide');
android.addFavoriteUser(shopMemberId);
$('.shopmember_'+shopMemberId).removeClass('disable');
$('.shopmember_'+shopMemberId).addClass('active');
CHAT_UI.dismissLoadingIndicator();
};
CHAT_UI.removeFavoriteGroup = function(groupId) {
CHAT_UI.showLoadingIndicator();
android.removeFavoriteGroup(groupId);
$('.group_'+groupId).removeClass('active');
$('.group_'+groupId).addClass('disable');
CHAT_UI.dismissLoadingIndicator();
};
CHAT_UI.insertFavoriteGroup = function(groupId) {
CHAT_UI.showLoadingIndicator();
android.addFavoriteGroup(groupId);
$('.group_'+groupId).removeClass('disable');
$('.group_'+groupId).addClass('active');
CHAT_UI.dismissLoadingIndicator();
};
//全グループ検索画面表示。
CHAT_UI.refreshAllGroupSearch = function(groupId) {
CHAT_UI.showLoadingIndicator();
$('#userNameCard').modal('hide');
$('.cancel').addClass('none');
$('.search_form input').removeClass('focus');
......@@ -1366,6 +1361,7 @@ CHAT_UI.refreshAllGroupSearch = function(groupId) {
});
let obj = jQuery.parseHTML(html);
$('#userInGroupList').append(obj);
CHAT_UI.dismissLoadingIndicator();
}
......
......@@ -195,7 +195,7 @@ function setSocketAction () {
message.text = message.text
}
var replacePath = message.text;
replacePath = replacePath.replaceAll('?fileName=','?sid='+CHAT.globalLoginParameter.sid+'&fileName=');
replacePath = replacePath.replaceAll('?fileName=', '?sid=' + CHAT.globalLoginParameter.sid + '&fileName=');
message.text = replacePath;
let html = Mustache.render(template, {
text: message.text,
......
......@@ -335,9 +335,23 @@ $(function() {
$(this).toggleClass("filter");
});
$('#chat .search_form input[type="search"]').keyup(function(){
let roomListTitle = getLocalizedString("room_search_placeholder");
$('#chatTitle').text(roomListTitle);
});
$('#chat .search_form .cancel').click(function(){
let roomListTitle = getLocalizedString("roomListTitle");
$('#chatTitle').text(roomListTitle);
});
// チャットメンバー検索
$('#chat .search_form input[type="search"]').keyup(function(){
$('.overlay_src_msg').empty();
var keyword = $('#chat .search_form input[type="search"]').val();
if (keyword == '' || keyword.length < 2) {
return;
}
var rooms = CHAT_DB.getRoomList(chatRoomType.ALL, keyword);
let roomListTitle = getLocalizedString("room_search_placeholder");
$('#chatTitle').text(roomListTitle);
......
......@@ -4,14 +4,12 @@ $(function() {
$('#contact .search_form input[type="search"]').keyup(function(e){
var isAllGroup = $('#tabAllGroup').is(':checked');
$('.overlay_src_msg').empty();
var keyword = $('#contact .search_form input[type="search"]').val();
if (keyword == '' || keyword.length < 2) {
return;
}
//全グループ検索画面
if (isAllGroup) {
var keyword = $('#contact .search_form input[type="search"]').val();
if (keyword == '' || keyword.leght < 2) {
return;
}
//グループデータ検索
var groupList = CHAT_DB.getGroupByName(keyword);
var groupTemplate;
......
<div id="loader-bg">
<div id="loader">
<div id="loader-bg" class="loading-indicator">
<div id="loader" class="loading-indicator">
<i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i>
</div>
</div>
......@@ -2,7 +2,7 @@
<a href="#" class="w-100" onclick="CHAT_UI.joinRoom({{roomId}},'{{roomName}}');">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail{{thumbnailCount}} thubnail">
<div class="thumbnail{{thumbnailCount}} thumbnail">
{{#attendUsers}}
<div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/></div>
{{/attendUsers}}
......
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