topBar.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <ul class="newtabs-menu">
  2. <a href="/broadcast/myShow/approved">
  3. <li class="approved">
  4. <span>APPROVED</span>
  5. <%if(noreadShowNum){%>
  6. (<span style="margin-left: 0px;" class="approvedNoRead"><%=noreadShowNum%></span>)
  7. <%}%>
  8. </li>
  9. <div class="approvedImg"></div>
  10. </a>
  11. <a href="/broadcast/myShow/underReview">
  12. <li class="underReview"><span> UNDER REVIEW</span></li>
  13. <div class="underReviewImg"></div>
  14. </a>
  15. <a href="/broadcast/myShow/rejected">
  16. <li class="rejectedShow"><span>REJECTED</span></li>
  17. <div class="rejectedShowImg"></div>
  18. </a>
  19. <a href="/broadcast/myShow/history">
  20. <li class="history">
  21. <span>HISTORY</span>
  22. <%if(cancelNoreadShowNum){%>
  23. (<span style="margin-left: 0px;" class="historyNoRead"><%=cancelNoreadShowNum%></span>)
  24. <%}%>
  25. </li>
  26. <div class="historyImg"></div>
  27. </a>
  28. </ul>
  29. <ul class="plusBtn">
  30. <li>
  31. <a id="Show" href="javascript:;"><div class="plusText">+ Show</div></a>
  32. </li>
  33. </ul>
  34. <script>
  35. $(function(){
  36. // 添加节目
  37. $('#Show').on('click', function(){
  38. parent.layer.open({
  39. type: 2,
  40. title: '',
  41. closeBtn: 0,
  42. resize: false,
  43. shadeClose: true,
  44. area : ['556px', '655px'],
  45. content: '/broadcast/showLayer/addShow',
  46. end:function(){
  47. var status = Cookies.getJSON('add_success_show');
  48. Cookies.remove('add_success_show');
  49. if(status && status.status == 1){
  50. window.location.reload();
  51. }
  52. }
  53. });
  54. })
  55. //查看图片
  56. var showOriginal = 0;
  57. $('.showOriginal').on('click', function(){
  58. if(showOriginal) {
  59. return false;
  60. }
  61. showOriginal = 1;
  62. var img = $(this).attr('data-img');
  63. var image = new Image();
  64. image.src = img;
  65. image.onload = function(){
  66. var width = image.width;
  67. var height = image.height;
  68. var windowHeigth = $(parent).height();
  69. var windowWidth = $(parent).width();
  70. var imgHeigth = '';
  71. var imgWidth = '';
  72. if(windowHeigth <= height || windowWidth <= width){
  73. windowHeigth = parseInt(windowHeigth * 0.6);
  74. windowWidth = parseInt(windowWidth * 0.6);
  75. height = windowHeigth;
  76. width = windowWidth;
  77. imgHeigth = windowHeigth;
  78. imgWidth = windowWidth;
  79. }else{
  80. imgHeigth = height;
  81. imgWidth = width;
  82. }
  83. width = width + 20 + 'px';
  84. height = height + 50 + 'px';
  85. parent.layer.open({
  86. type: 2,
  87. title: '',
  88. closeBtn: 0,
  89. resize: false,
  90. shadeClose: true,
  91. area : [width, height],
  92. content: '/broadcast/albumLayer/showOriginal?img='+img+'&width='+imgWidth+'&height='+imgHeigth+'&title=Show cover',
  93. end:function(){
  94. showOriginal = 0;
  95. }
  96. });
  97. }
  98. })
  99. })
  100. </script>