Commit 50c56bc6 by Lee Munkyeong

DM,GROUP検索

parent eefa57f7
...@@ -701,4 +701,8 @@ a.article:hover { ...@@ -701,4 +701,8 @@ a.article:hover {
display: none; display: none;
overflow: hidden; overflow: hidden;
background-color: #f1f1f1; background-color: #f1f1f1;
}
.chat-list-type-btn {
width: 30%;
} }
\ No newline at end of file
...@@ -22,15 +22,7 @@ ...@@ -22,15 +22,7 @@
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
};
android.getGlobalParameter();
</script> </script>
</head> </head>
<body> <body>
...@@ -149,12 +141,17 @@ ...@@ -149,12 +141,17 @@
</div> </div>
<div class="tab-content" id="pills-tabContent"> <div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-chatlist" role="tabpanel" aria-labelledby="pills-chatlist-tab"> <div class="tab-pane fade show active" id="pills-chatlist" role="tabpanel" aria-labelledby="pills-chatlist-tab">
<div class="search-group"> <div class="search-group">
<div class="input-group search-bar-fixed"> <div class="input-group search-bar-fixed">
<input style="font-family:Arial, FontAwesome !important;" id="room-search" type="text" class="write_msg form-control" name="message" placeholder="&#xF002;" autocomplete="off"> <input style="font-family:Arial, FontAwesome !important;" id="room-search" type="text" class="write_msg form-control" name="message" placeholder="&#xF002;" autocomplete="off">
</div> </div>
</div> </div>
<div class="text-center">
<button type="button" class="btn btn-primary chat-list-type-btn" id="dmBtn">Ok</button>
<button type="button" class="btn btn-primary chat-list-type-btn" id="groupBtn">Ok</button>
</div>
<div class="inbox_people"> <div class="inbox_people">
<div id="room_list" class="inbox_chat row"> <div id="room_list" class="inbox_chat row">
</div> </div>
...@@ -163,6 +160,7 @@ ...@@ -163,6 +160,7 @@
</a> </a>
</div> </div>
</div> </div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab"> <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
... ...
</div> </div>
......
...@@ -3,12 +3,12 @@ var CHAT_DB = {}; ...@@ -3,12 +3,12 @@ var CHAT_DB = {};
//ロカールDBからルーム一覧情報を取得 //ロカールDBからルーム一覧情報を取得
CHAT_DB.getRoomList = function(input) { CHAT_DB.getRoomList = function(roomType) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 //TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getRoomList()); return JSON.parse(android.getRoomList(roomType));
} }
}; };
......
...@@ -133,7 +133,7 @@ $('#room-search').on('input', function(event) { ...@@ -133,7 +133,7 @@ $('#room-search').on('input', function(event) {
} else { } else {
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateRoomList(); android.updateRoomList();
CHAT_UI.refreshRoomList(); CHAT_UI.refreshRoomList("1");
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
} }
} }
...@@ -401,7 +401,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) { ...@@ -401,7 +401,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
android.updateRoomList(); android.updateRoomList();
}); });
} }
CHAT_UI.refreshRoomList(); CHAT_UI.refreshRoomList("1");
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
}); });
console.log("show #pills-chat") console.log("show #pills-chat")
...@@ -823,6 +823,9 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) { ...@@ -823,6 +823,9 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
$("#room-search").attr("placeholder",$("#room-search").attr("placeholder")+getLocalizedString("room_search_placeholder")); $("#room-search").attr("placeholder",$("#room-search").attr("placeholder")+getLocalizedString("room_search_placeholder"));
$("#userListKeyword").attr("placeholder", getLocalizedString("userSearch")) $("#userListKeyword").attr("placeholder", getLocalizedString("userSearch"))
$("#newRoomName").attr("placeholder", getLocalizedString("newRoomName")) $("#newRoomName").attr("placeholder", getLocalizedString("newRoomName"))
$("#dmBtn").text(getLocalizedString("directMessageChatRoom"))
$("#groupBtn").text(getLocalizedString("groupChatRoom"))
} }
// 画像の読み込みが全て終わったタイミングでコールバック実行 // 画像の読み込みが全て終わったタイミングでコールバック実行
...@@ -900,8 +903,8 @@ CHAT_UI.refreshContactScreen = function() { ...@@ -900,8 +903,8 @@ CHAT_UI.refreshContactScreen = function() {
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
} }
CHAT_UI.refreshRoomList = function() { CHAT_UI.refreshRoomList = function(roomType) {
var rooms = CHAT_DB.getRoomList(); var rooms = CHAT_DB.getRoomList(roomType);
CHAT.globalIsInvite = false; CHAT.globalIsInvite = false;
activeRoomId = null; activeRoomId = null;
// #36146に対応 // #36146に対応
...@@ -1061,4 +1064,13 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) { ...@@ -1061,4 +1064,13 @@ CHAT_UI.loadMessages = function(messages, roomId, roomName) {
// チャットに遷移する // チャットに遷移する
$('#pills-chat-tab').tab('show'); $('#pills-chat-tab').tab('show');
}; };
\ No newline at end of file
$('#dmBtn').on('click', function (e){
CHAT_UI.refreshRoomList("1");
});
$('#groupBtn').on('click', function (e){
CHAT_UI.refreshRoomList("0");
});
\ No newline at end of file
var socket; var socket;
connectSocket(IS_ONLINE);
function connectSocket(isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
console.log(isOnline) CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform;
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
connectSocket();
};
android.getGlobalParameter();
function connectSocket() {
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
if (isOnline == 'true') { if (IS_ONLINE == 'true') {
socket = io(CHAT_SERVER_URL); socket = io(CHAT_SERVER_URL);
console.log('insOnline'); console.log('insOnline');
setSocketAction(); setSocketAction();
android.updateRoomList(); android.updateRoomList();
CHAT_UI.refreshRoomList(); CHAT_UI.refreshRoomList("1");
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
$('#createChatRoom').show(); $('#createChatRoom').show();
} else { } else {
...@@ -18,12 +27,13 @@ function connectSocket(isOnline) { ...@@ -18,12 +27,13 @@ function connectSocket(isOnline) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOSの場合 //TODO IOSの場合
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
console.log('insAnd');
//$('.overlay').removeClass('active undismissable'); //$('.overlay').removeClass('active undismissable');
// loadingIndicatorを表示 // loadingIndicatorを表示
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
android.getLoginParameter(); android.getLoginParameter();
console.log('init') console.log('init')
CHAT_UI.refreshRoomList(); CHAT_UI.refreshRoomList("1");
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
$('#createChatRoom').show(); $('#createChatRoom').show();
} }
...@@ -388,9 +398,9 @@ function setSocketAction () { ...@@ -388,9 +398,9 @@ function setSocketAction () {
if (isInvite) { if (isInvite) {
$('#pills-chat-tab').tab('show'); $('#pills-chat-tab').tab('show');
} else { } else {
if (isOnline == 'true') { if (IS_ONLINE == 'true') {
android.updateRoomList(); android.updateRoomList();
CHAT_UI.refreshRoomList(); CHAT_UI.refreshRoomList("1");
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
} }
} }
......
...@@ -54,5 +54,7 @@ $.lang.en = { ...@@ -54,5 +54,7 @@ $.lang.en = {
"photo":"Photo", "photo":"Photo",
"video":"Video", "video":"Video",
"contactListTitle":"Contact", "contactListTitle":"Contact",
"contactSearch":"Contact search" "contactSearch":"Contact search",
"directMessageChatRoom":"DM",
"groupChatRoom":"Group"
} }
...@@ -54,5 +54,7 @@ $.lang.ja = { ...@@ -54,5 +54,7 @@ $.lang.ja = {
"photo":"写真", "photo":"写真",
"video":"動画", "video":"動画",
"contactListTitle":"コンタクト", "contactListTitle":"コンタクト",
"contactSearch":"コンタクト検索" "contactSearch":"コンタクト検索",
"directMessageChatRoom":"DM",
"groupChatRoom":"グループ"
} }
...@@ -54,5 +54,7 @@ $.lang.ko = { ...@@ -54,5 +54,7 @@ $.lang.ko = {
"photo":"사진", "photo":"사진",
"video":"동영상", "video":"동영상",
"contactListTitle":"연락처", "contactListTitle":"연락처",
"contactSearch":"연락처 검색" "contactSearch":"연락처 검색",
"directMessageChatRoom":"DM",
"groupChatRoom":"그룹"
} }
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