files.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <form method="post" class="js-ajax-form">
  6. <table class="table table-hover table-bordered table-list">
  7. <thead>
  8. <tr>
  9. <th>文件名</th>
  10. <th>操作名</th>
  11. <th>文件路径</th>
  12. <th>{:lang('Description')}</th>
  13. <th width="120">{:lang('ACTIONS')}</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <foreach name="files" item="vo">
  18. <tr>
  19. <td>{$vo.name}</td>
  20. <td>{$vo.action}</td>
  21. <td>{$vo.file}.html</td>
  22. <td>{$vo.description}</td>
  23. <td>
  24. <a class="btn btn-xs btn-primary"
  25. href="javascript:;"
  26. data-file="{$vo.id}"
  27. data-title="{$vo.name} {$vo.file}.html"
  28. onclick="openDesignDialog(this)">设计</a>
  29. </td>
  30. </tr>
  31. </foreach>
  32. </tbody>
  33. </table>
  34. </form>
  35. </div>
  36. <script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
  37. <script>
  38. function openDesignDialog(obj) {
  39. var $obj = $(obj);
  40. var fileId = $obj.data('file');
  41. var title = $obj.data('title');
  42. parent.openIframeLayer("{:url('Theme/fileSetting')}?file_id=" + fileId, title, {
  43. area: GV.IS_MOBILE ? ['100%', '100%'] : ['700px', '90%'],
  44. offset: GV.IS_MOBILE ? ['0px', '0px'] : 'auto',
  45. btn: ['确定', '取消'],
  46. yes: function (index, layero) {
  47. var iframeWin = parent.window[layero.find('iframe')[0]['name']];
  48. iframeWin.confirm();
  49. //layer.close(index); //如果设定了yes回调,需进行手工关闭
  50. }
  51. });
  52. }
  53. </script>
  54. </body>
  55. </html>