setPage_event.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. .ke-container {
  27. width:640px!important
  28. }
  29. </style>
  30. <div id="activity_container">
  31. <form id="activity_form">
  32. <div class="activity_center">
  33. <{include file="./admin/activity/common_nav.html"}>
  34. <input name="events_id" type="hidden" value="<{$events_Data.events.id}>">
  35. <div class="panel panel-default">
  36. <div class="panel-body">
  37. <div class="form-group">
  38. <label class="control-label rowlabel">正文内容:</label>
  39. <textarea name="events_tips" class="form-control" rows="15" style="width:;"><{$eventData.events_tips}></textarea>
  40. </div>
  41. <div class="form-group">
  42. <label class="control-label rowlabel">互动提示语:</label>
  43. <input name="events_hd_tips" class="form-control" type="text" style="width:300px;" value="<{$eventData.events_hd_tips}>"/>
  44. </div>
  45. <div class="form-group">
  46. <label class="control-label rowlabel">活动规则提示语:</label>
  47. <input name="operationt_tips" class="form-control" type="text" style="width:300px;" value="<{$eventData.operationt_tips}>"/>
  48. </div>
  49. <div class="form-group">
  50. <label class="control-label rowlabel">活动规则:</label>
  51. <textarea name="events_rules" class="form-control" rows="15" style="width:;"><{$eventData.events_rules}></textarea>
  52. </div>
  53. <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>
  54. </div>
  55. </div>
  56. </div>
  57. <{include file="./admin/activity/common_right.html"}>
  58. <div style="clear:both;"></div>
  59. </form>
  60. </div>
  61. <script>
  62. var tips_editor,rules_editor;
  63. KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
  64. var $ = S.all;
  65. var Query = Uri.Query;
  66. var activity_submit_status = false; //按钮状态
  67. function submit_button_active() {
  68. activity_submit_status = true;
  69. $("#activity_submit").addClass('active').all('i').show();
  70. }
  71. function submit_button_default() {
  72. activity_submit_status = false;
  73. $("#activity_submit").removeClass('active').all('i').hide();
  74. }
  75. $("#activity_submit").on('click', function () {
  76. if (activity_submit_status) {
  77. return false;
  78. }
  79. submit_button_active();
  80. var events_tips = tips_editor.html();
  81. var events_rules = rules_editor.html();
  82. formData = IO.serialize("#activity_form");
  83. formData = new Query(formData).set('events_tips', events_tips).toString();
  84. formData = new Query(formData).set('events_rules', events_rules).toString();
  85. new IO({
  86. type: "post"
  87. , url: VG.conf.root_domain + '/?c=Admin_Activity_SetPage&a=ReqUpRoutine'
  88. , data: formData
  89. , success: function (data) {
  90. if (data.ok) { //ok
  91. location.href = location.href;
  92. } else {
  93. alert('操作失败,原因:'+data.msg);
  94. location.href = location.href;
  95. }
  96. return false;
  97. }
  98. , error: function (NULL, textStatus) {
  99. alert("请求服务器失败,原因:"+textStatus);
  100. }
  101. , dataType: "json"
  102. });
  103. });
  104. });
  105. var KCONFIG = {
  106. allowFileManager : true,
  107. uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
  108. fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
  109. items : [
  110. 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
  111. 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
  112. 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight', 'flash']
  113. }
  114. KindEditor.ready(function(K) {
  115. tips_editor = K.create('textarea[name=events_tips]', KCONFIG);
  116. });
  117. KindEditor.ready(function(K) {
  118. rules_editor = K.create('textarea[name=events_rules]', KCONFIG);
  119. });
  120. </script>
  121. <{include file="./admin/bottom.html"}>