From b68e261a6212f029aabb328c11f8fd8afac00659 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 25 Nov 2013 11:41:31 +0800 Subject: [PATCH] fix bugs --- admin/custom-fields.php | 4 ++-- admin/editor-js.php | 2 +- admin/write-js.php | 4 ++-- admin/write-page.php | 1 - admin/write-post.php | 9 +++++---- usr/themes/default/functions.php | 3 ++- var/Widget/Abstract/Contents.php | 25 +++++++++++++++---------- var/Widget/Contents/Post/Edit.php | 2 +- 8 files changed, 28 insertions(+), 22 deletions(-) diff --git a/admin/custom-fields.php b/admin/custom-fields.php index 8925fc59..a1f74958 100644 --- a/admin/custom-fields.php +++ b/admin/custom-fields.php @@ -3,7 +3,7 @@ $fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems(); $defaultFields = isset($post) ? $post->getDefaultFieldItems() : $post->getDefaultFieldItems(); ?> -
+
@@ -29,7 +29,7 @@ $defaultFields = isset($post) ? $post->getDefaultFieldItems() : $post->getDefaul - + diff --git a/admin/editor-js.php b/admin/editor-js.php index 3298a90c..e6de9fc2 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -7,7 +7,7 @@ $(document).ready(function () { var textarea = $('#text'), toolbar = $('
').insertBefore(textarea.parent()) - preview = $('
').insertBefore('.submit'); + preview = $('
').insertAfter('#upload-panel'); var options = {}; diff --git a/admin/write-js.php b/admin/write-js.php index 2449f290..c990d593 100644 --- a/admin/write-js.php +++ b/admin/write-js.php @@ -126,12 +126,12 @@ $(document).ready(function() { }), savedData = null; // 自动保存 -autoSave): ?> +autoSave): ?> var locked = false, formAction = form.attr('action'), idInput = $('input[name=cid]'), cid = idInput.val(), - autoSave = $('#auto-save-message'), + autoSave = $('').prependTo('.submit'), autoSaveOnce = !!cid, lastSaveTime = null; diff --git a/admin/write-page.php b/admin/write-page.php index d9bd43b9..52253ab8 100644 --- a/admin/write-page.php +++ b/admin/write-page.php @@ -42,7 +42,6 @@ Typecho_Widget::widget('Widget_Contents_Page_Edit')->to($page); content($page); ?>

- diff --git a/admin/write-post.php b/admin/write-post.php index 4a37ec17..02e3687c 100644 --- a/admin/write-post.php +++ b/admin/write-post.php @@ -46,13 +46,10 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post); 撰写 预览

--> - + - - content($post); ?>

- @@ -62,6 +59,10 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);

+ + + + content($post); ?>