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.

text_m.htm 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>可视化编辑</title>
  5. <script type="text/javascript">
  6. var eyou_basefile = "{$Request.baseFile}";
  7. var module_name = "{$Think.const.MODULE_NAME}";
  8. var GetUploadify_url = "{:url('Uploadify/upload')}";
  9. var __root_dir__ = "__ROOT_DIR__";
  10. var __lang__ = "{$admin_lang}";
  11. </script>
  12. {load href="__STATIC__/common/js/jquery.min.js" /}
  13. {load href="__PUBLIC__/plugins/layer-v3.1.0/layer.js" /}
  14. <style type="text/css">
  15. .ncap-form-default {
  16. padding: 10px 0;
  17. overflow: hidden;
  18. }
  19. a {
  20. text-decoration: none;
  21. }
  22. a.ncap-btn-big {
  23. font: bold 14px/20px "microsoft yahei", arial;
  24. color: #777;
  25. background-color: #ECF0F1;
  26. text-align: center;
  27. vertical-align: middle;
  28. display: inline-block;
  29. height: 20px;
  30. padding: 7px 19px;
  31. border: solid 1px #BEC3C7;
  32. border-radius: 3px;
  33. cursor: pointer;
  34. }
  35. a.ncap-btn-green {
  36. background-color: #4fc0e8;
  37. color: #FFF;
  38. text-shadow: 0 -1px 0 rgba(0,0,0,0.10);
  39. border-color: #3aa8cf;
  40. }
  41. .ckeditor {
  42. /*height: auto;*/
  43. /*height: 500px;*/
  44. }
  45. .panel-default {
  46. /*height: 510px;*/
  47. }
  48. </style>
  49. </head>
  50. <body>
  51. <div class="panel panel-default">
  52. <div class="span12 ckeditor">
  53. <form class="form-horizontal" id="post_form" onsubmit="return check_submit();">
  54. <div class="control-group">
  55. <textarea name="content" id="content" style="width: 100%; height: 500px;"></textarea>
  56. </div>
  57. <div class="control-group ncap-form-default">
  58. <div class="controls">
  59. <input type="hidden" name="id" value="{$field.id|default=''}">
  60. <input type="hidden" name="type" value="{$field.type|default=''}">
  61. <input type="hidden" name="page" value="{$field.page|default=''}">
  62. <input type="hidden" name="v" value="{$v|default='pc'}">
  63. <input type="hidden" name="lang" value="{$field.lang|default='cn'}">
  64. <input type="hidden" name="idcode" value="{$field.idcode|default=''}">
  65. <input type="hidden" name="iframe" value="1">
  66. <a href="JavaScript:void(0);" onclick="check_submit();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. <script type="text/javascript">
  74. $(function(){
  75. var oldhtml = parent.eyou_getOldHtml();
  76. $('textarea[name=content]').val(oldhtml);
  77. });
  78. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  79. function check_submit()
  80. {
  81. parent.eyou_layer_loading('正在处理');
  82. var url = "{:url('api/Uiset/submit', ['_ajax'=>1])}";
  83. $.ajax({
  84. url: url,
  85. type: 'POST',
  86. dataType: 'JSON',
  87. data: $('#post_form').serialize(),
  88. success: function(res){
  89. parent.layer.closeAll();
  90. if (res.code == 1) {
  91. $('#workspace', window.parent.document).attr('src', $('#workspace', window.parent.document).attr('src'));
  92. parent.layer.msg(res.msg, {icon: 1, shade: 0.3, time: 1000});
  93. } else {
  94. parent.eyou_showErrorAlert(res.msg);
  95. }
  96. },
  97. error: function(e){
  98. parent.layer.closeAll();
  99. parent.eyou_showErrorAlert(e.responseText);
  100. }
  101. });
  102. }
  103. </script>
  104. </body>
  105. </html>