暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin_notice_index.htm 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-i">
  6. {include file="users_notice/bar" /}
  7. <div class="flexigrid">
  8. <div class="mDiv pt0">
  9. <div class="ftitle">
  10. <div class="fbutton">
  11. <a href="javascript:void(0);" onclick="signAllRead(this);">
  12. <div class="add" title="全部标记已读">
  13. <span>全部标记已读</span>
  14. </div>
  15. </a>
  16. </div>
  17. </div>
  18. <form class="navbar-form form-inline" action="{:url('UsersNotice/admin_notice_index')}" method="get" onsubmit="layer_loading('正在处理');">
  19. {$searchform.hidden|default=''}
  20. <div class="sDiv">
  21. <div class="sDiv2">
  22. <input type="text" size="30" name="keywords" class="qsbox" placeholder="搜索相关数据...">
  23. <input type="submit" class="btn" value="搜索">
  24. <i class="iconfont e-sousuo"></i>
  25. </div>
  26. </div>
  27. </form>
  28. </div>
  29. <div class="hDiv">
  30. <div class="hDivBox">
  31. <table cellspacing="0" cellpadding="0" style="width: 100%">
  32. <thead>
  33. <tr>
  34. <th class="sign w40" axis="col0">
  35. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  36. </th>
  37. <th abbr="article_show" axis="col5" class="w40">
  38. <div class="tc">ID</div>
  39. </th>
  40. <th abbr="article_title" axis="col3" >
  41. <div class="text-l10">通知标题 </div>
  42. </th>
  43. <th abbr="ac_id" axis="col4" class="w160">
  44. <div class="text-l10">通知类型</div>
  45. </th>
  46. <th abbr="article_time" axis="col6" class="w160">
  47. <div class="tc">通知时间</div>
  48. </th>
  49. <th axis="col1" class="w120">
  50. <div class="tc">操作</div>
  51. </th>
  52. </tr>
  53. </thead>
  54. </table>
  55. </div>
  56. </div>
  57. <div class="bDiv" style="height: auto;">
  58. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  59. <table style="width: 100%">
  60. <tbody>
  61. {empty name="list"}
  62. <tr>
  63. <td class="no-data" align="center" axis="col0" colspan="50">
  64. <div class="no_row">
  65. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  66. </div>
  67. </td>
  68. </tr>
  69. {else/}
  70. {volist name="list" id="vo"}
  71. <tr>
  72. <td class="sign">
  73. <div class="w40 tc"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.content_id}"></div>
  74. </td>
  75. <td class="sort">
  76. <div class="w40 tc"> {$vo.content_id} </div>
  77. </td>
  78. <td style="width: 100%">
  79. <div class="text-l10">
  80. <a href="javascript:void(0);" data-href="{:url('UsersNotice/admin_notice_edit',array('content_id'=>$vo['content_id']))}" onclick="OpenNotice('{$vo.content_id}', '{$vo.is_read}', this);">{eq name="$vo.is_read" value="0"}<span style="color: red;" id="content_id_{$vo.content_id}" class="notread1620347507">[未读]</span>{/eq} {$vo.content_title}</a>
  81. </div>
  82. </td>
  83. <td>
  84. <div class="w160 text-l10 wot_z"> {$vo.tpl_name} </div>
  85. </td>
  86. <td class="">
  87. <div class="w160 tc"> {$vo.add_time|MyDate='Y-m-d H:i:s',###} </div>
  88. </td>
  89. <td class="operation">
  90. <div class="w120 tc">
  91. <a href="javascript:void(0);" data-href="{:url('UsersNotice/admin_notice_edit',array('content_id'=>$vo['content_id']))}" class="btn blue" onclick="OpenNotice('{$vo.content_id}', '{$vo.is_read}', this);">查看</a>
  92. <i></i>
  93. <a class="btn red" href="javascript:void(0)" data-url="{:url('UsersNotice/admin_notice_del')}" data-id="{$vo.content_id}" onclick="delfun(this);">删除</a>
  94. </div>
  95. </td>
  96. </tr>
  97. {/volist}
  98. {/empty}
  99. </tbody>
  100. </table>
  101. </div>
  102. <div class="iDiv" style="display: none;"></div>
  103. </div>
  104. {notempty name="list"}
  105. <div class="tDiv">
  106. <div class="tDiv2">
  107. <div class="fbutton checkboxall">
  108. <input type="checkbox" autocomplete="off" class="checkAll">
  109. </div>
  110. <div class="fbutton">
  111. <a onclick="batch_del(this, 'ids');" data-url="{:url('UsersNotice/admin_notice_del')}" class="layui-btn layui-btn-primary"><span>批量删除</span></a>
  112. </div>
  113. {include file="public/page" /}
  114. </div>
  115. <div style="clear:both"></div>
  116. </div>
  117. {/notempty}
  118. </div>
  119. </div>
  120. <script type="text/javascript">
  121. $(function(){
  122. $('input[name*=ids]').click(function(){
  123. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  124. $('.checkAll').prop('checked','checked');
  125. } else {
  126. $('.checkAll').prop('checked', false);
  127. }
  128. });
  129. $('input[type=checkbox].checkAll').click(function(){
  130. $('input[type=checkbox]').prop('checked',this.checked);
  131. });
  132. });
  133. $(document).ready(function(){
  134. // 表格行点击选中切换
  135. $('#flexigrid > table>tbody >tr').click(function(){
  136. $(this).toggleClass('trSelected');
  137. });
  138. // 点击刷新数据
  139. $('.fa-refresh').click(function(){
  140. location.href = location.href;
  141. });
  142. });
  143. function OpenNotice(ContentID, IsRead, obj) {
  144. openFullframe(obj, '查看站内通知');
  145. if (0 == IsRead) {
  146. var UnreadNotify = $(".UnreadNotify1615518028", window.parent.document).html();
  147. UnreadNotify = Number(UnreadNotify) - Number(1);
  148. UnreadNotify = 0 >= UnreadNotify ? 0 : UnreadNotify;
  149. $(".UnreadNotify1615518028", window.parent.document).html(UnreadNotify);
  150. if (0 == UnreadNotify) {
  151. $(".UnreadNotify1615518028", window.parent.document).hide();
  152. }
  153. }
  154. $('#content_id_'+ContentID).remove();
  155. }
  156. function signAllRead(obj) {
  157. layer_loading('正在处理');
  158. $.ajax({
  159. type : 'post',
  160. url : "{:url('UsersNotice/sign_admin_allread')}",
  161. data : {_ajax:1},
  162. dataType : 'json',
  163. success : function(res){
  164. layer.closeAll();
  165. if(res.code == 1){
  166. $(".UnreadNotify1615518028", window.parent.document).html(0);
  167. $(".UnreadNotify1615518028", window.parent.document).hide();
  168. $(".notread1620347507").hide();
  169. layer.msg(res.msg, {icon: 1, shade: 0.1, time: 1000});
  170. }else{
  171. showErrorMsg(res.msg);
  172. }
  173. },
  174. error: function(e){
  175. layer.closeAll();
  176. showErrorAlert(e.responseText);
  177. }
  178. });
  179. }
  180. </script>
  181. {include file="public/footer" /}