暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

arclist.htm 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>可视化编辑</title>
  5. <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
  6. <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css">
  7. {load href="__STATIC__/common/js/jquery.min.js" /}
  8. {load href="__PUBLIC__/plugins/layer-v3.1.0/layer.js" /}
  9. <style type="text/css">
  10. .container-fluid {
  11. padding: 10px 10px;
  12. overflow: hidden;
  13. }
  14. .control-group {
  15. padding: 5px 0px;
  16. }
  17. .controls{
  18. text-align: center;
  19. }
  20. .input{
  21. width: 92px;
  22. }
  23. .select {
  24. height: 28px;
  25. font-size: 12px;
  26. border: 1px solid #ddd;
  27. border-radius:4px;
  28. }
  29. .btn{
  30. background-color: #4fc0e8;
  31. color: #FFF;
  32. border-radius: 4px;
  33. padding: 6px 20px;
  34. }
  35. .btn:hover {
  36. color: #FFF;
  37. background-color: #3aa8cf;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="container-fluid">
  43. <div class="row-fluid">
  44. <div class="span12">
  45. <form class="form-horizontal" id="post_form" onsubmit="return check_submit();">
  46. <div class="control-group">
  47. <div class="controls"><label class="control-label" for="inputEmail">请选择栏目:</label>
  48. <select id="typeid" name="typeid" class="select">
  49. {$arctype_html}
  50. </select>
  51. </div>
  52. </div>
  53. <!-- <div class="control-group">
  54. <div class="controls">
  55. <label class="control-label" for="inputPassword">调用条数:</label>
  56. <input type="text" name="row" value="{$field.info.row|default=5}" class="input">
  57. </div>
  58. </div> -->
  59. <div class="control-group">
  60. <div class="controls">
  61. <input type="hidden" name="id" value="{$field.id|default=''}">
  62. <input type="hidden" name="type" value="{$field.type|default=''}">
  63. <input type="hidden" name="page" value="{$field.page|default=''}">
  64. <input type="hidden" name="v" value="{$v|default='pc'}">
  65. <input type="hidden" name="lang" value="{$field.lang|default='cn'}">
  66. <input type="hidden" name="idcode" value="{$field.idcode|default=''}">
  67. <label class="checkbox"><input type="button" class="btn" value="确认提交" onclick="check_submit();" /></label>
  68. </div>
  69. </div>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. <script type="text/javascript">
  75. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  76. function check_submit()
  77. {
  78. var current_channel = $('#typeid').find('option:selected').attr('data-current_channel');
  79. current_channel = parseInt(current_channel);
  80. var js_allow_channel_arr = {$js_allow_channel_arr};
  81. if ($.inArray(current_channel, js_allow_channel_arr) == -1) {
  82. layer.msg('该栏目没有文档列表!', {icon: 5});
  83. return false;
  84. }
  85. layer_loading('正在处理');
  86. var url = "{:url('api/Uiset/submit', ['_ajax'=>1])}";
  87. $.ajax({
  88. url: url,
  89. type: 'POST',
  90. dataType: 'JSON',
  91. data: $('#post_form').serialize(),
  92. success: function(res){
  93. layer.closeAll();
  94. if (res.code == 1) {
  95. var _parent = parent;
  96. _parent.layer.close(parentObj);
  97. _parent.layer.msg(res.msg, {icon: 1, shade: 0.3, time: 1000}, function(){
  98. _parent.window.location.reload();
  99. });
  100. } else {
  101. parent.eyou_showErrorAlert(res.msg);
  102. }
  103. },
  104. error: function(e){
  105. layer.closeAll();
  106. parent.eyou_showErrorAlert(e.responseText);
  107. }
  108. });
  109. }
  110. /**
  111. * 封装的加载层
  112. */
  113. function layer_loading(msg){
  114. var loading = layer.msg(
  115. msg+'...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请勿刷新页面',
  116. {
  117. icon: 1,
  118. time: 3600000,
  119. shade: [0.2]
  120. });
  121. var index = layer.load(3, {
  122. shade: [0.1,'#fff']
  123. });
  124. return loading;
  125. }
  126. </script>
  127. </body>
  128. </html>