123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- ##tlayout("admin/layout.htm"){
- <!-- 富文本编辑器所需css和js -->
- <link rel="stylesheet" href="/admin/script/kindeditor/themes/default/default.css" />
- <script charset="utf-8" src="/admin/script/kindeditor/kindeditor-all-min.js"></script>
- <script charset="utf-8" src="/admin/script/kindeditor/lang/zh_CN.js"></script>
- <div class="breadcrumbs" style="height: 50px;">
- <div class="breadcrumbs_title">编辑文章</div>
- </div>
- <div class="page-content">
- <div class="row" style="margin-top: 30px;">
- <div class="col-xs-12">
- <form action="/admin/article/update" method="post" class="form-horizontal" id="submit_form">
- <div class="form-group">
- <label class="col-sm-1 control-label"><span style="color: #f00">*</span>标题</label>
- <div class="col-sm-11">
- ##if(article.type==1){
- <input class="col-xs-10 col-sm-5" type="text" name="title" value="${article.title!}" />
- ##}else{
- <input class="col-xs-10 col-sm-5" type="text" name="title" value="${article.title!}" readonly="readonly" />
- ##}
- </div>
- </div>
- <div class="space-4"></div>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span style="color: #f00">*</span>详细内容</label>
- <div class="col-sm-11">
- <textarea class="form-control textarea_editor" name="content">${article.content!}</textarea>
- </div>
- </div>
- <div class="space-4"></div>
- <div class="form-group">
- <label class="col-sm-1 control-label"></label>
- <div class="col-sm-11">
- <button class="btn btn-info" type="button" onclick="submitForm()"><i class="icon-ok bigger-110"></i>确定</button>
-
- <button class="btn" type="button" onclick="javascript:history.back(-1)"><i class="icon-undo bigger-110"></i>取消</button>
- </div>
- </div>
- <input type="hidden" name="id" value="${article.id!}" />
- </form>
- </div>
- </div>
- </div>
- <script>
- var editor;
- KindEditor.ready(function(K) {
- editor = K.create('textarea[name="content"]', {
- allowFileManager : true,
- items : [
- 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
- 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
- 'insertunorderedlist', '|', 'emoticons','image', 'link', 'unlink', 'table', 'lineheight'],
- thremType:'simple',
- width:'80%',
- height:'500px',
- basePath:'/admin/script/kindeditor/',
- uploadJson : '/admin/editorUploadImg',
- });
- });
- function submitForm(){
-
- editor.sync();
- $('#submit_form').ajaxSubmit({
- success: function(data){
- alert(data.msg);
- if(data.success){
- window.location.href="/admin/article/list";
- }
- }
- });
- }
- </script>
- ##}
|