Sin descripción
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.

channel.htm 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. <input type="hidden" name="id" value="{$field.id|default=''}">
  56. <input type="hidden" name="type" value="{$field.type|default=''}">
  57. <input type="hidden" name="page" value="{$field.page|default=''}">
  58. <input type="hidden" name="v" value="{$v|default='pc'}">
  59. <input type="hidden" name="lang" value="{$field.lang|default='cn'}">
  60. <input type="hidden" name="idcode" value="{$field.idcode|default=''}">
  61. <label class="checkbox"><input type="button" class="btn" value="确认提交" onclick="check_submit();" /></label>
  62. </div>
  63. </div>
  64. </form>
  65. </div>
  66. </div>
  67. </div>
  68. <script type="text/javascript">
  69. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  70. function check_submit()
  71. {
  72. layer_loading('正在处理');
  73. var url = "{:url('api/Uiset/submit', ['_ajax'=>1])}";
  74. $.ajax({
  75. url: url,
  76. type: 'POST',
  77. dataType: 'JSON',
  78. data: $('#post_form').serialize(),
  79. success: function(res){
  80. layer.closeAll();
  81. if (res.code == 1) {
  82. var _parent = parent;
  83. _parent.layer.close(parentObj);
  84. _parent.layer.msg(res.msg, {icon: 1, shade: 0.3, time: 1000}, function(){
  85. _parent.window.location.reload();
  86. });
  87. } else {
  88. parent.eyou_showErrorAlert(res.msg);
  89. }
  90. },
  91. error: function(e){
  92. layer.closeAll();
  93. parent.eyou_showErrorAlert(e.responseText);
  94. }
  95. });
  96. }
  97. /**
  98. * 封装的加载层
  99. */
  100. function layer_loading(msg){
  101. var loading = layer.msg(
  102. msg+'...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请勿刷新页面',
  103. {
  104. icon: 1,
  105. time: 3600000,
  106. shade: [0.2]
  107. });
  108. var index = layer.load(3, {
  109. shade: [0.1,'#fff']
  110. });
  111. return loading;
  112. }
  113. </script>
  114. </body>
  115. </html>