termsLeftBar.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <style>
  2. .switchState{width: 40px; height: 31px; float: right; cursor: pointer;}
  3. .switchState .Online{float: left; margin-top: 5px;}
  4. .switchState .OnlineImg{float: left; margin-top: 8px; margin-left: 13px;}
  5. .switchState .Stealth{float: left; margin-top: 12px; margin-left: 3px;}
  6. .switchState .StealthImg{float: left; margin-top: 8px; margin-left: 13px;}
  7. .switchState ul{width: 145px; height: 135px; border-radius: 4px; position: absolute; z-index: 999; top:37px; left: 30px;}
  8. .switchState ul li{height: 33px; background-color: #FFF; border-bottom: 1px solid #D7D7D7; padding: 0px; cursor: pointer;}
  9. .switchState ul li:nth-child(1){border-top-left-radius: 4px; border-top-right-radius: 4px;}
  10. .switchState ul li:nth-child(4){border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;}
  11. .switchState ul li .text{float: left; margin-top: 4px; margin-left: 13px; color: #6B6B6B;}
  12. </style>
  13. <!-- left nav start -->
  14. <div class="left-nav">
  15. <!-- user info start -->
  16. <div class="user-info">
  17. <div class="content">
  18. <a href="/broadcast/profile">
  19. <div class="avatar_30">
  20. <img class="user_avatar" src="<%=userInfo.avatar_img%>" alt=""/>
  21. </div>
  22. </a>
  23. <div class="user-name" title="<%=userInfo.nick_name%>"><%=userInfo.nick_name%></div>
  24. <div class="switchState">
  25. <img id="Online" class="Online" src="<%=public_path%>/img/<%if(userInfo.is_hidden){%>invisible.png<%}else{%>online-icon.png<%}%>">
  26. <img class="Stealth" src="<%=public_path%>/img/arrow-down.png">
  27. <ul class="switchStateUl" style="display: none;">
  28. <li class="OnlineEven">
  29. <div class="OnlineImg"><img src="<%=public_path%>/img/u14.png"></div>
  30. <div class="text">Set as Visible</div>
  31. </li>
  32. <li class="StealthEven">
  33. <div class="StealthImg"><img src="<%=public_path%>/img/u474.png"></div>
  34. <div class="text">Set as Invisible</div>
  35. </li>
  36. <li>
  37. <a href="/broadcast/profile"><div class="text" style="color: #0066FF; width: 133px;">Profile Setting</div></a>
  38. </li>
  39. <li class="LogoutEven">
  40. <div class="text" style="color: #0066FF; width: 133px;">Logout</div>
  41. </li>
  42. </ul>
  43. </div>
  44. </div>
  45. </div>
  46. <!-- user info end -->
  47. <a href="/broadcast/home"><div class="home">Home</div></a>
  48. <div class="cat">TERMS AND POLICIES</div>
  49. <ul class="BM">
  50. <a href="/broadcast/terms/termsOne">
  51. <li class="Terms TermsOne">Terms of Service-Broadcaster</li>
  52. </a>
  53. <a href="/broadcast/terms/termsTwo">
  54. <li class="TermsTwo" style="line-height: 18px; margin-top: 5px; margin-bottom: 5px;">Broadcaster Service Fee Calculations</li>
  55. </a>
  56. <a href="/broadcast/terms/termsThree">
  57. <li class="Terms TermsThree">Broadcaster Code of Conduct</li>
  58. </a>
  59. </ul>
  60. </div>
  61. <!-- left nav end -->
  62. <script>
  63. $(function(){
  64. $("select").msDropdown({roundedBorder:false});
  65. $(".left-nav").css("height", $(".content").height());
  66. $('.switchState').click(function () {
  67. if($(".switchStateUl").is(":hidden")){
  68. $(".switchStateUl").show();
  69. }else{
  70. $(".switchStateUl").hide();
  71. }
  72. })
  73. var public_path = '<%=public_path%>';
  74. //设置为在线
  75. $('.OnlineEven').click(function () {
  76. $.ajax({
  77. type: 'POST',
  78. url: '/broadcast/setOnlineStatus',
  79. data: {online_status:1},
  80. dataType: 'json',
  81. success: function(data){
  82. if(data.errno == 0){
  83. $('#Online').attr('src', public_path+'/img/online-icon.png');
  84. $('.switchStateUl').hide();
  85. }
  86. },
  87. });
  88. });
  89. //设置为隐身
  90. $('.StealthEven').click(function () {
  91. $.ajax({
  92. type: 'POST',
  93. url: '/broadcast/setOnlineStatus',
  94. data: {online_status:2},
  95. dataType: 'json',
  96. success: function(data){
  97. if(data.errno == 0){
  98. $('#Online').attr('src', public_path+'/img/invisible.png');
  99. $('.switchStateUl').hide();
  100. }else{
  101. myParentAlert(data.data);
  102. }
  103. },
  104. });
  105. });
  106. $('.LogoutEven').click(function () {
  107. parent.window.setTokenOvertimeShow();
  108. $.ajax({
  109. beforeSend:function(xhr){ xhr.setRequestHeader('zb',1)},
  110. type: 'POST',
  111. url: '/broadcast/logout',
  112. data: {},
  113. dataType: 'json',
  114. success: function(data){
  115. if(data.errno == 0){
  116. parent.window.location.reload();
  117. }
  118. },
  119. });
  120. });
  121. })
  122. </script>