diff --git a/admin/css/style.css b/admin/css/style.css index 592351a7..eb6b6e37 100644 --- a/admin/css/style.css +++ b/admin/css/style.css @@ -1863,55 +1863,50 @@ ul.typecho-list-notable li .loading { .typecho-mime { background-image: url(../images/mime.gif); - width: 16px; + background-repeat: no-repeat; + padding-left: 24px; height: 16px; line-height: 16px; - font-size: 13px; - display: block; - float: right; - position: relative; - padding: 0; - margin-right: -3px; } .typecho-mime-office { - background-position: 0 -160px; + background-position: 0 0; } .typecho-mime-text { - background-position: 0 -176px; + background-position: 0 -16px; } .typecho-mime-image { - background-position: 0 -192px; + background-position: 0 -32px; } .typecho-mime-html { - background-position: 0 -208px; + background-position: 0 -48px; } .typecho-mime-archive { - background-position: 0 -224px; + background-position: 0 -64px; } .typecho-mime-application { - background-position: 0 -240px; + background-position: 0 -80px; } .typecho-mime-audio { - background-position: 0 -256px; + background-position: 0 -96px; } .typecho-mime-script { - background-position: 0 -272px; + background-position: 0 -112px; } .typecho-mime-video { - background-position: 0 -288px; + background-position: 0 -128px; } .typecho-mime-unknow { - background-position: 0 -304px; + background-position: 0 -144px; } .typecho-attachment-photo-box .typecho-mime { diff --git a/admin/form-js.php b/admin/form-js.php index e63eff8c..c6a5795d 100644 --- a/admin/form-js.php +++ b/admin/form-js.php @@ -8,7 +8,11 @@ } $('form').submit(function () { - $('*[type=submit]', this).prop('disabled', true); + if (this.submitted) { + return false; + } else { + this.submitted = true; + } }); $('label input[type=text]').click(function (e) { diff --git a/admin/manage-medias.php b/admin/manage-medias.php index 74a9cccb..7a229bb0 100644 --- a/admin/manage-medias.php +++ b/admin/manage-medias.php @@ -37,22 +37,18 @@ $stat = Typecho_Widget::widget('Widget_Stat');
- + - - - + - + - - @@ -65,10 +61,9 @@ $stat = Typecho_Widget::widget('Widget_Stat'); - -
commentsNum(); ?>title(); ?> - view + title(); ?> + view author(); ?> diff --git a/admin/manage-metas.php b/admin/manage-metas.php index c1e52c8a..453665de 100644 --- a/admin/manage-metas.php +++ b/admin/manage-metas.php @@ -37,18 +37,16 @@ include 'menu.php'; - + + - - - + - @@ -59,9 +57,8 @@ include 'menu.php'; next()): ?> - -
name(); ?> - view + name(); ?> + view slug(); ?> diff --git a/admin/manage-pages.php b/admin/manage-pages.php index 66e3fb09..80399eb5 100644 --- a/admin/manage-pages.php +++ b/admin/manage-pages.php @@ -35,22 +35,18 @@ $stat = Typecho_Widget::widget('Widget_Stat'); - + - - - + + - - - @@ -63,16 +59,21 @@ $stat = Typecho_Widget::widget('Widget_Stat'); - status): ?> colspan="2">title(); ?> - status): ?> - - - diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index db4545a9..945c0692 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -1198,8 +1198,13 @@ class Widget_Archive extends Widget_Abstract_Contents /** 定时发布功能 */ if (!$selectPlugged) { - $select = $this->select()->where('table.contents.status = ?', 'publish') - ->where('table.contents.created < ?', $this->options->gmtTime); + if ($this->user->hasLogin()) { + $select = $this->select()->where('table.contents.status = ? OR + (table.contents.status = ? AND table.contents.authorId = ?)', 'publish', 'private', $this->user->uid); + } else { + $select = $this->select()->where('table.contents.status = ?', 'publish'); + } + $select->where('table.contents.created < ?', $this->options->gmtTime); } /** handle初始化 */ diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 724ffc6a..997f9fcd 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -227,7 +227,7 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg /** 插入标签 */ if (array_key_exists('tags', $contents)) { - $this->setTags($realId, $contents['tags'], !$isDraftToPublish, true); + $this->setTags($realId, $contents['tags'], !$isDraftToPublish && $isBeforePublish, $isAfterPublish); } /** 同步附件 */ @@ -568,7 +568,7 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg $this->widget('Widget_Service')->sendPing($this->cid, $trackback); /** 设置提示信息 */ - $this->widget('Widget_Notice')->set('publish' == $this->status ? + $this->widget('Widget_Notice')->set('post' == $this->type ? _t('文章 "%s" 已经发布', $this->permalink, $this->title) : _t('文章 "%s" 等待审核', $this->title), NULL, 'success'); @@ -619,17 +619,20 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg foreach ($posts as $post) { $condition = $this->db->sql()->where('cid = ?', $post); + $postObject = $this->db->fetchObject($this->db->select('status', 'type') + ->from('table.contents')->where('cid = ? AND type = ?', $post, 'post')); if ($this->isWriteable($condition) && - ($status = $this->db->fetchObject($this->db->select('status') - ->from('table.contents')->where('cid = ? AND type = ?', $post, 'post'))->status) && + $postObject && $this->delete($condition)) { /** 删除分类 */ - $this->setCategories($post, array(), 'publish' == $status); + $this->setCategories($post, array(), 'publish' == $postObject->status + && 'post' == $postObject->type); /** 删除标签 */ - $this->setTags($post, NULL, 'publish' == $status); + $this->setTags($post, NULL, 'publish' == $postObject->status + && 'post' == $postObject->type); /** 删除评论 */ $this->db->query($this->db->delete('table.comments')
commentsNum(); ?> - - - status): ?> - view + title(); ?> + hasSaved || 'page_draft' == $pages->type) { + echo '(' . _t('草稿') . ')'; + } else if ('waiting' == $pages->status) { + echo '(' . _t('待审核') . ')'; + } else if ('private' == $pages->status) { + echo '(' . _t('私密') . ')'; + } else if ($pages->password) { + echo '(' . _t('密码保护') . ')'; + } + ?> + permalink): ?> + view slug(); ?>