No Description
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

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