Commit 6ee54ba1 by Lee Munkyeong

連絡先画面UI

parent c9a4a037
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<a href="#" class="cancel none">キャンセル</a> <a href="#" class="cancel none">キャンセル</a>
</form> </form>
</div> </div>
<div class="chat_list"> <div class="content chat_list">
<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="#myNameCard" style="width: 100%;"> <a href="#" data-toggle="modal" data-target="#myNameCard" style="width: 100%;">
...@@ -88,11 +88,7 @@ ...@@ -88,11 +88,7 @@
</div> </div>
</div> </div>
<div class="tab_content" id="tab2_content"> <div class="tab_content" id="tab2_content">
<div class="breadcrumb"> <div class="breadcrumb" id="groupPathArea"></div>
<a href="#" class="breadcrumb_item"><span>Root</span></a>
<a href="#" class="breadcrumb_item"><span>GroupA</span></a>
<a href="#" class="breadcrumb_item"><span>GroupASubB</span></a>
</div>
<div class="chat_list"> <div class="chat_list">
<!-- 全グループ --> <!-- 全グループ -->
<ul class="p-0 chat_make_room_list"> <ul class="p-0 chat_make_room_list">
...@@ -113,11 +109,6 @@ ...@@ -113,11 +109,6 @@
</div> </div>
</div> </div>
</a> </a>
<!--<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>-->
</li> </li>
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="#" class="w-100" id="parentGroupBtn"> <a href="#" class="w-100" id="parentGroupBtn">
...@@ -130,17 +121,12 @@ ...@@ -130,17 +121,12 @@
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="chat_item_t"> <div class="chat_item_t">
<span class="chat_item_ttl">トップグループに戻る</span> <span class="chat_item_ttl">上位グループに戻る</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</a> </a>
<!--<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>-->
</li> </li>
<div id="childGroupListArea"> <div id="childGroupListArea">
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
...@@ -167,75 +153,7 @@ ...@@ -167,75 +153,7 @@
</div> </div>
</li> </li>
</div> </div>
<li class="d-flex align-items-center"> <div id="userInGroupList"></div>
<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>
<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> </ul>
</div> </div>
</div> </div>
......
...@@ -56,7 +56,6 @@ CHAT_DB.getMyGroupUsers = function() { ...@@ -56,7 +56,6 @@ 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());
} }
}; };
...@@ -77,4 +76,31 @@ CHAT_DB.getNameCardData = function(shopMemberId) { ...@@ -77,4 +76,31 @@ CHAT_DB.getNameCardData = function(shopMemberId) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getNameCardData(shopMemberId)); return JSON.parse(android.getNameCardData(shopMemberId));
} }
}; };
\ No newline at end of file
CHAT_DB.getMyGroupShopMemberByName = function(shopMemberName) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupShopMemberByName(shopMemberName));
}
};
CHAT_DB.getAllGroupShopMemberByName = function(shopMemberName) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getAllGroupShopMemberByName(shopMemberName));
}
};
CHAT_DB.getGroupByName = function(groupName) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupByName(groupName));
}
};
// アコーディオン
$('.category').on('click',function () {
$(this).toggleClass("open");
$(this).next().slideToggle();
});
$(function() { $(function() {
var h = $(window).height(); //画面の高さを取得 var h = $(window).height(); //画面の高さを取得
// アコーディオン
$('.category').click(function() {
$(this).toggleClass("open");
$(this).next().slideToggle();
});
// ローディング表示 // ローディング表示
$('footer a').click(function(event){ $('footer a').click(function(event){
const a = $(this); const a = $(this);
......
$(function() { $(function() {
// メンバー検索 // メンバー検索
$('#contact .search_form input[type="search"]').keyup(function(){ $('#contact .search_form input[type="search"]').keyup(function(){
$.ajax({ var isAllGroup = $('#tabAllGroup').is(':checked');
url: 'search_message_user_list.html', console.log(isAllGroup);
type: 'POST', $('.overlay_src_msg').empty();
datatype: 'html'
}).done(function (data) { //全グループ検索画面
$('.overlay_src_msg').html(data); if (isAllGroup) {
}) var keyword = $('#contact .search_form input[type="search"]').val();
if (keyword == '') {
return;
}
//グループデータ検索
var groupList = CHAT_DB.getGroupByName(keyword);
var groupTemplate;
$.get({ url: "./template/template_group_list.html", async: false }
, function(text) {
groupTemplate = text;
});
groupList.forEach(function(group) {
let html = Mustache.render(groupTemplate, {
name: group.groupName,
id: group.groupId,
isFavorite: group.isFavorite
});
let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj);
})
//ユーザデータ検索
var userList = CHAT_DB.getAllGroupShopMemberByName(keyword);
var userTemplate;
$.get({ url: "./template/template_user_list.html", async: false }
, function(text) {
userTemplate = text;
});
userList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
});
let html = Mustache.render(userTemplate, {
userList: userList
});
let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj);
  //連絡先画面
} else {
var keyword = $('#contact .search_form input[type="search"]').val();
if (keyword == '') {
return;
}
var userList = CHAT_DB.getMyGroupShopMemberByName(keyword);
var userTemplate;
$.get({ url: "./template/template_user_list.html", async: false }
, function(text) {
userTemplate = text;
});
userList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
});
let html = Mustache.render(userTemplate, {
userList: userList
});
let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').html(obj);
}
}); });
}); });
<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" onclick="CHAT_UI.refesshAllGroupSearch({{id}});">
<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">
...@@ -17,7 +17,12 @@ ...@@ -17,7 +17,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">
<span class="star disable"></span> {{#isFavorite}}
<span class="star active group_{{id}}" onclick="CHAT_UI.favoriteGroupChange({{id}},this)"></span>
{{/isFavorite}}
{{^isFavorite}}
<span class="star disable group_{{id}}" onclick="CHAT_UI.favoriteGroupChange({{id}},this)"></span>
{{/isFavorite}}
</div> </div>
</div> </div>
</li> </li>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="CHAT_UI.refesshAllGroupSearch({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<div class="category"><div class="category_name"><span>{{groupName}}</span></div></div> <div class="category" onclick="CHAT_UI.toggleCategory(this);"><div class="category_name"><span>{{groupName}}</span></div></div>
<ul class="p-0 chat_make_room_list"> <ul class="p-0 chat_make_room_list">
{{#groupUserList}} {{#groupUserList}}
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="#" onclick="CHAT_UI.makeNameCard({{shopMemberId}})" style="width: 100%;"> <a href="javascript:return false;" 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">
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
<div class="chat_item_r"> <div class="chat_item_r">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
{{#isFavorite}} {{#isFavorite}}
<span class="star active"></span> <span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}} {{/isFavorite}}
{{^isFavorite}} {{^isFavorite}}
<span class="star disable"></span> <span class="star disable shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}} {{/isFavorite}}
</div> </div>
</div> </div>
......
<ul class="p-0 chat_make_room_list"> <ul class="p-0 chat_make_room_list">
{{#userList}}
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="#" onclick="CHAT_UI.makeNameCard({{shopMemberId}})" style="width: 100%;"> <a href="javascript:return false;" 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}}" onError="this.src='./img/noImage.png'" /></div> <div class="img_wrap"><img src="{{profileUrl}}" 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">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="chat_item_t"> <div class="chat_item_t">
<span class="chat_item_ttl">{{name}}</span> <span class="chat_item_ttl">{{shopMemberName}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -19,12 +20,13 @@ ...@@ -19,12 +20,13 @@
<div class="chat_item_r"> <div class="chat_item_r">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
{{#isFavorite}} {{#isFavorite}}
<span class="star active"></span> <span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}} {{/isFavorite}}
{{^isFavorite}} {{^isFavorite}}
<span class="star disable"></span> <span class="star disable shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}} {{/isFavorite}}
</div> </div>
</div> </div>
</li> </li>
{{/userList}}
</ul> </ul>
\ 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