Commit c9a4a037 by Lee Munkyeong

UI適用

parent 5aeec968
...@@ -71,186 +71,20 @@ ...@@ -71,186 +71,20 @@
</ul> </ul>
</div> </div>
<!-- タブ --> <!-- タブ -->
<div class="content tabs"> <div class="content tabs">
<input id="tab1" type="radio" name="tab_item" checked> <input id="tabMyGroup" type="radio" name="tab_item" checked>
<label class="tab_item" for="tab1">マイグループ</label> <label class="tab_item" for="tabMyGroup">マイグループ</label>
<input id="tab2" type="radio" name="tab_item"> <input id="tabAllGroup" type="radio" name="tab_item">
<label class="tab_item" for="tab2">全グループ</label> <label class="tab_item" for="tabAllGroup">全グループ</label>
<div class="tab_content" id="tab1_content"> <div class="tab_content" id="tab1_content">
<div class="chat_list"> <div class="chat_list" id="myContactList">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
<div class="category"><div class="category_name"><span>お気に入り</span></div></div> <div class="category"><div class="category_name"><span>お気に入り</span></div></div>
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center"> <div id="favoriteList"></div>
<a href="chat_room.html" class="w-100"> <div id="myGroupList"></div>
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<img src="icon/icon_folder.png" alt="フォルダ" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">グループ名グループ名グループ名グループ名グループ名グループ名グループ名グループ名グループ名グループ名</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="img/thumbnail.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">名前太郎名前太郎名前太郎名前太郎名前太郎名前太郎名前太郎名前太郎</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="img/thumbnail.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">名前 太郎</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
</ul>
<!-- マイグループ -->
<div class="category"><div class="category_name"><span>マイグループ 本社 > 経理部</span></div></div>
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="img/thumbnail.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">名前 太郎</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="img/thumbnail.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">名前 太郎</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
</ul>
<!-- マイグループ -->
<div class="category"><div class="category_name"><span>マイグループマイグループマイグループマイグループマイグループマイグループ2</span></div> </div>
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="img/thumbnail.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">名前 太郎</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="img/thumbnail.png" alt="サムネイル画像" /></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">名前 太郎</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
</ul>
</div> </div>
</div> </div>
<div class="tab_content" id="tab2_content"> <div class="tab_content" id="tab2_content">
...@@ -263,7 +97,7 @@ ...@@ -263,7 +97,7 @@
<!-- 全グループ --> <!-- 全グループ -->
<ul class="p-0 chat_make_room_list"> <ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100"> <a href="#" class="w-100" id="rootGroupBtn">
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l"> <div class="chat_item_l">
<div class="thubnail"> <div class="thubnail">
...@@ -279,14 +113,14 @@ ...@@ -279,14 +113,14 @@
</div> </div>
</div> </div>
</a> </a>
<div class="chat_item_r"> <!--<div class="chat_item_r">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star disable"></span> <span class="star disable"></span>
</div> </div>
</div> </div>-->
</li> </li>
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100"> <a href="#" class="w-100" id="parentGroupBtn">
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l"> <div class="chat_item_l">
<div class="thubnail"> <div class="thubnail">
...@@ -302,12 +136,13 @@ ...@@ -302,12 +136,13 @@
</div> </div>
</div> </div>
</a> </a>
<div class="chat_item_r"> <!--<div class="chat_item_r">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star disable"></span> <span class="star disable"></span>
</div> </div>
</div> </div>-->
</li> </li>
<div id="childGroupListArea">
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100"> <a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
...@@ -331,6 +166,7 @@ ...@@ -331,6 +166,7 @@
</div> </div>
</div> </div>
</li> </li>
</div>
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100"> <a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
......
...@@ -37,6 +37,11 @@ input[name="tab_item"] { ...@@ -37,6 +37,11 @@ input[name="tab_item"] {
display: block; display: block;
} }
#tabMyGroup:checked ~ #tab1_content,
#tabAllGroup:checked ~ #tab2_content{
display: block;
}
.tabs input:checked + .tab_item { .tabs input:checked + .tab_item {
background-color: #0070CA; background-color: #0070CA;
color: #fff; color: #fff;
......
...@@ -56,6 +56,7 @@ CHAT_DB.getMyGroupUsers = function() { ...@@ -56,6 +56,7 @@ CHAT_DB.getMyGroupUsers = function() {
//TODO IOS処理追加必要 //TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
console.log(JSON.parse(android.getMyGroupUsers()));
return JSON.parse(android.getMyGroupUsers()); return JSON.parse(android.getMyGroupUsers());
} }
}; };
......
...@@ -838,12 +838,12 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) { ...@@ -838,12 +838,12 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
$("#myGroupBtn").text(getLocalizedString("myGroup")) $("#myGroupBtn").text(getLocalizedString("myGroup"))
$("#allGroupBtn").text(getLocalizedString("allGroup")) $("#allGroupBtn").text(getLocalizedString("allGroup"))
$("#groupPathSeperator").text(getLocalizedString("groupPath")) //$("#groupPathSeperator").text(getLocalizedString("groupPath"))
$("#moveBtnSeperator").text(getLocalizedString("quickBtn")) //$("#moveBtnSeperator").text(getLocalizedString("quickBtn"))
$("#rootGroupBtn").text(getLocalizedString("returnToRootGroup")) //$("#rootGroupBtn").text(getLocalizedString("returnToRootGroup"))
$("#parentGroupBtn").text(getLocalizedString("returnToParentGroup")) //$("#parentGroupBtn").text(getLocalizedString("returnToParentGroup"))
$("#childGroupSeperator").text(getLocalizedString("childGroup")) //$("#childGroupSeperator").text(getLocalizedString("childGroup"))
$("#groupUserSeperator").text(getLocalizedString("groupUser")) //$("#groupUserSeperator").text(getLocalizedString("groupUser"))
...@@ -883,9 +883,11 @@ $('#chatButton').on('click', function(event){ ...@@ -883,9 +883,11 @@ $('#chatButton').on('click', function(event){
}); });
CHAT_UI.refreshContactScreen = function() { CHAT_UI.refreshContactScreen = function() {
$(".modal-backdrop").remove();
$('#myProfileModal').html(''); $('#myProfileModal').html('');
$('#userProfileModal').html(''); $('#userProfileModal').html('');
$('#favoriteList').html('');
$('#myGroupList').html('');
//画面タイトル設定 //画面タイトル設定
let contactListTitle = getLocalizedString("contactListTitle"); let contactListTitle = getLocalizedString("contactListTitle");
$('#title').text(contactListTitle); $('#title').text(contactListTitle);
...@@ -906,11 +908,18 @@ CHAT_UI.refreshContactScreen = function() { ...@@ -906,11 +908,18 @@ CHAT_UI.refreshContactScreen = function() {
myNamecardTemplate = text; myNamecardTemplate = text;
}); });
var groupUserTemplate;
$.get({ url: "./template/template_group_user_list.html", async: false }
, function(text) {
groupUserTemplate = text;
});
//const userNamecardTemplate = $('#namecard-template').html(); //const userNamecardTemplate = $('#namecard-template').html();
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo('0'); android.updateGroupInfo('0');
android.updateMyInfo(); android.updateMyInfo();
android.updateGroupUser(); android.updateGroupUser();
android.updateFavorite();
} }
var myInfo = CHAT_DB.getMyInfo(); var myInfo = CHAT_DB.getMyInfo();
...@@ -928,7 +937,7 @@ CHAT_UI.refreshContactScreen = function() { ...@@ -928,7 +937,7 @@ CHAT_UI.refreshContactScreen = function() {
let myNamecardObj = $(jQuery.parseHTML(myNamecardHtml)).on('click', function(){ let myNamecardObj = $(jQuery.parseHTML(myNamecardHtml)).on('click', function(){
}); });
$('#myProfileModal').append(myNamecardObj); $('#myProfileModal').html(myNamecardObj);
$('#myName').text(myInfo.shopMemberName); $('#myName').text(myInfo.shopMemberName);
$('#myImg').attr('src',myInfo.profileImagePath); $('#myImg').attr('src',myInfo.profileImagePath);
...@@ -944,23 +953,9 @@ CHAT_UI.refreshContactScreen = function() { ...@@ -944,23 +953,9 @@ CHAT_UI.refreshContactScreen = function() {
$('#my_info').append(obj);*/ $('#my_info').append(obj);*/
var groupUserList = CHAT_DB.getMyGroupUsers();
groupUserList.forEach(function(groupUser) {
groupUser.profileImagePath = CHAT.getProfileImgUrl(groupUser.profileUrl)
let html = Mustache.render(userTemplate, {
id: groupUser.shopMemberId,
profileImage: groupUser.profileImagePath,
name: groupUser.shopMemberName
});
let obj = $(jQuery.parseHTML(html)).on('click', function(){
CHAT_UI.makeNameCard(groupUser.shopMemberId);
});
$('#my_group_list').append(obj);
})
var favoriteCount = 0; var favoriteCount = 0;
var favoriteGroupList = CHAT_DB.getFavoriteGroups(); /*var favoriteGroupList = CHAT_DB.getFavoriteGroups();
favoriteGroupList.forEach(function(favoriteGroup) { favoriteGroupList.forEach(function(favoriteGroup) {
let html = Mustache.render(groupTemplate, { let html = Mustache.render(groupTemplate, {
name: favoriteGroup.groupName name: favoriteGroup.groupName
...@@ -971,32 +966,50 @@ CHAT_UI.refreshContactScreen = function() { ...@@ -971,32 +966,50 @@ CHAT_UI.refreshContactScreen = function() {
}); });
favoriteCount++ favoriteCount++
$('#favorite_list').append(obj); $('#favorite_list').append(obj);
}) })*/
var favoriteUserList = CHAT_DB.getFavoriteUsers(); var favoriteUserList = CHAT_DB.getFavoriteUsers();
favoriteUserList.forEach(function(favoriteUser) { favoriteUserList.forEach(function(favoriteUser) {
favoriteUser.profileImagePath = CHAT.getProfileImgUrl(favoriteUser.profileUrl) favoriteUser.profileImagePath = CHAT.getProfileImgUrl(favoriteUser.profileUrl)
let html = Mustache.render(groupTemplate, { let html = Mustache.render(userTemplate, {
id: favoriteUser.shopMemberId, shopMemberId: favoriteUser.shopMemberId,
profileImage: favoriteUser.profileImagePath, profileImage: favoriteUser.profileImagePath,
name: favoriteUser.shopMemberName name: favoriteUser.shopMemberName,
isFavorite: true
}); });
let obj = $(jQuery.parseHTML(html)).on('click', function(){ let obj = $(jQuery.parseHTML(html)).on('click', function(){
//TODO need onClick Action //TODO need onClick Action
}); });
favoriteCount++ favoriteCount++
$('#favorite_list').append(obj); $('#favoriteList').append(obj);
}) })
if (favoriteCount == 0) {
var myGroupList = CHAT_DB.getMyGroupUsers();
myGroupList.forEach(function(myGroup) {
myGroup.groupUserList.forEach(function (groupUser){
groupUser.profileImagePath = CHAT.getProfileImgUrl(groupUser.profileUrl)
})
let html = Mustache.render(groupUserTemplate, {
groupName: myGroup.groupName,
groupUserList: myGroup.groupUserList
});
let obj = $(jQuery.parseHTML(html)).on('click', function(){
});
$('#myGroupList').append(obj);
})
/*if (favoriteCount == 0) {
$('#favorite_list').hide(); $('#favorite_list').hide();
$('#favorite-seperator').hide(); $('#favorite-seperator').hide();
} else { } else {
$('#favorite_list').show(); $('#favorite_list').show();
$('#favorite-seperator').show(); $('#favorite-seperator').show();
} }*/
CHAT_UI.dismissLoadingIndicator();
} }
CHAT_UI.refreshRoomList = function(roomType) { CHAT_UI.refreshRoomList = function(roomType) {
...@@ -1194,12 +1207,14 @@ $('#myGroupBtn').on('click', function (e){ ...@@ -1194,12 +1207,14 @@ $('#myGroupBtn').on('click', function (e){
$('#allGroupArea').hide(); $('#allGroupArea').hide();
}); });
$('#allGroupBtn').on('click', function (e){ $('#tabAllGroup').on('click', function (e){
console.log('tabAllGroup')
CHAT_UI.refesshAllGroupSearch('0') CHAT_UI.refesshAllGroupSearch('0')
}); });
CHAT_UI.refesshAllGroupSearch = function(groupId) { CHAT_UI.refesshAllGroupSearch = function(groupId) {
const userNamecardTemplate = $('#namecard-template').html(); console.log('AllGroupSearchScreen');
//CHAT_UI.makeNameCard(id)
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo(groupId); android.updateGroupInfo(groupId);
} }
...@@ -1207,8 +1222,7 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) { ...@@ -1207,8 +1222,7 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
$('#parentGroupBtn').off(); $('#parentGroupBtn').off();
var result = CHAT_DB.getGroupInfo(groupId); var result = CHAT_DB.getGroupInfo(groupId);
$('#childGroupListArea').html('');
$('#childGroupList').html('');
$('#userInGroupList').html(''); $('#userInGroupList').html('');
$('#groupPathArea').html(''); $('#groupPathArea').html('');
...@@ -1226,7 +1240,7 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) { ...@@ -1226,7 +1240,7 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
} }
const groupNaviTemplate = $('#group-navigater-template').html(); /*const groupNaviTemplate = $('#group-navigater-template').html();
var groupCount = 0; var groupCount = 0;
result.groupPathList.forEach(function(groupPath) { result.groupPathList.forEach(function(groupPath) {
if (groupCount != 0) { if (groupCount != 0) {
...@@ -1241,9 +1255,13 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) { ...@@ -1241,9 +1255,13 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
}); });
groupCount++; groupCount++;
$('#groupPathArea').append(obj); $('#groupPathArea').append(obj);
}) })*/
const groupTemplate = $('#group-template').html(); var groupTemplate;
$.get({ url: "./template/template_group_list.html", async: false }
, function(text) {
groupTemplate = text;
});
result.childGroupList.forEach(function(childGroup) { result.childGroupList.forEach(function(childGroup) {
let html = Mustache.render(groupTemplate, { let html = Mustache.render(groupTemplate, {
name: childGroup.groupName, name: childGroup.groupName,
...@@ -1253,10 +1271,10 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) { ...@@ -1253,10 +1271,10 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
let obj = $(jQuery.parseHTML(html)).on('click', function(){ let obj = $(jQuery.parseHTML(html)).on('click', function(){
CHAT_UI.refesshAllGroupSearch(childGroup.groupId); CHAT_UI.refesshAllGroupSearch(childGroup.groupId);
}); });
$('#childGroupList').append(obj); $('#childGroupListArea').append(obj);
}) })
const userTemplate = $('#user-template').html(); /*const userTemplate = $('#user-template').html();
result.groupUserList.forEach(function(groupUser) { result.groupUserList.forEach(function(groupUser) {
groupUser.profileImagePath = CHAT.getProfileImgUrl(groupUser.profileUrl) groupUser.profileImagePath = CHAT.getProfileImgUrl(groupUser.profileUrl)
let html = Mustache.render(userTemplate, { let html = Mustache.render(userTemplate, {
...@@ -1273,9 +1291,11 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) { ...@@ -1273,9 +1291,11 @@ CHAT_UI.refesshAllGroupSearch = function(groupId) {
}) })
$('#myGroupArea').hide(); $('#myGroupArea').hide();
$('#allGroupArea').show(); $('#allGroupArea').show();*/
} }
CHAT_UI.startChat = function (userShopMemberId,userName) { CHAT_UI.startChat = function (userShopMemberId,userName) {
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
var userIdList = []; var userIdList = [];
...@@ -1299,11 +1319,19 @@ CHAT_UI.changeFavorite = function () { ...@@ -1299,11 +1319,19 @@ CHAT_UI.changeFavorite = function () {
CHAT_UI.removeFavoriteUser = function (shopMemberId) { CHAT_UI.removeFavoriteUser = function (shopMemberId) {
//add Android Chat click //add Android Chat click
$('#userNameCard').modal('hide');
$('#myNameCard').modal('hide');
console.log('hide');
android.removeFavoriteUser(shopMemberId);
console.log("removeFU"); console.log("removeFU");
}; };
CHAT_UI.insertFavoriteUser = function (shopMemberId) { CHAT_UI.insertFavoriteUser = function (shopMemberId) {
//add Android Chat click //add Android Chat click
$('#userNameCard').modal('hide');
$('#myNameCard').modal('hide');
console.log('insert');
android.addFavoriteUser(shopMemberId);
console.log("insertFU"); console.log("insertFU");
}; };
...@@ -1317,22 +1345,28 @@ CHAT_UI.makeNameCard = function (shopMemberId) { ...@@ -1317,22 +1345,28 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
var nameCardInfo = CHAT_DB.getNameCardData(shopMemberId); var nameCardInfo = CHAT_DB.getNameCardData(shopMemberId);
console.log(nameCardInfo); console.log(nameCardInfo);
const userNamecardTemplate = $('#namecard-template').html(); var namecardTemplate;
let namecardHtml = Mustache.render(userNamecardTemplate, { $.get({ url: "./template/template_user_name_card.html", async: false }
loginId: nameCardInfo.shopMemberId, , function(text) {
namecardTemplate = text;
});
let namecardHtml = Mustache.render(namecardTemplate, {
shopMemberId: nameCardInfo.shopMemberId,
profileImage: nameCardInfo.profileImagePath, profileImage: nameCardInfo.profileImagePath,
name: nameCardInfo.shopMemberName, name: nameCardInfo.shopMemberName,
groupPathList: nameCardInfo.groupPathList, groupPathList: nameCardInfo.groupPathList,
chat: getLocalizedString("chat"), chat: getLocalizedString("chat"),
voice: getLocalizedString("voice"), voice: getLocalizedString("voice"),
favorite: getLocalizedString("addFavorite") favorite: getLocalizedString("addFavorite"),
isFavorite: nameCardInfo.isFavorite
}); });
let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function(){ let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function(){
}); });
$('#userNamecard').html(namecardObj); $('#userProfileModal').html(namecardObj);
CHAT_UI.showNamecard('userNamecard'); $('#userNameCard').modal('show');
}; };
CHAT_UI.makeNameCardInChatRoom = function (chatRoomId) { CHAT_UI.makeNameCardInChatRoom = function (chatRoomId) {
...@@ -1350,12 +1384,14 @@ CHAT_UI.makeNameCardInChatRoom = function (chatRoomId) { ...@@ -1350,12 +1384,14 @@ CHAT_UI.makeNameCardInChatRoom = function (chatRoomId) {
voice: getLocalizedString("voice"), voice: getLocalizedString("voice"),
favorite: getLocalizedString("addFavorite") favorite: getLocalizedString("addFavorite")
}); });
console.log('done html render');
let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function(){ let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function(){
}); });
console.log(namecardHtml);
console.log(namecardObj);
$('#userNamecard').html(namecardObj); $('#userProfileModal').html(namecardHtml);
CHAT_UI.showNamecard('userNamecard'); CHAT_UI.showNamecard('userProfileModal');
}; };
CHAT_UI.refesshAllGroupSearchFaborite = function(groupId) { CHAT_UI.refesshAllGroupSearchFaborite = function(groupId) {
......
...@@ -29,7 +29,7 @@ CHAT.getProfileImgUrl = function(path) { ...@@ -29,7 +29,7 @@ CHAT.getProfileImgUrl = function(path) {
return ASSET_PATH + 'img/noImage.png'; return ASSET_PATH + 'img/noImage.png';
} else { } else {
var userInfo = path.split("/").reverse(); var userInfo = path.split("/").reverse();
return CMS_SERVER_URL + '/file/getProfileImage?profileFileName=' + userInfo[0] + '&profileGetLoginId=' + userInfo[1]; return CMS_SERVER_URL + '/chatapi/user?profileFileName=' + userInfo[0] + '&profileGetLoginId=' + userInfo[1] + '&sid=' + CHAT.globalLoginParameter.sid + '&cmd=12';
} }
} }
......
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<img src="icon/icon_folder.png" alt="フォルダ" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{name}}</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
\ No newline at end of file
<div class="category"><div class="category_name"><span>{{groupName}}</span></div></div>
<ul class="p-0 chat_make_room_list">
{{#groupUserList}}
<li class="d-flex align-items-center">
<a href="#" onclick="CHAT_UI.makeNameCard({{shopMemberId}})" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thubnail">
<div class="img_wrap"><img src="{{profileImagePath}}" onError="this.src='./img/noImage.png'"/></div>
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{shopMemberName}}</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
{{#isFavorite}}
<span class="star active"></span>
{{/isFavorite}}
{{^isFavorite}}
<span class="star disable"></span>
{{/isFavorite}}
</div>
</div>
</li>
{{/groupUserList}}
</ul>
\ No newline at end of file
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header border-0"> <div class="modal-header border-0">
<div class="prifile_desc d-flex flex-row"> <div class="prifile_desc d-flex flex-row">
<img src="{{profileImage}}" alt="プロフィール画像"> <img src="{{profileImage}}" onError="this.src='./img/noImage.png'">
<!--<div class="namedard-img-upload" >Upload</div>-->
<div class="prifile_name"><span>{{name}}</span></div> <div class="prifile_name"><span>{{name}}</span></div>
</div> </div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
......
<ul class="p-0 chat_make_room_list"> <ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="#" data-toggle="modal" data-target="#userNameCard" class="w-100"> <a href="#" onclick="CHAT_UI.makeNameCard({{shopMemberId}})" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l"> <div class="chat_item_l">
<div class="thubnail"> <div class="thubnail">
<div class="img_wrap"><img src="{{profileImage}}" alt="サムネイル画像" /></div> <div class="img_wrap"><img src="{{profileImage}}" onError="this.src='./img/noImage.png'" /></div>
</div> </div>
</div> </div>
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
...@@ -18,7 +18,12 @@ ...@@ -18,7 +18,12 @@
</a> </a>
<div class="chat_item_r"> <div class="chat_item_r">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
{{#isFavorite}}
<span class="star active"></span>
{{/isFavorite}}
{{^isFavorite}}
<span class="star disable"></span> <span class="star disable"></span>
{{/isFavorite}}
</div> </div>
</div> </div>
</li> </li>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header border-0"> <div class="modal-header border-0">
<div class="prifile_desc d-flex flex-row"> <div class="prifile_desc d-flex flex-row">
<img src="{{profileImage}}" alt="プロフィール画像"> <img src="{{profileImage}}" onError="this.src='./img/noImage.png'"/>
<div class="prifile_name"><span>{{name}}</span></div> <div class="prifile_name"><span>{{name}}</span></div>
</div> </div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="modal-footer border-0 justify-content-center"> <div class="modal-footer border-0 justify-content-center">
{{#isFavorite}} {{#isFavorite}}
<button type="button" class="border-0 bg_navy"> <button type="button" class="border-0 bg_navy" onclick="CHAT_UI.removeFavoriteUser({{shopMemberId}})">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_profile_favorite.png" alt="お気に入り"> <img src="icon/icon_profile_favorite.png" alt="お気に入り">
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
</div> </div>
</button> </button>
{{/isFavorite}} {{/isFavorite}}
{{^isFavotire}} {{^isFavorite}}
<button type="button" class="border-0 bg_navy"> <button type="button" class="border-0 bg_navy" onclick="CHAT_UI.insertFavoriteUser({{shopMemberId}})">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_profile_favorite_white.png" alt="お気に入り"> <img src="icon/icon_profile_favorite_white.png" alt="お気に入り">
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
</button> </button>
{{/isFavorite}} {{/isFavorite}}
<button type="button" class="border-0 bg_green"> <button type="button" class="border-0 bg_green" >
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_profile_phone.png" alt="通話"> <img src="icon/icon_profile_phone.png" alt="通話">
......
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