123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <{include file="get_kindeditor.html"}>
- <style>
- .set-nav {
- margin: 0 auto;
- }
- .set-nav-hr {
- background-color: #ddd;
- height: 1px;
- position: relative;
- }
- .form-group label {
- font-weight: 600;
- }
- .checkbox-inline, .radio-inline {
- font-weight: 400!important;
- }
- .rowlabel {
- font-weight: 300!important;
- }
- .music_play_hide {
- display:none;
- }
- </style>
- <div id="activity_container">
- <form id="activity_form">
- <div class="activity_center">
- <{include file="./admin/activity/common_nav.html"}>
- <input name="events_id" type="hidden" value="<{$events_Data.events.id}>">
-
- <div class="panel panel-default">
- <div class="panel-body">
- <div class="form-group">
- <label class="control-label rowlabel">文章标题:</label>
- <input name="article_title" class="form-control" type="text" style="width:300px;" value="<{$eventData.article_title}>"/>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">作者:</label>
- <input name="article_author" class="form-control" type="text" style="width:300px;" value="<{$eventData.article_author}>"/>
- </div>
- <div class="row">
- <div class="form-group col-md-2">
- <label class="control-label rowlabel">浏览量基数:</label>
- <input name="article_pass_base_num" class="form-control" type="text" value="<{$eventData.article_pass_base_num}>"/>
- </div>
- <div class="form-group col-md-2">
- <label class="control-label rowlabel">赞基数:</label>
- <input name="article_praise" class="form-control" type="text" value="<{$eventData.article_praise}>"/>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">原文链接:</label>
- <input name="article_original_url" class="form-control" type="text" style="width:300px;" value="<{$eventData.article_original_url}>"/>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">正文内容:</label>
- <textarea name="article_text" style="width:100%;height:200px;"><{$eventData.article_text}></textarea>
- </div>
- <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>
- </div>
- </div>
- </div>
- <{include file="./admin/activity/common_right.html"}>
- <div style="clear:both;"></div>
- </form>
- </div>
- <script>
- var editor;
- KISSY.use('node, io, event, jquery', function (S, Node, IO, Event, jQuery) {
- var $ = S.all;
-
- var activity_submit_status = false; //按钮状态
- function submit_button_active() {
- activity_submit_status = true;
- $("#activity_submit").addClass('active').all('i').show();
- }
- function submit_button_default() {
- activity_submit_status = false;
- $("#activity_submit").removeClass('active').all('i').hide();
- }
-
- $("#activity_submit").on('click', function () {
- if (activity_submit_status) {
- return false;
- }
- submit_button_active();
-
- var article_text = editor.html();
- $("textarea[name=article_text]").val(article_text);
-
- formData = IO.serialize("#activity_form");
-
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=Admin_Activity_SetPage&a=ReqUpArticle'
- , data: formData
- , success: function (data) {
- if (data.ok) { //ok
- location.href = location.href;
- } else {
- alert('操作失败,原因:'+data.msg);
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- });
- });
- KindEditor.ready(function(K) {
- editor = K.create('textarea[name=article_text]', {
- allowFileManager : true,
- uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
- fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson'
- });
- });
- </script>
- <{include file="./admin/bottom.html"}>
|