v3.9.9.16

- 新增模板编辑功能(重点)
- 增加嵌入报表TOKEN方式
- 优化编辑界面
- 优化连接池选择
- 各类问题提示优化
This commit is contained in:
JohnYan 2021-10-17 18:09:19 +08:00
parent fec4cda342
commit b8406c19d2
19 changed files with 210 additions and 113 deletions

View File

@ -118,7 +118,7 @@ url: 登录成功后跳转链接
-------------------------------------------------------------------------------
### 应用场景四: 在django项目中当作apps使用
**django新手不建意使用此方法**
- 最简单的方法(推荐!!!!)
- django新手推荐下载此项目使用
```shell script
请直接下载gitee/github的项目后
pip install smartchart
@ -186,6 +186,7 @@ v3.9.9.5 开发界面优化,fix定时刷新BUG,新增批量数据集删除
v3.9.9.7 增加python连接器,数据池,自定义主模板,优化开发界面
v3.9.9.10 DIV设定中可以写css,新增内置动态表格,优化布局支持,增加config文件
v3.9.9.12 优化后台数据处理性能,Jupyter使用体验
v3.9.9.16 新增模板编辑功能,增加嵌入报表TOKEN方式,优化编辑界面,优化连接池选择
```
-------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ var editor1 = '';
var helpText = '';
var helmodal = $('#myModal');
$('#ace-theme').val(theme);
theme_init();
$("#ace-theme").change(function () {
theme=$("#ace-theme").val();
editor1.setTheme("ace/theme/"+theme);
@ -36,4 +36,18 @@ function load_help(name) {
type: "get", url: 'https://www.smartchart.cn/smartdata/api/?i='+name,
success: function (data) {helpText=data;helmodal.html(helpText);}
})}helmodal.modal('show');
}
function theme_init(){
theme_option = `<option value="clouds">clouds</option>
<option value="monokai">monokai</option>
<option value="chrome">chrome</option>
<option value="github">github</option>
<option value="eclipse">eclipse</option>
<option value="tomorrow">tomorrow</option>
<option value="dawn">dawn</option>
<option value="sqlserver">sqlserver</option>
<option value="twilight">twilight</option>`;
$('#ace-theme').append(theme_option).val(theme);
}

View File

@ -1,12 +1,13 @@
var dsid = GetQueryString('dsid');
var divid = GetQueryString('divid');
var divid = GetQueryString('divid') || '';
var on = GetQueryString('on') || '1';
var dsname ='';
var seq = GetQueryString('seq') || '';
$('#dsseq').val(seq);
if(divid) {dssq_init(16);}else{$('#dsseq').css('display', 'None');}
$.ajax({type: "get",url: '/echart/get_sqlstr/?dsid='+ dsid,success: function (data)
{editor1.setValue(data['msg']);dsname=data['name'];$('#title').text('#'+seq+":"+dsid+dsname);$('#conn').text(data['connname']);} });
set_onoff();
if(divid){set_onoff();}else{$('#onoff').css('display', 'None');}
editor1 = init_editor('sql');
@ -57,7 +58,7 @@ $('#submit').click(function () {let e = editor1.getValue();console.log(e);
else{window.opener.location.reload();}}
catch (e) {console.log('no opener');}
} // window.opener=null;window.close();
else{window.location.href="/echart/?type=z.chart&dev=1&dataset="+dsid }
// else{window.location.href="/echart/?type=z.chart&dev=1&dataset="+dsid }
}
});
});
@ -93,7 +94,15 @@ $('#conn').click(function () {
let connselect = $('#connselect');connselect.empty();
data['msg'].forEach(function (item) {
connselect.append('<option value='+item[0]+'>'+item[1]+'</option>')
if(item[1]===$('#conn').text()){connselect.val(item[0])}
});
$('#modal_conn').modal('show');
} });
});
function dssq_init(qty){
for(let i=1;i<qty;i++) {
$('#dsseq').append(`<option value="${i}">${i}</option>`);
}
$('#dsseq').val(seq);
}

View File

@ -52,6 +52,7 @@ $('#conn').click(function () {
let connselect = $('#connselect');connselect.empty();
data['msg'].forEach(function (item) {
connselect.append('<option value='+item[0]+'>'+item[1]+'</option>')
if(item[1]===$('#conn').text()){connselect.val(item[0])}
});
$('#modal_conn').modal('show');
} });

View File

@ -97,4 +97,7 @@
.edit-area {
height: 92%;
}
}
.devhead:hover select, .devhead:hover a .show{display: initial;}
.devhead select, .devhead a, .hidden {display: none}

View File

@ -16,7 +16,7 @@ form h1 {
text-align: center;
color: #2196F3;
}
form h5 {
form h5, a {
text-align: center;
text-transform: uppercase;
color: #c6c6c6;

14
templates/diy/common.html Normal file
View File

@ -0,0 +1,14 @@
{% extends "echart/base.html" %}
{% block head %} {% endblock %}
{% block body %}
<div class="container_fluid">
<div class="row_fluid" id="vue_app">
{% for div in div_list %}
{{div|safe}}
{% endfor %}
</div>
</div>
{% endblock %}
{% block javascript %}{% endblock %}

View File

@ -11,8 +11,8 @@
<div class="wrapper">
<form>
<h1>SmartChart</h1>
<h5 id="msg">加微信或群获取激活码,请支持一杯咖啡</h5>
<h5><div ><img src="https://www.smartchart.cn/static/images/auth.png" height="150px"></div></h5>
<h5 id="msg">请支持一杯咖啡,<a href="http://smartchart.cn/blog/article/2021/10/15/68.html">激活说明</a></h5>
<h5 id="author"><div ><img src="https://www.smartchart.cn/static/images/auth.png" height="150px"></div></h5>
<center><div id="qrcode"></div></center>
<div class="group">
<input id="authkey" style="display: none" placeholder="请输入激活码" required="required" /><span class="highlight"></span><span class="bar"></span>
@ -34,7 +34,8 @@ $("#submitup").click(function(){
let key = $.trim($('#authkey').val());
if(key === ''){
$('#authkey').css('display', 'initial');
$('#msg').html('在微信公众号"智晶数据"中使用扫码获取激活码');
$('#msg').html('公众号"智晶数据"中使用扫码获取激活码 <a href="http://smartchart.cn/blog/article/2021/10/15/68.html">激活说明</a>');
$('#author').css('display', 'None');
makeCode();
return;
}

View File

@ -1,14 +1,12 @@
<html><head><title>smartchart:{{title}}</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="X-UA-Compatible" content="IE=edge">{% block head %}{% endblock %}{{contentrefresh|safe}}<style type="text/css">
{% block style %}
{% endblock %}</style></head>
<html><head><title>smartchart:{{title}}</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="X-UA-Compatible" content="IE=edge">{{contentrefresh|safe}}
{% block head %}{% endblock %}</head>
<link rel="icon" type="image.png" href="/static/images/favicon.ico"><link rel="stylesheet" href="/static/js/fun.css"><link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
{% if dv %}<script src="/static/echart/opt/vue.js"></script><script src="/static/echart/opt/dv.js"></script>{% endif %}<script src="/static/js/jquery-2.2.3.min.js"></script>
{% block stylesheet %}{% endblock %}{{devhead|safe}}
{{devhead|safe}}
{% block body %}{% endblock %}
</html><script type="text/javascript" src="/static/echart/dist/echarts.min.js"></script><script src="/static/echart/dist/china.js"></script><script src="/static/js/fun.js"></script><script src="/static/js/scroll.js"></script><script src="/static/echart/theme/{{theme}}"></script><script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
{{footer|safe}}{% block javascript %}{% endblock %}
<script>function print(item){console.log(item)};$("#smartcharthead").on("click",function(){if($("#id_devhead").hasClass('devhead')){$("#id_devhead").removeClass('devhead');}else{$("#id_devhead").addClass('devhead')}});{% if dv %}var vapp = new Vue({el: '#vue_app', data: {d0:'',d1:'',d2:'',d3:'',d4:'',d5:'',d6:'',d7:'',d8:'',d9:'',d10:'',d11:'',d12:'',d13:'',d14:'',d15:'',d16:''}});{% endif %}var app = {};var charts = [];{{echart_main|safe}}window.onresize = function(){for(var i = 0; i < charts.length; i++){charts[i].resize();}};
<script>function print(item){console.log(item)};$("#smartcharthead").on("click",function(){if($("#id_devhead").hasClass('devhead')){$("#id_devhead").removeClass('devhead');}else{$("#id_devhead").addClass('devhead')}});{% if dv %}var vapp = new Vue({el: '#vue_app', delimiters: ['${', '}'], data: {d0:'',d1:'',d2:'',d3:'',d4:'',d5:'',d6:'',d7:'',d8:'',d9:'',d10:'',d11:'',d12:'',d13:'',d14:'',d15:'',d16:''}});{% endif %}var app = {};var charts = [];{{echart_main|safe}}window.onresize = function(){for(var i = 0; i < charts.length; i++){charts[i].resize();}};
$(function(){$("#fullScreen").on("click",function(){var isFull=!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement);if(isFull===false){fullScreen()}else{exitFullscreen()}})});function fullScreen(){var element=document.documentElement;if(element.requestFullscreen){element.requestFullscreen()}else if(element.msRequestFullscreen){element.msRequestFullscreen()}else if(element.mozRequestFullScreen){element.mozRequestFullScreen()}else if(element.webkitRequestFullscreen){element.webkitRequestFullscreen()}}function exitFullscreen(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}}
$(".devspan span").on("click",function(){let devspana=$(".devspan a");if(devspana.hasClass('show')){devspana.removeClass('show')}else{devspana.addClass('show')}})</script>
<!--powered by smartchart.cn,Designed by JohnYan mailto:84345999@qq.com, https://gitee.com/smartchart/smartchart you need keep this-->

View File

@ -1,7 +1,5 @@
{% extends "echart/base.html" %}
{% block head %}{% endblock %}
{% block style %}{% endblock %}
{% block stylesheet %}{% endblock %}
{% block body %}
<body {{body|safe}}>

View File

@ -1,7 +1,5 @@
{% extends "echart/base.html" %}
{% block head %}{% endblock %}
{% block style %}{% endblock %}
{% block stylesheet %}{% endblock %}
{% block body %}
<body {{body|safe}}>

View File

@ -1,7 +1,5 @@
{% extends "echart/base.html" %}
{% block head %}{% endblock %}
{% block style %}{% endblock %}
{% block stylesheet %}{% endblock %}
{% block body %}
{% for div in div_list %}
{{div|safe}}

View File

@ -22,20 +22,13 @@
<div class="editorSet clearfix">
<div>
<div class="editor">
<span class="label">{{name|safe}}</span><a class="submit-btn" id="submit">保存DIV</a>
<span class="label">{{name|safe}}</span>
<span class="devhead"><span class="glyphicon glyphicon-adjust" style="color: rgb(255, 140, 60);"></span>
<select id="ace-theme">
<option value="clouds">clouds</option>
<option value="monokai">monokai</option>
<option value="chrome">chrome</option>
<option value="github">github</option>
<option value="eclipse">eclipse</option>
<option value="tomorrow">tomorrow</option>
<option value="dawn">dawn</option>
<option value="sqlserver">sqlserver</option>
<option value="twilight">twilight</option>
</select><a class="glyphicon glyphicon-import" href="#" id="load_sample1"
</select></span><a class="glyphicon glyphicon-import" href="#" id="load_sample1"
style="color: rgb(255, 140, 60);">DV</a><a class="glyphicon glyphicon-import" href="#" id="load_sample2"
style="color: #6ec2cf;">AB</a><span id="printlog" style="color:red"></span>
<a class="submit-btn" id="submit">保存DIV</a>
<a class="glyphicon glyphicon-question-sign" title="帮助"
style="color: rgb(155, 205, 60);float:right" onclick="load_help('help_div')"></a>
<a class="glyphicon glyphicon-magnet" title="复制数据集"
@ -99,7 +92,7 @@
}
})
}
$("#load_sample1").click(function () {
$("#load_sample1").click(function () {
$.ajax({
type: "get", url: 'https://www.smartchart.cn/smartdata/api/?i=datavsample',
success: function (data) {

View File

@ -23,18 +23,10 @@
<div class="editorSet clearfix">
<div>
<div class="editor">
<span class="label">{{name|safe}}</span><a class="submit-btn" id="submit">保存DIV</a>
<span class="label">{{name|safe}}</span>
<span class="devhead"><span class="glyphicon glyphicon-adjust" style="color: rgb(255, 140, 60);"></span>
<select id="ace-theme">
<option value="clouds">clouds</option>
<option value="monokai">monokai</option>
<option value="chrome">chrome</option>
<option value="github">github</option>
<option value="eclipse">eclipse</option>
<option value="tomorrow">tomorrow</option>
<option value="dawn">dawn</option>
<option value="sqlserver">sqlserver</option>
<option value="twilight">twilight</option>
</select><span id="printlog" style="color:red">带#号的行为标识位,不要修改</span>
</select></span><a class="submit-btn" id="submit">保存DIV</a><span id="printlog" style="color:red">带#号的行为标识位,不要修改</span>
<a class="glyphicon glyphicon-sort-by-attributes" title="重置顺序" href="#"
style="color: rgb(255, 140, 60);float:right" data-toggle="modal"
data-target="#myModal_reset"></a>
@ -42,6 +34,10 @@
style="color: rgb(155, 205, 60);float:right" onclick="load_help('help_divlist')"></a>
<a class="glyphicon glyphicon-certificate" title="开启实时调试" id="id_autohtml" href="#"
style="color: gray;float:right" onclick="auto_html()"></a>
<a class="glyphicon glyphicon-flash" title="转化为数据集" href="#"
style="color: green;float:right" onclick="transform_html()"></a>
<a class="glyphicon glyphicon-th" title="可视化布局" href="https://www.smartchart.cn/echart/layout/?id={{name}}"
style="color: green;float:right" target="_blank"></a>
<pre id="editor1" class="edit-area"></pre>
</div>
</div>
@ -134,6 +130,19 @@ function reset_seq(){
autoshow = !autoshow;
if(autoshow){$('#id_autohtml').css('color', 'red')}else{$('#id_autohtml').css('color', 'gray')}
}
function transform_html() {
let e = editor1.getValue();
$.ajax({
type: "POST",
url: "/echart/divlist_editor_transform/",
data: {dashid: GetQueryString('dashid'), div: e},
success: function (data) {
if(data['div']!==''){editor1.setValue(data['div'])}
$('#printlog').html(data['msg']);
}
});
}
</script>
</body>
</html>

View File

@ -23,42 +23,17 @@
<div class="editorSet clearfix">
<div>
<div class="editor">
<span class="label" id="title"></span>
<span class="glyphicon glyphicon-compressed" style="color: rgb(255, 140, 60);"
id="conn"></span><a class="submit-btn" style="float: right"
id="submit">保存并刷新</a>
<a class="label" id="title" ></a>
<a class="glyphicon glyphicon-compressed" style="color: rgb(255, 140, 60);"
id="conn" href="#"></a>
<span class="devhead"><span class="glyphicon glyphicon-adjust" style="color: rgb(255, 140, 60);"></span>
<select id="ace-theme">
<option value="clouds">clouds</option>
<option value="monokai">monokai</option>
<option value="chrome">chrome</option>
<option value="github">github</option>
<option value="eclipse">eclipse</option>
<option value="tomorrow">tomorrow</option>
<option value="dawn">dawn</option>
<option value="sqlserver">sqlserver</option>
<option value="twilight">twilight</option>
</select>
<select id="dsseq">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
</select><span id="changedsseq"></span>
</select></span>
<span class="devhead"><span class="glyphicon glyphicon-map-marker" style="color: rgb(255, 140, 60);"></span>
<select id="dsseq"></select></span>
<span id="changedsseq"></span><a class="submit-btn" id="submit">保存数据集</a>
<span id="printlog" style="color:red"></span>
<a class="glyphicon glyphicon-question-sign" title="帮助"
<a class="glyphicon glyphicon-question-sign" title="帮助" href="#"
style="color: rgb(155, 205, 60);float:right" onclick="load_help('help_ds')"></a>
<a class="glyphicon glyphicon-edit" title="切换调试界面" id="editorframe" href="#"
style="color: rgb(255, 140, 60);float:right"> </a>

View File

@ -23,25 +23,12 @@
<div class="editorSet clearfix">
<div>
<div class="editor">
<span class="label" id="title"></span><span class="glyphicon glyphicon-compressed"
style="color: rgb(255, 140, 60);"
id="conn"></span>
<a class="glyphicon glyphicon-th" style="color: rgb(255, 140, 60);"
href="/admin/echart/echartdataset/">返回</a>
<a class="label" id="title"></a><a class="glyphicon glyphicon-compressed"
style="color: rgb(255, 140, 60);" href="#"
id="conn"></a><a class="submit-btn glyphicon glyphicon-refresh" id="submit">保存</a>
<a title="帮助" class="glyphicon glyphicon-question-sign"
style="color: rgb(155, 205, 60);float:right" href="#" onclick="load_help('help_ds')"></a>
<a class="submit-btn glyphicon glyphicon-refresh" id="submit">保存并刷新</a>
<select id="ace-theme">
<option value="clouds">clouds</option>
<option value="monokai">monokai</option>
<option value="chrome">chrome</option>
<option value="github">github</option>
<option value="eclipse">eclipse</option>
<option value="tomorrow">tomorrow</option>
<option value="dawn">dawn</option>
<option value="sqlserver">sqlserver</option>
<option value="twilight">twilight</option>
</select><span id="printlog" style="color:red"></span>
<span id="printlog" style="color:red"></span>
<pre id="editor1" class="edit-area"></pre>
</div>
</div>

View File

@ -23,20 +23,12 @@
<div class="editorSet clearfix">
<div>
<div class="editor">
<span class="label">{{name|safe}}</span><a class="submit-btn"
id="submit">保存option</a>
<span class="label">{{name|safe}}</span>
<span class="devhead"><span class="glyphicon glyphicon-adjust" style="color: rgb(255, 140, 60);"></span>
<select id="ace-theme">
<option value="clouds">clouds</option>
<option value="monokai">monokai</option>
<option value="chrome">chrome</option>
<option value="github">github</option>
<option value="eclipse">eclipse</option>
<option value="tomorrow">tomorrow</option>
<option value="dawn">dawn</option>
<option value="sqlserver">sqlserver</option>
<option value="twilight">twilight</option>
</select><a class="glyphicon glyphicon-import" href="#" id="load_sample"
style="color: rgb(255, 140, 60);">加载样列</a>
</select></span><a class="glyphicon glyphicon-import" href="#" id="load_sample"
style="color: rgb(255, 140, 60);">加载样列</a><a class="submit-btn"
id="submit">保存option</a>
<span id="printlog" style="color:red"></span>
<pre id="editor1" class="edit-area"></pre>
</div>

View File

@ -0,0 +1,105 @@
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Template设计</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
<link rel="icon" type="image.png" href="/static/images/favicon.ico">
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/editor/editor.css">
</head>
<body>
<div class="container_fluid">
<div class="row_fluid">
<div class="col-xs-12 col-md-7" style="padding:0.5% 0.5%;">
<div class="NightTheme">
<div id="main_container">
<div id="core" class="core core_margin1">
<div class="editorSet clearfix">
<div>
<div class="editor">
<span class="label" id="idtitle"></span>
<span class="devhead"><span class="glyphicon glyphicon-adjust" style="color: rgb(255, 140, 60);"></span>
<select id="ace-theme">
</select></span><a class="submit-btn" id="submit">保存Template</a><span id="printlog" style="color:red"></span>
<a class="glyphicon glyphicon-question-sign" title="帮助" href="#"
style="color: rgb(155, 205, 60);float:right" onclick="load_help('help_template')"></a>
<a class="glyphicon glyphicon-certificate" title="开启实时调试" id="id_autohtml" href="#"
style="color: gray;float:right" onclick="auto_html()"></a>
<a class="glyphicon glyphicon-th" title="可视化布局" href="https://www.smartchart.cn/echart/layout/?id={{name}}"
style="color: green;float:right" target="_blank"></a>
<pre id="editor1" class="edit-area"></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-5" style="padding:0.1% 0.1%;" id="preview">点击上方太阳标识可开启实时调试</div>
</div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
</div>
<script src="/static/js/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/ace/ace.js"></script>
<script type="text/javascript" src="/static/ace/ext-language_tools.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/editor/common.js"></script>
<script type="text/javascript">
editor1=init_editor('html');
get_template_editor();
var autoshow = false;
$('#submit').click(function () {
let e = editor1.getValue();
console.log(e);
$.ajax({
type: "POST",
url: "/echart/save_template/",
data: {dashid: GetQueryString('dashid'), div: e},
success: function (data) {
console.log(data);
$('#printlog').html(data['msg']);
if (GetQueryString('r')) {
try {
window.opener.location.reload();
// window.opener=null;window.close();
} catch (e) {
console.log('no opener');
}
}
}
});
});
editor1.getSession().on('change', function (e) {
if(autoshow){$("#preview").html(editor1.getValue());}
$("#printlog").html('');
});
function auto_html() {
autoshow = !autoshow;
if(autoshow){$('#id_autohtml').css('color', 'red')}else{$('#id_autohtml').css('color', 'gray')}
}
function get_template_editor() {
$.ajax({
type: "GET",
url: "/echart/get_template_editor/?dashid=" + GetQueryString('dashid'),
async:false,
success: function (data) {
editor1.setValue(data['div_str'])
$('#idtitle').html(data['name']);
}
});
}
</script>
</body>
</html>

View File

@ -11,9 +11,9 @@
<div class="wrapper">
<form>
<h1>SmartChart</h1>
<h5 id="msg">加微信或群获取激活码,请支持一杯咖啡</h5>
<h5 id="msg">请支持一杯咖啡,<a href="http://smartchart.cn/blog/article/2021/10/15/68.html">激活说明</a></h5>
<h5 id="author"><div ><img src="https://www.smartchart.cn/static/images/auth.png" height="150px"></div></h5>
<center><div id="qrcode"></div></center>
<h5><div ><img src="https://www.smartchart.cn/static/images/auth.png" height="150px"></div></h5>
<div class="group">
<input id="authkey" style="display: none" placeholder="请输入激活码" required="required" /><span class="highlight"></span><span class="bar"></span>
</div>
@ -34,7 +34,8 @@ $("#submitup").click(function(){
let key = $.trim($('#authkey').val());
if(key === ''){
$('#authkey').css('display', 'initial');
$('#msg').html('在微信公众号"智晶数据"中使用扫码获取激活码');
$('#msg').html('公众号"智晶数据"中使用扫码获取激活码 <a href="http://smartchart.cn/blog/article/2021/10/15/68.html">激活说明</a>');
$('#author').css('display', 'None');
makeCode();
return;
}