Commit 0b9baea9 by Lee Munkyeong

コードレビュー対応

parent 67e11f79
...@@ -705,4 +705,24 @@ a.article:hover { ...@@ -705,4 +705,24 @@ a.article:hover {
.chat-list-type-btn { .chat-list-type-btn {
width: 30%; width: 30%;
} }
\ No newline at end of file #my_info > div > div {
padding-left: 5%;
}
#favorite_list > div > div {
padding-left: 5%;
}
#my_group_list > div > div {
padding-left: 5%;
}
.contact-seperator {
width: 100%;
background-color: #095395!important;
color: white;
margin-bottom: 0px;
}
...@@ -234,15 +234,15 @@ ...@@ -234,15 +234,15 @@
</div> </div>
<div id="my_info" class="inbox_user row"> <div id="my_info" class="inbox_user row">
</div> </div>
<div class="collapsible-content">
<div id="favorite_list" class="inbox_user row"> <label class="contact-seperator" id="favorite-seperator">Favorite</label>
</div> <div id="favorite_list" class="inbox_user row">
</div> </div>
<div class="collapsible-content"> <label class="contact-seperator" id="mygroup-seperator">MY GROUP</label>
<div id="my_group_list" class="inbox_user row"> <div id="my_group_list" class="inbox_user row">
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -458,6 +458,28 @@ ...@@ -458,6 +458,28 @@
</div> </div>
</div> </div>
</script> </script>
<script id="favorite-user-template" type="text/template">
<div class="user_list col-12" data-name="{{name}}">
<div class="user_people">
<div class="user_img">
<img src="{{profileImage}}" alt="">
</div>
<div class="user_ib">
<h5>{{name}}</h5>
<p>{{info}}</p>
</div>
<div class="squareBox userCheckBox" data-name="{{name}}" data-id="{{id}}">
<div class="squareBoxContent">
<div>
<span>
<i class="fas fa-check"></i>
</span>
</div>
</div>
</div>
</div>
</div>
</script>
<script src="./socket.io/dist/socket.io.js"></script> <script src="./socket.io/dist/socket.io.js"></script>
<script src="./js/libs/socket.io.js"></script> <script src="./js/libs/socket.io.js"></script>
<script src="./js/libs/jquery-3.3.1.min.js"></script> <script src="./js/libs/jquery-3.3.1.min.js"></script>
......
var socket; var socket;
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl; CMS_SERVER_URL = cmsServerUrl;
PLATFORM = platform; PLATFORM = platform;
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
connectSocket(); connectSocket();
}; };
android.getGlobalParameter(); android.getGlobalParameter();
function connectSocket() { function connectSocket() {
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
console.log('isOnline');
socket = io(CHAT_SERVER_URL); socket = io(CHAT_SERVER_URL);
console.log('insOnline');
setSocketAction(); setSocketAction();
android.updateRoomList(); android.updateRoomList();
CHAT_UI.refreshRoomList("1"); CHAT_UI.refreshRoomList(chatRoomType.DM);
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
$('#createChatRoom').show(); $('#createChatRoom').show();
} else { } else {
console.log('insOffline'); console.log('isOffline');
//オフラインの場合、DBからルーム一覧を表示。 //オフラインの場合、DBからルーム一覧を表示。
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') CHAT_UI.refreshRoomList(chatRoomType.DM);
CHAT_UI.refreshRoomList("1");
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
$('#createChatRoom').show(); $('#createChatRoom').show();
} }
...@@ -400,7 +398,7 @@ function setSocketAction () { ...@@ -400,7 +398,7 @@ function setSocketAction () {
} else { } else {
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateRoomList(); android.updateRoomList();
CHAT_UI.refreshRoomList("1"); CHAT_UI.refreshRoomList(chatRoomType.DM);
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
} }
} }
......
...@@ -272,7 +272,7 @@ CHAT.leaveRoom = function() { ...@@ -272,7 +272,7 @@ CHAT.leaveRoom = function() {
CHAT.requestMyinfo = function() { CHAT.requestMyinfo = function() {
jQuery.ajax({ jQuery.ajax({
async: true, async: true,
url: CMS_SERVER_URL+"/chatapi/user?sid="+CHAT.globalLoginParameter.sid+"&cmd="+userAPICmd.MYINFO, url: CMS_SERVER_URL+"/chatapi/user?sid="+CHAT.globalLoginParameter.sid+"&cmd="+userAPICmd.MYINFO,
type: "get", type: "get",
processData: false, processData: false,
contentType: false contentType: false
......
...@@ -20,3 +20,8 @@ const messageType = { ...@@ -20,3 +20,8 @@ const messageType = {
const userAPICmd = { const userAPICmd = {
MYINFO : 9 MYINFO : 9
} }
const chatRoomType = {
DM : "1",
GROUP : "0"
}
...@@ -56,5 +56,7 @@ $.lang.en = { ...@@ -56,5 +56,7 @@ $.lang.en = {
"contactListTitle":"Contact", "contactListTitle":"Contact",
"contactSearch":"Contact search", "contactSearch":"Contact search",
"directMessageChatRoom":"DM", "directMessageChatRoom":"DM",
"favorite":"Favorite List",
"mygroup":"My Group",
"groupChatRoom":"Group" "groupChatRoom":"Group"
} }
...@@ -56,5 +56,7 @@ $.lang.ja = { ...@@ -56,5 +56,7 @@ $.lang.ja = {
"contactListTitle":"コンタクト", "contactListTitle":"コンタクト",
"contactSearch":"コンタクト検索", "contactSearch":"コンタクト検索",
"directMessageChatRoom":"DM", "directMessageChatRoom":"DM",
"favorite":"お気に入りリスト",
"mygroup":"マイグループ",
"groupChatRoom":"グループ" "groupChatRoom":"グループ"
} }
...@@ -56,5 +56,7 @@ $.lang.ko = { ...@@ -56,5 +56,7 @@ $.lang.ko = {
"contactListTitle":"연락처", "contactListTitle":"연락처",
"contactSearch":"연락처 검색", "contactSearch":"연락처 검색",
"directMessageChatRoom":"DM", "directMessageChatRoom":"DM",
"favorite":"즐겨찾기리스트",
"mygroup":"마이그룹",
"groupChatRoom":"그룹" "groupChatRoom":"그룹"
} }
...@@ -2,13 +2,13 @@ var coll = document.getElementsByClassName("collapsible"); ...@@ -2,13 +2,13 @@ var coll = document.getElementsByClassName("collapsible");
var i; var i;
for (i = 0; i < coll.length; i++) { for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() { coll[i].addEventListener("click", function() {
this.classList.toggle("collapsible-active"); this.classList.toggle("collapsible-active");
var content = this.nextElementSibling; var content = this.nextElementSibling;
if (content.style.display === "block") { if (content.style.display === "block") {
content.style.display = "none"; content.style.display = "none";
} else { } else {
content.style.display = "block"; content.style.display = "block";
} }
}); });
} }
\ No newline at end of file
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