Commit 2a599b1d by Kang Donghun

Merge branch 'origin/develop_group_search_UI' into origin/develop_createRoom_UI

parents ead1dbfb 91c019f7
......@@ -710,7 +710,7 @@ a.article:hover {
}
.chat-list-type-btn {
width: 30%;
width: 40%;
}
#my_info > div > div {
padding-left: 5%;
......@@ -772,6 +772,26 @@ a.article:hover {
#userInGroupList > div > div {
padding-left: 5%;
}
.group-navigater {
margin-right: 10px;
}
.namecard-action-area {
display: -webkit-box;
}
.namecard-action-btn {
text-align: center;
}
.name-chat {
background-color: yellow;
}
.name-voice {
background-color: green;
}
.name-favorite {
background-color: blue;
}
\ No newline at end of file
......@@ -407,7 +407,7 @@
</div>
</nav>
<script id="my-namecard-template" type="text/template">
<div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true"></i></div>
<div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true" onclick="CHAT_UI.hideNamecard('myNamecard');"></i></div>
<div class="namecard_img">
<img src="./images/user-profile.png" alt>
<div class="namedard-img-upload" >Upload</div>
......@@ -420,7 +420,7 @@
</div>
</script>
<script id="namecard-template" type="text/template">
<div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true"></i></div>
<div style="float: right;"><i class="fa fa-times my-name-card-close" aria-hidden="true" onclick="CHAT_UI.hideNamecard('userNamecard');"></i></div>
<div class="namecard_img">
<img src="./images/user-profile.png" alt>
<div class="namecard-login-id">{{name}}</div>
......@@ -430,10 +430,11 @@
<li><b>{{.}}</b></li>
{{/groupPathList}}
</div>
<div>
<div class="col-4">Chat</div>
<div class="col-4">Voice Call</div>
<div class="col-4">Favorite</div>
<div class="text-center">
<button type="button" class="btn btn-primary" id="nameCardChatBtn" onclick="CHAT_UI.startChat('{{loginId}}','{{name}}');">{{chat}}</button>
<button type="button" class="btn btn-primary" id="nameCardVoiceBtn" onclick="CHAT_UI.startVoice();">{{voice}}</button>
<button type="button" class="btn btn-primary" id="nameCardFavoriteBtn" onclick="CHAT_UI.changeFavorite();">{{favorite}}</button>
</div>
</script>
<script id="message-template" type="text/template">
......
......@@ -14,11 +14,14 @@ CHAT_DB.getRoomList = function(roomType) {
//ロカールDBからログインしたユーザのデータを取得する。
CHAT_DB.getMyInfo = function(input) {
var result = JSON.parse(android.getMyInfo());
CHAT.globalLoginParameter.shopMemberId = result.shopMemberId;
console.log(CHAT.globalLoginParameter.shopMemberId);
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyInfo());
return result;
}
};
......
......@@ -886,6 +886,9 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
$("#childGroupSeperator").text(getLocalizedString("childGroup"))
$("#groupUserSeperator").text(getLocalizedString("groupUser"))
$("#favorite-seperator").text(getLocalizedString("favorite"))
$("#mygroup-seperator").text(getLocalizedString("mygroup"))
}
......@@ -1130,7 +1133,10 @@ CHAT_UI.refreshContactScreen = function() {
loginId: groupUser.shopMemberId,
profileImage: groupUser.profileImagePath,
name: groupUser.shopMemberName,
groupPathList: groupUser.groupPathList
groupPathList: groupUser.groupPathList,
chat: getLocalizedString("chat"),
voice: getLocalizedString("voice"),
favorite: getLocalizedString("addFavorite")
});
console.log(namecardHtml);
let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function(){
......@@ -1364,15 +1370,6 @@ CHAT_UI.hideNamecard = function(id) {
$('#'+id).modal('hide');
}
$(document).click(function (e) {
console.log($(e.target));
if($(e.target).hasClass('my-name-card-close')){
console.log('hideNameCard');
CHAT_UI.hideNamecard('myNamecard');
CHAT_UI.hideNamecard('userNamecard');
}
});
CHAT_UI.showUserNamecard = function(shopMemberId) {
// $('#myNamecard').appendTo("body").modal({
......@@ -1473,3 +1470,24 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
$('#allGroupArea').show();
}
CHAT_UI.startChat = function (userShopMemberId,userName) {
CHAT_UI.showLoadingIndicator();
var userIdList = [];
userIdList.push(userShopMemberId);
// 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName;
android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName);
CHAT_UI.hideNamecard(nameCardAreaId.USER);
};
CHAT_UI.startVoice = function () {
//add Android Chat click
console.log("VoiceClick");
};
CHAT_UI.changeFavorite = function () {
//add Android Chat click
console.log("FavoriteClick");
};
......@@ -25,3 +25,8 @@ const chatRoomType = {
DM : "1",
GROUP : "0"
}
const nameCardAreaId = {
MY : "myNamecard",
USER : "userNamecard"
}
\ No newline at end of file
......@@ -66,5 +66,8 @@ $.lang.en = {
"quickBtn":"Quick Button",
"groupPath":"Group Path",
"childGroup":"Minor Group",
"groupUser":" Member List"
"groupUser":" Member List",
"chat":"Chat",
"voice":"Call",
"addFavorite":"Add Favorite"
}
......@@ -66,5 +66,8 @@ $.lang.ja = {
"quickBtn":"クイックボタン",
"groupPath":"グループパンクズ",
"childGroup":"下位グループ",
"groupUser":"所属ユーザ"
"groupUser":"所属ユーザ",
"chat":"チャット",
"voice":"通話",
"addFavorite":"お気に入り追加"
}
......@@ -66,5 +66,8 @@ $.lang.ko = {
"quickBtn":"퀵버튼",
"groupPath":"그룹 경로",
"childGroup":"하위 그룹",
"groupUser":"소속 사용자"
"groupUser":"소속 사용자",
"chat":"채팅",
"voice":"통화",
"addFavorite":"즐겨찾기추가"
}
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