|
|
- status && 'waiting' != $posts->status && 'private' != $posts->status && !$posts->password): ?> colspan="2">
- title(); ?>
- status || 'waiting' == $posts->status || 'private' == $posts->status || $posts->password): ?>
- |
-
- status ? _e('草稿') : ('waiting' == $posts->status ? _e('待审核') : ('private' == $posts->status ? _e('私密') : _e(''))); ?> password ? _e('密码') : _e(''); ?>
- |
- status): ?>
-
+ title(); ?>
+ hasSaved() || 'post_draft' == $posts->type) {
+ echo '(' . _t('草稿') . ')';
+ } else if ('waiting' == $posts->status) {
+ echo '(' . _t('待审核') . ')';
+ } else if ('private' == $posts->status) {
+ echo '(' . _t('私密') . ')';
+ } else if ($posts->password) {
+ echo '(' . _t('密码保护') . ')';
+ }
+ ?>
+ permalink): ?>
+
|
author(); ?> |
diff --git a/admin/write-js.php b/admin/write-js.php
index c351884f..1cbae631 100644
--- a/admin/write-js.php
+++ b/admin/write-js.php
@@ -34,10 +34,27 @@ $(document).ready(function() {
});
// tag autocomplete 提示
- $('#tags').tokenInput(next()) {
$data[] = array(
+ 'id' => $tags->name,
'tags' => $tags->name
);
}
@@ -46,9 +63,11 @@ $(document).ready(function() {
propertyToSearch: 'tags',
tokenValue : 'tags',
searchDelay : 0,
+ preventDuplicates : true,
animateDropdown : false,
hintText : '',
- noResultsText : '此标签不存在, 按回车创建'
+ noResultsText : '此标签不存在, 按回车创建',
+ prePopulate : tagsPre
});
// tag autocomplete 提示宽度设置
diff --git a/admin/write-page.php b/admin/write-page.php
index 605fbfe8..5711a2ab 100644
--- a/admin/write-page.php
+++ b/admin/write-page.php
@@ -30,9 +30,8 @@ Typecho_Widget::widget('Widget_Contents_Page_Edit')->to($page);
-
-
-
+
+
diff --git a/admin/write-post.php b/admin/write-post.php
index 928e6829..4e345b67 100644
--- a/admin/write-post.php
+++ b/admin/write-post.php
@@ -49,10 +49,8 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
-
-
-
-
+
+
预览
diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php
index 8aff8d6a..114bed63 100644
--- a/var/Widget/Contents/Post/Edit.php
+++ b/var/Widget/Contents/Post/Edit.php
@@ -318,11 +318,11 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg
/** 获取文章内容 */
if (!empty($this->request->cid) && 'delete' != $this->request->do) {
$this->db->fetchRow($this->select()
- ->where('table.contents.type = ?', 'post')
+ ->where('table.contents.type = ? OR table.contents.type = ?', 'post', 'post_draft')
->where('table.contents.cid = ?', $this->request->filter('int')->cid)
->limit(1), array($this, 'push'));
- if ('draft' == $this->status && $this->parent) {
+ if ('post_draft' == $this->type && $this->parent) {
$this->response->redirect(Typecho_Common::url('write-post.php?cid=' . $this->parent, $this->options->adminUrl));
}
@@ -343,10 +343,10 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg
*/
public function filter(array $value)
{
- if ('draft' != $value['status']) {
+ if ('post' == $value['type']) {
$draft = $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select()
->where('table.contents.parent = ? AND table.contents.type = ? AND table.contents.status = ?',
- $value['cid'], $value['type'], 'draft')
+ $value['cid'], 'post_draft', $value['status'])
->limit(1));
if (!empty($draft)) {