Няма описание
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.

archives_index.htm 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. {include file="public/layout" /}
  2. <body class="bodystyle" id="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-10">
  6. {include file="recycle_bin/bar" /}
  7. <div class="flexigrid">
  8. <div class="hDiv">
  9. <div class="hDivBox">
  10. <table cellspacing="0" cellpadding="0" style="width: 100%">
  11. <thead>
  12. <tr>
  13. <th class="sign w40" axis="col0">
  14. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  15. </th>
  16. <th abbr="article_title" axis="col3" class="w70">
  17. <div class="tc">ID</div>
  18. </th>
  19. <th abbr="article_title" axis="col3" class="">
  20. <div class="text-l10">标题</div>
  21. </th>
  22. <th abbr="article_time" axis="col6" class="w150">
  23. <div class="tc">所属栏目</div>
  24. </th>
  25. <th abbr="article_time" axis="col6" class="w100">
  26. <div class="tc">删除时间</div>
  27. </th>
  28. <th axis="col1" class="w120">
  29. <div class="tc">操作</div>
  30. </th>
  31. </tr>
  32. </thead>
  33. </table>
  34. </div>
  35. </div>
  36. <div class="bDiv" style="height: auto;">
  37. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  38. <table style="width: 100%;">
  39. <tbody>
  40. {empty name="list"}
  41. <tr>
  42. <td class="no-data" align="center" axis="col0" colspan="50">
  43. <div class="no_row">
  44. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  45. </div>
  46. </td>
  47. </tr>
  48. {else/}
  49. {foreach name="list" item="vo" key="k" }
  50. <tr>
  51. <td class="sign">
  52. <div class="tc w40"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.aid}"></div>
  53. </td>
  54. <td class="sort">
  55. <div class="tc w70">
  56. {$vo.aid}
  57. </div>
  58. </td>
  59. <td class="" style="width: 100%;">
  60. <div class="tl pl10" >
  61. {notempty name="vo.litpic"}
  62. <i class="fa fa-picture-o color_z" onmouseover="layer_tips=layer.tips('<img src={$vo.litpic} class=\'layer_tips_img\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});" onmouseout="layer.close(layer_tips);"></i>
  63. {/notempty}
  64. {$vo.title}
  65. </div>
  66. </td>
  67. <td class="">
  68. <div class="w150 tc ellipsis"><a href="{:url('RecycleBin/archives_index', array('typeid'=>$vo['typeid']))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  69. </td>
  70. <td>
  71. <div class="w100 tc">
  72. {$vo.update_time|date='Y-m-d',###}
  73. </div>
  74. </td>
  75. <td class="operation">
  76. <div class="w120 tc">
  77. {eq name="'RecycleBin@archives_recovery'|is_check_access" value="1"}
  78. <a class="btn blue" href="javascript:void(0);" data-url="{:url('RecycleBin/archives_recovery')}" data-id="{$vo.aid}" data-title="{$vo.title}" onClick="recovery(this);">还原</a>
  79. {/eq}
  80. {eq name="'RecycleBin@archives_del'|is_check_access" value="1"}
  81. <i></i>
  82. <a class="btn red" href="javascript:void(0);" data-url="{:url('RecycleBin/archives_del')}" data-id="{$vo.aid}" data-title="{$vo.title}" onClick="delfun(this);">彻底删除</a>
  83. {/eq}
  84. </div>
  85. </td>
  86. </tr>
  87. {/foreach}
  88. {/empty}
  89. </tbody>
  90. </table>
  91. </div>
  92. <div class="iDiv" style="display: none;"></div>
  93. </div>
  94. {notempty name="list"}
  95. <div class="tDiv">
  96. <div class="tDiv2">
  97. <div class="fbutton checkboxall">
  98. <input type="checkbox" autocomplete="off" class="checkAll">
  99. </div>
  100. {eq name="'RecycleBin@archives_recovery'|is_check_access" value="1"}
  101. <div class="fbutton">
  102. <a onclick="batch_recovery(this, 'ids');" data-url="{:url('RecycleBin/archives_recovery')}" class="layui-btn layui-btn-primary">
  103. <span>批量还原</span>
  104. </a>
  105. </div>
  106. {/eq}
  107. {eq name="'RecycleBin@archives_del'|is_check_access" value="1"}
  108. <div class="fbutton">
  109. <a onclick="batch_del(this, 'ids');" data-url="{:url('RecycleBin/archives_del')}" class="layui-btn layui-btn-primary">
  110. <span>批量彻底删除</span>
  111. </a>
  112. </div>
  113. {/eq}
  114. {include file="public/page" /}
  115. </div>
  116. <div style="clear:both"></div>
  117. </div>
  118. <!--分页位置-->
  119. {/notempty}
  120. </div>
  121. </div>
  122. <script>
  123. try{
  124. var mt20_1649209614 = sessionStorage.getItem("mt20_1649209614");
  125. if (mt20_1649209614 != 1){
  126. console.log("recycle_bin",mt20_1649209614);
  127. // $("#bodystyle").css("padding"," 15px 0px");
  128. }
  129. }catch(e){}
  130. </script>
  131. <script type="text/javascript">
  132. $(function(){
  133. $('input[name*=ids]').click(function(){
  134. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  135. $('.checkAll').prop('checked','checked');
  136. } else {
  137. $('.checkAll').prop('checked', false);
  138. }
  139. });
  140. $('input[type=checkbox].checkAll').click(function(){
  141. $('input[type=checkbox]').prop('checked',this.checked);
  142. });
  143. });
  144. $(document).ready(function(){
  145. // 表格行点击选中切换
  146. $('#flexigrid > table>tbody >tr').click(function(){
  147. $(this).toggleClass('trSelected');
  148. });
  149. // 点击刷新数据
  150. $('.fa-refresh').click(function(){
  151. location.href = location.href;
  152. });
  153. });
  154. // 还原
  155. function recovery(obj){
  156. layer.confirm('确认还原?该文档与关联栏目将一起还原。', {
  157. shade: layer_shade,
  158. area: ['480px', '190px'],
  159. move: false,
  160. title: '提示',
  161. btnAlign:'r',
  162. closeBtn: 3,
  163. btn: ['确定', '取消'] ,//按钮
  164. success: function () {
  165. $(".layui-layer-content").css('text-align', 'left');
  166. }
  167. }, function(){
  168. layer_loading('正在处理');
  169. // 确定
  170. $.ajax({
  171. type : 'post',
  172. url : $(obj).attr('data-url'),
  173. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  174. dataType : 'json',
  175. success : function(data){
  176. layer.closeAll();
  177. if(data.code == 1){
  178. layer.msg(data.msg, {icon: 6});
  179. window.location.reload();
  180. }else{
  181. layer.alert(data.msg, {icon: 5, title:false});
  182. }
  183. }
  184. })
  185. }, function(index){
  186. layer.close(index);
  187. });
  188. return false;
  189. }
  190. /**
  191. * 批量还原提交
  192. */
  193. function batch_recovery(obj, name) {
  194. var a = [];
  195. $('input[name^='+name+']').each(function(i,o){
  196. if($(o).is(':checked')){
  197. a.push($(o).val());
  198. }
  199. })
  200. if(a.length == 0){
  201. layer.alert('请至少选择一项', {
  202. shade: layer_shade,
  203. area: ['480px', '190px'],
  204. move: false,
  205. title: '提示',
  206. btnAlign:'r',
  207. closeBtn: 3,
  208. success: function () {
  209. $(".layui-layer-content").css('text-align', 'left');
  210. }
  211. });
  212. return;
  213. }
  214. // 还原按钮
  215. layer.confirm('确认批量还原?选定文档与关联栏目将一起还原。', {
  216. shade: layer_shade,
  217. area: ['480px', '190px'],
  218. move: false,
  219. title: '提示',
  220. btnAlign:'r',
  221. closeBtn: 3,
  222. btn: ['确定', '取消'] ,//按钮
  223. success: function () {
  224. $(".layui-layer-content").css('text-align', 'left');
  225. }
  226. }, function () {
  227. layer_loading('正在处理');
  228. $.ajax({
  229. type: "POST",
  230. url: $(obj).attr('data-url'),
  231. data: {del_id:a, _ajax:1},
  232. dataType: 'json',
  233. success: function (data) {
  234. layer.closeAll();
  235. if(data.code == 1){
  236. layer.msg(data.msg, {icon: 6});
  237. window.location.reload();
  238. }else{
  239. layer.alert(data.msg, {icon: 5, title:false});
  240. }
  241. },
  242. error:function(e){
  243. layer.closeAll();
  244. layer.alert(e.responseText, {icon: 5, title:false});
  245. }
  246. });
  247. }, function (index) {
  248. layer.closeAll(index);
  249. });
  250. }
  251. // 删除
  252. function delfun(obj){
  253. layer.confirm('确认彻底删除?', {
  254. shade: layer_shade,
  255. area: ['480px', '190px'],
  256. move: false,
  257. title: '提示',
  258. btnAlign:'r',
  259. closeBtn: 3,
  260. btn: ['确定', '取消'] ,//按钮
  261. success: function () {
  262. $(".layui-layer-content").css('text-align', 'left');
  263. }
  264. }, function(){
  265. layer_loading('正在处理');
  266. // 确定
  267. $.ajax({
  268. type : 'post',
  269. url : $(obj).attr('data-url'),
  270. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  271. dataType : 'json',
  272. success : function(data){
  273. layer.closeAll();
  274. if(data.code == 1){
  275. layer.msg(data.msg, {icon: 6});
  276. window.location.reload();
  277. }else{
  278. layer.alert(data.msg, {icon: 5, title:false});
  279. }
  280. }
  281. })
  282. }, function(index){
  283. layer.close(index);
  284. });
  285. return false;
  286. }
  287. /**
  288. * 批量删除提交
  289. */
  290. function batch_del(obj, name) {
  291. var a = [];
  292. $('input[name^='+name+']').each(function(i,o){
  293. if($(o).is(':checked')){
  294. a.push($(o).val());
  295. }
  296. })
  297. if(a.length == 0){
  298. layer.alert('请至少选择一项', {
  299. shade: layer_shade,
  300. area: ['480px', '190px'],
  301. move: false,
  302. title: '提示',
  303. btnAlign:'r',
  304. closeBtn: 3,
  305. success: function () {
  306. $(".layui-layer-content").css('text-align', 'left');
  307. }
  308. });
  309. return;
  310. }
  311. // 删除按钮
  312. layer.confirm('确认批量彻底删除?', {
  313. shade: layer_shade,
  314. area: ['480px', '190px'],
  315. move: false,
  316. title: '提示',
  317. btnAlign:'r',
  318. closeBtn: 3,
  319. btn: ['确定', '取消'] ,//按钮
  320. success: function () {
  321. $(".layui-layer-content").css('text-align', 'left');
  322. }
  323. }, function () {
  324. layer_loading('正在处理');
  325. $.ajax({
  326. type: "POST",
  327. url: $(obj).attr('data-url'),
  328. data: {del_id:a, _ajax:1},
  329. dataType: 'json',
  330. success: function (data) {
  331. layer.closeAll();
  332. if(data.code == 1){
  333. layer.msg(data.msg, {icon: 6});
  334. window.location.reload();
  335. }else{
  336. layer.alert(data.msg, {icon: 5, title:false});
  337. }
  338. },
  339. error:function(e){
  340. layer.closeAll();
  341. layer.alert(e.responseText, {icon: 5, title:false});
  342. }
  343. });
  344. }, function (index) {
  345. layer.closeAll(index);
  346. });
  347. }
  348. </script>
  349. {include file="public/footer" /}