setPage_h5.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <{include file="./admin/header.html"}>
  2. <{include file="./admin/left.html"}>
  3. <{include file="./admin/nav.html"}>
  4. <{include file="get_kindeditor.html"}>
  5. <style>
  6. .set-nav {
  7. margin: 0 auto;
  8. }
  9. .set-nav-hr {
  10. background-color: #ddd;
  11. height: 1px;
  12. position: relative;
  13. }
  14. .form-group label {
  15. font-weight: 600;
  16. }
  17. .checkbox-inline, .radio-inline {
  18. font-weight: 400!important;
  19. }
  20. .rowlabel {
  21. font-weight: 300!important;
  22. }
  23. .music_play_hide {
  24. display:none;
  25. }
  26. </style>
  27. <div id="activity_container">
  28. <form id="activity_form">
  29. <div class="activity_center">
  30. <{include file="./admin/activity/common_nav.html"}>
  31. <input name="events_id" type="hidden" value="<{$events_Data.events.id}>">
  32. <div class="panel panel-default">
  33. <div class="panel-body">
  34. <div class="form-group">
  35. <label class="control-label rowlabel">文章标题:</label>
  36. <input name="article_title" class="form-control" type="text" style="width:300px;" value="<{$eventData.article_title}>"/>
  37. </div>
  38. <div class="form-group">
  39. <label class="control-label rowlabel">作者:</label>
  40. <input name="article_author" class="form-control" type="text" style="width:300px;" value="<{$eventData.article_author}>"/>
  41. </div>
  42. <div class="row">
  43. <div class="form-group col-md-2">
  44. <label class="control-label rowlabel">浏览量基数:</label>
  45. <input name="article_pass_base_num" class="form-control" type="text" value="<{$eventData.article_pass_base_num}>"/>
  46. </div>
  47. <div class="form-group col-md-2">
  48. <label class="control-label rowlabel">赞基数:</label>
  49. <input name="article_praise" class="form-control" type="text" value="<{$eventData.article_praise}>"/>
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label class="control-label rowlabel">原文链接:</label>
  54. <input name="article_original_url" class="form-control" type="text" style="width:300px;" value="<{$eventData.article_original_url}>"/>
  55. </div>
  56. <div class="form-group">
  57. <label class="control-label rowlabel">正文内容:</label>
  58. <textarea name="article_text" style="width:100%;height:200px;"><{$eventData.article_text}></textarea>
  59. </div>
  60. <a id="activity_submit" href="javascript:;" class="button button-3d button-primary button-rounded"><i class="fa fa-refresh fa-spin" style="display:none;"></i> 保存设置</a>
  61. </div>
  62. </div>
  63. </div>
  64. <{include file="./admin/activity/common_right.html"}>
  65. <div style="clear:both;"></div>
  66. </form>
  67. </div>
  68. <script>
  69. var editor;
  70. KISSY.use('node, io, event, jquery', function (S, Node, IO, Event, jQuery) {
  71. var $ = S.all;
  72. var activity_submit_status = false; //按钮状态
  73. function submit_button_active() {
  74. activity_submit_status = true;
  75. $("#activity_submit").addClass('active').all('i').show();
  76. }
  77. function submit_button_default() {
  78. activity_submit_status = false;
  79. $("#activity_submit").removeClass('active').all('i').hide();
  80. }
  81. $("#activity_submit").on('click', function () {
  82. if (activity_submit_status) {
  83. return false;
  84. }
  85. submit_button_active();
  86. var article_text = editor.html();
  87. $("textarea[name=article_text]").val(article_text);
  88. formData = IO.serialize("#activity_form");
  89. new IO({
  90. type: "post"
  91. , url: VG.conf.root_domain + '/?c=Admin_Activity_SetPage&a=ReqUpArticle'
  92. , data: formData
  93. , success: function (data) {
  94. if (data.ok) { //ok
  95. location.href = location.href;
  96. } else {
  97. alert('操作失败,原因:'+data.msg);
  98. }
  99. return false;
  100. }
  101. , error: function (NULL, textStatus) {
  102. alert("请求服务器失败,原因:"+textStatus);
  103. }
  104. , dataType: "json"
  105. });
  106. });
  107. });
  108. KindEditor.ready(function(K) {
  109. editor = K.create('textarea[name=article_text]', {
  110. allowFileManager : true,
  111. uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
  112. fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson'
  113. });
  114. });
  115. </script>
  116. <{include file="./admin/bottom.html"}>