Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
change another editor
Browse files Browse the repository at this point in the history
  • Loading branch information
shonenada committed Jul 10, 2014
1 parent 9b14f05 commit 02f0dff
Show file tree
Hide file tree
Showing 474 changed files with 129,453 additions and 7,627 deletions.
26 changes: 8 additions & 18 deletions szuias/templates/admin/content_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

{% block static %}
<link type="text/css" href="{{ siteUrl('static/styles/admin/page/content.css') }}" rel="stylesheet"/>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/kindeditor/kindeditor-min.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/kindeditor/lang/zh_CN.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/ueditor/ueditor.config.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/ueditor/ueditor.all.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/DatePicker/WdatePicker.js') }}" charset="utf-8"></script>
{% endblock %}

Expand Down Expand Up @@ -72,10 +72,10 @@
</div>
</div>
<div id="editor_container">
<textarea id="editor_id" name="content" style="width:730px;height:500px;"></textarea>
<script id="editor_id" name="content" type="text/plain" style="width:730px;height:400px;"></script>
</div>
<div id="editor_eng_container">
<textarea id="editor_eng" name="content_eng" style="width:730px;height:500px;"></textarea>
<script id="editor_eng" name="content" type="text/plain" style="width:730px;height:400px;"></script>
</div>
<div class="submit-div">
<input type="hidden" name="timestamp" value="{{ timestamp }}" />
Expand Down Expand Up @@ -107,21 +107,11 @@
$('li.left-first-nav a').click(function(){
$(this).parent().find('ul').toggle("fast");
});

//文本输入框
var editor = KindEditor.create('#editor_id',{
width: '730px',
resizeType: 1,
uploadJson: '{{ siteUrl("file/upload?timestamp=" ~ timestamp) }}',
fileManagerJson: '{{ siteUrl("file/manager") }}',
allowFileManager: true
});
var editor_eng = KindEditor.create('#editor_eng',{
width: '730px',
resizeType: 1,
uploadJson: '{{ siteUrl("file/upload?timestamp=" ~ timestamp ) }}',
fileManagerJson: '{{ siteUrl("file/manager") }}',
allowFileManager: true
});
var editor = UE.getEditor('editor_id');
var editor_eng = UE.getEditor('editor_eng');

//提交前判断
$(".add-submit").click(function(){
if ($("input[name='title']").val() == "请在这里输入标题" || $("input[name='title']").val() == ""){
Expand Down
27 changes: 8 additions & 19 deletions szuias/templates/admin/content_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

{% block static %}
<link type="text/css" href="{{ siteUrl('static/styles/admin/page/content.css') }}" rel="stylesheet"/>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/kindeditor/kindeditor-min.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/kindeditor/lang/zh_CN.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/ueditor/ueditor.config.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/ueditor/ueditor.all.js') }}" charset="utf-8"></script>
<script type="text/javascript" src="{{ siteUrl('static/scripts/plugins/DatePicker/WdatePicker.js') }}" charset="utf-8"></script>
{% endblock %}

Expand Down Expand Up @@ -72,10 +72,10 @@
</div>
</div>
<div id="editor_container">
<textarea id="editor_id" name="content" style="width:730px;height:500px;">{{ article | lang('content', 'zh') }}</textarea>
<script id="editor_id" name="content" type="text/plain" style="width:730px;height:400px;">{{ article | lang('content', 'zh') | raw }}</script>
</div>
<div id="editor_eng_container">
<textarea id="editor_eng" name="content_eng" style="width:730px;height:500px;">{{ article | lang('content', 'en') }}</textarea>
<script id="editor_eng" name="content" type="text/plain" style="width:730px;height:400px;">{{ article | lang('content', 'en') | raw }}</script>
</div>
<div class="submit-div">
<input type="hidden" name="timestamp" value="{{ timestamp }}" />
Expand Down Expand Up @@ -110,21 +110,10 @@
//导航栏
$(this).parent().find('ul').toggle("fast");
});
//文本输入框
var editor = KindEditor.create('#editor_id',{
width: '730px',
resizeType: 1,
uploadJson: '{{ siteUrl("file/upload?timestamp=" ~ timestamp ) }}',
fileManagerJson: '{{ siteUrl("file/manager") }}',
allowFileManager: true
});
var editor_eng = KindEditor.create('#editor_eng',{
width: '730px',
resizeType: 1,
uploadJson: '{{ siteUrl("file/upload?timestamp=" ~ timestamp ) }}',
fileManagerJson: '{{ siteUrl("file/manager") }}',
allowFileManager: true
});

var editor = UE.getEditor('editor_id');
var editor_eng = UE.getEditor('editor_eng');

//提交前判断
$(".add-submit").click(function(){
if ($("input[name='title']").val() == "请在这里输入标题" || $("input[name='title']").val() == ""){
Expand Down
Loading

0 comments on commit 02f0dff

Please sign in to comment.