friends.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <style>
  2. .right-content{
  3. padding-top:54px!important; padding-left:0!important; width:970px!important;
  4. }
  5. .hangoutFriendsBody{font-family: 'Arial Normal', 'Arial'; font-weight: 700; font-size: 12px;color: #434343;}
  6. .hangoutFriendsBodyHead{width: 935px; background-color: #99D4FF; height: 33px; line-height: 33px; float: left; border-radius: 5px 5px 0px 0px;}
  7. .hangoutFriendsBodyList{ color: #626262; height: 71px; line-height: 71px; width: 933px; border: 1px solid #C9C9C9; border-top: none;}
  8. .hangoutFriendsBodyListOnline{float: left; margin-top: 31px; margin-left: 4px; width: 8px; height: 8px;}
  9. .hangoutFriendsBodyListAvatar{float: left; width: 48px; height: 48px; margin-top: 11px; border-radius: 100%;}
  10. .hangoutFriendsBodyListName{margin-left: 15px; width: 70px;}
  11. .hangoutFriendsBodyListAge{margin-left: 10px; width: 100px;}
  12. .hangoutFriendsBodyListOperating{margin-left: 10px; margin-top: 25px;}
  13. .addFriends{width: 137px; height: 30px; line-height: 30px; text-align: center; font-weight: 700; font-size: 12px; color: #FFFFFF; background-color: #05C775; margin-bottom: 5px; border-radius:15px;}
  14. .width15{width: 15px;}
  15. .width280{width: 280px;}
  16. .width300{width: 300px;}
  17. .width530{width: 530px;}
  18. .width100{width: 100px;}
  19. .height71{height: 71px;}
  20. </style>
  21. <div class="content">
  22. <% include ../leftBar.html %>
  23. <!-- right content start -->
  24. <div class="right-content">
  25. <div class="pageInfo">My Hang-out friends</div>
  26. <div class="userOnlineList">
  27. <% include topBar.html %>
  28. <div class="hangoutFriendsBody">
  29. <div class="hangoutFriendsBodyHead">
  30. <div class="float-left width280" style="margin-left: 20px;">Friend</div>
  31. <div class="float-left width530">Time added</div>
  32. <div class="float-left width100">Action</div>
  33. </div>
  34. <%if(myFriendList.length >0){%>
  35. <%for(let data of myFriendList){%>
  36. <div class="float-left hangoutFriendsBodyList">
  37. <div class="float-left width300 height71">
  38. <div class="float-left height71 width15">
  39. <%if(!data.is_read){%>
  40. <img class="hangoutFriendsBodyListOnline" src="<%=public_path%>/img/u84.png">
  41. <%}%>
  42. </div>
  43. <img class="hangoutFriendsBodyListAvatar" src="<%=data.avatar_img%>">
  44. <div class="float-left beyondHiding cursor hangoutFriendsBodyListName" title="<%=data.nick_name%>">
  45. <%=data.nick_name%>
  46. </div>
  47. <div class="float-left beyondHiding cursor hangoutFriendsBodyListAge" title="<%=data.age%>yrs / <%=data.country%>">
  48. <%=data.age%>yrs / <%=data.country%>
  49. </div>
  50. </div>
  51. <div class="float-left width530 hangoutFriendsAddTime" data-time="<%=data.add_timestamp * 1000%>"></div>
  52. <div class="float-left width100">
  53. <img class="float-left cursor hangoutFriendsBodyListOperating delete" data-id="<%=data.friend_id%>" data-name="<%=data.nick_name%>" src="<%=public_path%>/img/u655.png">
  54. </div>
  55. </div>
  56. <%}%>
  57. <%}else{%>
  58. <div class="noData clear">No Hang-out friends yet.</div>
  59. <%}%>
  60. <div id="page" class="pagenation"></div>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- right content end -->
  65. </div>
  66. <script>
  67. $(function(){
  68. hangoutFriendsAddTime();
  69. $('.delete').click(function(){
  70. var friend_id = $(this).attr('data-id');
  71. var anchor_name = $(this).attr('data-name');
  72. parent.layer.confirm('Are you sure you wish to delete your friend '+anchor_name+'?', {
  73. btn:['Cancel', 'Yes'],
  74. title:'',
  75. btnAlign:'c',
  76. closeBtn: 0,
  77. shadeClose:true,
  78. shade:0.01
  79. }, function(){
  80. parent.layer.msg('Cancel Delete');
  81. }, function(){
  82. $.post('/lady/v1/deleteFriend', {friend_id:friend_id}, function(data){
  83. if(data.errno == 0){
  84. window.location.reload();
  85. parent.layer.msg('deleted');
  86. }else{
  87. myParentAlert('Failed to delete');
  88. }
  89. })
  90. });
  91. });
  92. //分页
  93. var pages = Math.ceil('<%=myFriendListCount%>'/'<%=step%>');
  94. if(pages>1) {
  95. page('page', pages);
  96. }
  97. })
  98. </script>