123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <{include file="get_kindeditor.html"}>
- <script type="text/javascript" src="<{$web_cfg.cdn}>/public/static/js/jquery-1.7.2.min.js"></script>
- <link rel="stylesheet" href="<{$web_cfg.cdn}>/public/static/js/jquery.minicolors.css" />
- <script type="text/javascript" src="<{$web_cfg.cdn}>/public/static/js/jquery.minicolors.js"></script>
- <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>
- <form id="up_blletin_form">
- <div class="col-md-8" style="padding-left: 30px;">
- <div class="form-group">
- <input type="hidden" name="bulletin_id" value="<{$bulletinData.id}>">
- <label class="control-label rowlabel">标题</label>
- <input name="title" type="text" class="form-control" value="<{$bulletinData.title}>" >
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">内容</label>
- <textarea name="content" rows="2" class="form-control" style="width:100%;height: 400px;" id="content"><{$bulletinData.content}></textarea>
- </div>
- <div>
- <a id="up_blletin_btn" href="javascript:;" class="button button-primary button-small">修改公告</a>
- </div>
- </div>
- </form>
- <script>
- var content_editor;
- KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
- var $ = S.all;
- var Query = Uri.Query;
-
- $("#up_blletin_btn").on('click', function () {
- var title = $("input[name=title]").val();
- if (!title) {
- alert('请填写公告标题');
- return false;
- }
- var content = content_editor.html();
- if (!content) {
- alert('请填公告内容');
- return false;
- }
-
- var formData = IO.serialize("#up_blletin_form");
- formData = new Query(formData).set('content', content).toString();
-
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=Admin_Platform_Bulletin&a=ReqUp'
- , data: formData
- , success: function (data) {
- if (data.ok) { //ok
- location.href = '<{$web_cfg.domain}>?c=Admin_Platform_Bulletin&a=PageList';
- } else {
- alert('操作失败,原因:'+data.msg);
- location.href = location.href;
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- });
-
- });
- var KCONFIG = {
- allowFileManager : true,
- uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
- fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
- items : [
- 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
- 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
- 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight']
- }
- KindEditor.ready(function(K) {
- content_editor = K.create('textarea[name=content]', KCONFIG);
- });
- </script>
- <{include file="./admin/bottom.html"}>
|