mirror of
https://github.com/typecho/typecho.git
synced 2025-03-20 01:49:40 +01:00
Merge branch 'master' of https://github.com/typecho/typecho-replica
This commit is contained in:
commit
62ab933af5
@ -1875,55 +1875,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 {
|
||||
|
@ -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) {
|
||||
|
@ -37,22 +37,18 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<form method="post" name="manage_medias" class="operate-form">
|
||||
<table class="typecho-list-table draggable">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="3%"/>
|
||||
<col width="5%"/>
|
||||
<col width="20"/>
|
||||
<col width="30%"/>
|
||||
<col width="20"/>
|
||||
<col width="37%"/>
|
||||
<col width="10%"/>
|
||||
<col width="30%"/>
|
||||
<col width="18%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th><?php _e('文件名'); ?></th>
|
||||
<th> </th>
|
||||
<th><?php _e('上传者'); ?></th>
|
||||
<th><?php _e('所属文章'); ?></th>
|
||||
<th><?php _e('发布日期'); ?></th>
|
||||
@ -65,10 +61,9 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<tr id="<?php $attachments->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $attachments->cid(); ?>" name="cid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('manage-comments.php?cid=' . $attachments->cid); ?>" class="balloon-button size-<?php echo Typecho_Common::splitByCount($attachments->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $attachments->commentsNum(); ?></a></td>
|
||||
<td><span class="typecho-mime typecho-mime-<?php echo $mime; ?>"></span></td>
|
||||
<td><a href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a></td>
|
||||
<td>
|
||||
<a class="right hidden-by-mouse" href="<?php $attachments->permalink(); ?>"><img src="<?php $options->adminUrl('images/link.png'); ?>" title="<?php _e('浏览 %s', $attachments->title); ?>" width="16" height="16" alt="view" /></a>
|
||||
<a class="typecho-mime typecho-mime-<?php echo $mime; ?>" href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a>
|
||||
<a class="right" href="<?php $attachments->permalink(); ?>"><img src="<?php $options->adminUrl('images/link.png'); ?>" title="<?php _e('浏览 %s', $attachments->title); ?>" width="16" height="16" alt="view" /></a>
|
||||
</td>
|
||||
<td><?php $attachments->author(); ?></td>
|
||||
<td>
|
||||
|
@ -37,18 +37,16 @@ include 'menu.php';
|
||||
</div>
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="5%"/>
|
||||
<col width="40%"/>
|
||||
<col width="30%"/>
|
||||
<col width="20"/>
|
||||
<col width="30%"/>
|
||||
<col width=""/>
|
||||
<col width="10%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th> </th>
|
||||
<th><?php _e('缩略名'); ?></th>
|
||||
<th> </th>
|
||||
<th><?php _e('文章数'); ?></th>
|
||||
@ -59,9 +57,8 @@ include 'menu.php';
|
||||
<?php while ($categories->next()): ?>
|
||||
<tr id="mid-<?php $categories->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $categories->mid(); ?>" name="mid[]"/></td>
|
||||
<td><a href="<?php echo $request->makeUriByRequest('mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a></td>
|
||||
<td>
|
||||
<a class="right hidden-by-mouse" href="<?php $categories->permalink(); ?>"><img src="<?php $options->adminUrl('images/link.png'); ?>" title="<?php _e('浏览 %s', $categories->name); ?>" width="16" height="16" alt="view" /></a>
|
||||
<td><a href="<?php echo $request->makeUriByRequest('mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a>
|
||||
<a class="right" href="<?php $categories->permalink(); ?>"><img src="<?php $options->adminUrl('images/link.png'); ?>" title="<?php _e('浏览 %s', $categories->name); ?>" width="16" height="16" alt="view" /></a>
|
||||
</td>
|
||||
<td><?php $categories->slug(); ?></td>
|
||||
<td>
|
||||
|
@ -35,22 +35,18 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="3%"/>
|
||||
<col width="5%"/>
|
||||
<col width="35%"/>
|
||||
<col width=""/>
|
||||
<col width="20"/>
|
||||
<col width="47%"/>
|
||||
<col width="20%"/>
|
||||
<col width="10%"/>
|
||||
<col width="15%"/>
|
||||
<col width="18%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th><?php _e('缩略名'); ?></th>
|
||||
<th><?php _e('作者'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
@ -63,16 +59,21 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<tr id="<?php $pages->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $pages->cid(); ?>" name="cid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('manage-comments.php?cid=' . $pages->cid); ?>" class="balloon-button size-<?php echo Typecho_Common::splitByCount($pages->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $pages->commentsNum(); ?></a></td>
|
||||
<td<?php if ('draft' != $pages->status): ?> colspan="2"<?php endif; ?>><a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"><?php $pages->title(); ?></a>
|
||||
<?php if ('draft' == $pages->status): ?>
|
||||
</td>
|
||||
<td class="right">
|
||||
<span><?php _e('草稿'); ?></span>
|
||||
<?php endif; ?></td>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ('publish' == $pages->status): ?>
|
||||
<a class="right hidden-by-mouse" href="<?php $pages->permalink(); ?>"><img src="<?php $options->adminUrl('images/link.png'); ?>" title="<?php _e('浏览 %s', $pages->title); ?>" width="16" height="16" alt="view" /></a>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"><?php $pages->title(); ?></a>
|
||||
<?php
|
||||
if ($pages->hasSaved || 'page_draft' == $pages->type) {
|
||||
echo '<em>(' . _t('草稿') . ')</em>';
|
||||
} else if ('waiting' == $pages->status) {
|
||||
echo '<em>(' . _t('待审核') . ')</em>';
|
||||
} else if ('private' == $pages->status) {
|
||||
echo '<em>(' . _t('私密') . ')</em>';
|
||||
} else if ($pages->password) {
|
||||
echo '<em>(' . _t('密码保护') . ')</em>';
|
||||
}
|
||||
?>
|
||||
<?php if ('#' != $pages->permalink): ?>
|
||||
<a class="right" href="<?php $pages->permalink(); ?>"><img src="<?php $options->adminUrl('images/link.png'); ?>" title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>" width="16" height="16" alt="view" /></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $pages->slug(); ?></td>
|
||||
|
@ -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初始化 */
|
||||
|
@ -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('文章 "<a href="%s">%s</a>" 已经发布', $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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user