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.

gbookattr_index.htm 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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.attr_id}"></div>
  53. </td>
  54. <td class="sort">
  55. <div class="tc w70">
  56. {$vo.attr_id}
  57. </div>
  58. </td>
  59. <td class="" style="width: 100%;">
  60. <div class="tl text-l10">
  61. {$vo.attr_name}
  62. </div>
  63. </td>
  64. <td class="">
  65. <div class="w150 tc ellipsis"><a href="{:url('RecycleBin/gbookattr_index', array('typeid'=>$vo['typeid']))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  66. </td>
  67. <td>
  68. <div class="w100 tc">
  69. {$vo.update_time|date='Y-m-d',###}
  70. </div>
  71. </td>
  72. <td class="operation">
  73. <div class="w120 tc">
  74. {eq name="'RecycleBin@gbookattr_recovery'|is_check_access" value="1"}
  75. <a class="btn blue" href="javascript:void(0);" data-url="{:url('RecycleBin/gbookattr_recovery')}" data-id="{$vo.attr_id}" data-attr_name="{$vo.attr_name}" onClick="recovery(this);">还原</a>
  76. {/eq}
  77. {eq name="'RecycleBin@gbookattr_del'|is_check_access" value="1"}
  78. <i></i>
  79. <a class="btn red" href="javascript:void(0);" data-url="{:url('RecycleBin/gbookattr_del')}" data-id="{$vo.attr_id}" data-attr_name="{$vo.attr_name}" onClick="delfun(this);">彻底删除</a>
  80. {/eq}
  81. </div>
  82. </td>
  83. </tr>
  84. {/foreach}
  85. {/empty}
  86. </tbody>
  87. </table>
  88. </div>
  89. <div class="iDiv" style="display: none;"></div>
  90. </div>
  91. {notempty name="list"}
  92. <div class="tDiv">
  93. <div class="tDiv2">
  94. <div class="fbutton checkboxall">
  95. <input type="checkbox" autocomplete="off" class="checkAll">
  96. </div>
  97. {eq name="'RecycleBin@gbookattr_recovery'|is_check_access" value="1"}
  98. <div class="fbutton">
  99. <a onclick="batch_recovery(this, 'ids');" data-url="{:url('RecycleBin/gbookattr_recovery')}" class="layui-btn layui-btn-primary">
  100. <span>批量还原</span>
  101. </a>
  102. </div>
  103. {/eq}
  104. {eq name="'RecycleBin@gbookattr_del'|is_check_access" value="1"}
  105. <div class="fbutton">
  106. <a onclick="batch_del(this, 'ids');" data-url="{:url('RecycleBin/gbookattr_del')}" class="layui-btn layui-btn-primary">
  107. <span>批量彻底删除</span>
  108. </a>
  109. </div>
  110. {/eq}
  111. {include file="public/page" /}
  112. </div>
  113. <div style="clear:both"></div>
  114. </div>
  115. <!--分页位置-->
  116. {/notempty}
  117. </div>
  118. </div>
  119. <script type="text/javascript">
  120. try{
  121. var mt20_1649209614 = sessionStorage.getItem("mt20_1649209614");
  122. if (mt20_1649209614 != 1){
  123. console.log("recycle_bin",mt20_1649209614);
  124. // $("#bodystyle").css("padding"," 15px 0px");
  125. }
  126. }catch(e){}
  127. $(function(){
  128. $('input[name*=ids]').click(function(){
  129. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  130. $('.checkAll').prop('checked','checked');
  131. } else {
  132. $('.checkAll').prop('checked', false);
  133. }
  134. });
  135. $('input[type=checkbox].checkAll').click(function(){
  136. $('input[type=checkbox]').prop('checked',this.checked);
  137. });
  138. });
  139. $(document).ready(function(){
  140. // 表格行点击选中切换
  141. $('#flexigrid > table>tbody >tr').click(function(){
  142. $(this).toggleClass('trSelected');
  143. });
  144. // 点击刷新数据
  145. $('.fa-refresh').click(function(){
  146. location.href = location.href;
  147. });
  148. });
  149. // 还原
  150. function recovery(obj){
  151. layer.confirm('确认还原?表单与关联栏目将一起还原。', {
  152. shade: layer_shade,
  153. area: ['480px', '190px'],
  154. move: false,
  155. title: '提示',
  156. btnAlign:'r',
  157. closeBtn: 3,
  158. btn: ['确定', '取消'] ,//按钮
  159. success: function () {
  160. $(".layui-layer-content").css('text-align', 'left');
  161. }
  162. }, function(){
  163. layer_loading('正在处理');
  164. // 确定
  165. $.ajax({
  166. type : 'post',
  167. url : $(obj).attr('data-url'),
  168. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  169. dataType : 'json',
  170. success : function(data){
  171. layer.closeAll();
  172. if(data.code == 1){
  173. layer.msg(data.msg, {icon: 6});
  174. window.location.reload();
  175. }else{
  176. layer.alert(data.msg, {icon: 5, title:false});
  177. }
  178. }
  179. })
  180. }, function(index){
  181. layer.close(index);
  182. });
  183. return false;
  184. }
  185. /**
  186. * 批量还原提交
  187. */
  188. function batch_recovery(obj, name) {
  189. var a = [];
  190. $('input[name^='+name+']').each(function(i,o){
  191. if($(o).is(':checked')){
  192. a.push($(o).val());
  193. }
  194. })
  195. if(a.length == 0){
  196. layer.alert('请至少选择一项', {
  197. shade: layer_shade,
  198. area: ['480px', '190px'],
  199. move: false,
  200. title: '提示',
  201. btnAlign:'r',
  202. closeBtn: 3,
  203. success: function () {
  204. $(".layui-layer-content").css('text-align', 'left');
  205. }
  206. });
  207. return;
  208. }
  209. // 还原按钮
  210. layer.confirm('确认批量还原?选定表单与关联栏目一起还原.', {
  211. shade: layer_shade,
  212. area: ['480px', '190px'],
  213. move: false,
  214. title: '提示',
  215. btnAlign:'r',
  216. closeBtn: 3,
  217. btn: ['确定', '取消'] ,//按钮
  218. success: function () {
  219. $(".layui-layer-content").css('text-align', 'left');
  220. }
  221. }, function () {
  222. layer_loading('正在处理');
  223. $.ajax({
  224. type: "POST",
  225. url: $(obj).attr('data-url'),
  226. data: {del_id:a, _ajax:1},
  227. dataType: 'json',
  228. success: function (data) {
  229. layer.closeAll();
  230. if(data.code == 1){
  231. layer.msg(data.msg, {icon: 6});
  232. window.location.reload();
  233. }else{
  234. layer.alert(data.msg, {icon: 5, title:false});
  235. }
  236. },
  237. error:function(e){
  238. layer.closeAll();
  239. layer.alert(e.responseText, {icon: 5, title:false});
  240. }
  241. });
  242. }, function (index) {
  243. layer.closeAll(index);
  244. });
  245. }
  246. // 删除
  247. function delfun(obj){
  248. layer.confirm('确认彻底删除?', {
  249. shade: layer_shade,
  250. area: ['480px', '190px'],
  251. move: false,
  252. title: '提示',
  253. btnAlign:'r',
  254. closeBtn: 3,
  255. btn: ['确定', '取消'] ,//按钮
  256. success: function () {
  257. $(".layui-layer-content").css('text-align', 'left');
  258. }
  259. }, function(){
  260. layer_loading('正在处理');
  261. // 确定
  262. $.ajax({
  263. type : 'post',
  264. url : $(obj).attr('data-url'),
  265. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  266. dataType : 'json',
  267. success : function(data){
  268. layer.closeAll();
  269. if(data.code == 1){
  270. layer.msg(data.msg, {icon: 6});
  271. window.location.reload();
  272. }else{
  273. layer.alert(data.msg, {icon: 5, title:false});
  274. }
  275. }
  276. })
  277. }, function(index){
  278. layer.close(index);
  279. });
  280. return false;
  281. }
  282. /**
  283. * 批量删除提交
  284. */
  285. function batch_del(obj, name) {
  286. var a = [];
  287. $('input[name^='+name+']').each(function(i,o){
  288. if($(o).is(':checked')){
  289. a.push($(o).val());
  290. }
  291. })
  292. if(a.length == 0){
  293. layer.alert('请至少选择一项', {
  294. shade: layer_shade,
  295. area: ['480px', '190px'],
  296. move: false,
  297. title: '提示',
  298. btnAlign:'r',
  299. closeBtn: 3,
  300. success: function () {
  301. $(".layui-layer-content").css('text-align', 'left');
  302. }
  303. });
  304. return;
  305. }
  306. // 删除按钮
  307. layer.confirm('确认批量彻底删除?', {
  308. shade: layer_shade,
  309. area: ['480px', '190px'],
  310. move: false,
  311. title: '提示',
  312. btnAlign:'r',
  313. closeBtn: 3,
  314. btn: ['确定', '取消'] ,//按钮
  315. success: function () {
  316. $(".layui-layer-content").css('text-align', 'left');
  317. }
  318. }, function () {
  319. layer_loading('正在处理');
  320. $.ajax({
  321. type: "POST",
  322. url: $(obj).attr('data-url'),
  323. data: {del_id:a, _ajax:1},
  324. dataType: 'json',
  325. success: function (data) {
  326. layer.closeAll();
  327. if(data.code == 1){
  328. layer.msg(data.msg, {icon: 6});
  329. window.location.reload();
  330. }else{
  331. layer.alert(data.msg, {icon: 5, title:false});
  332. }
  333. },
  334. error:function(e){
  335. layer.closeAll();
  336. layer.alert(e.responseText, {icon: 5, title:false});
  337. }
  338. });
  339. }, function (index) {
  340. layer.closeAll(index);
  341. });
  342. }
  343. </script>
  344. {include file="public/footer" /}