mirror of
https://github.com/typecho/typecho.git
synced 2025-03-22 10:59:41 +01:00
修复高级选项展示
This commit is contained in:
parent
5cd89d8bcc
commit
17b5933ed1
@ -124,7 +124,7 @@ a.important {
|
||||
input[type=text], input[type=password], input[type=email],
|
||||
textarea {
|
||||
background: #FFF;
|
||||
border: 1px solid #CCC;
|
||||
border: 1px solid #D9D9D6;
|
||||
padding: 7px;
|
||||
|
||||
border-radius: 2px;
|
||||
@ -1559,6 +1559,7 @@ ul.typecho-list-notable li .loading {
|
||||
}
|
||||
|
||||
.typecho-post-area #auto-save-message {
|
||||
margin-top: 5px;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
}
|
||||
@ -1703,6 +1704,7 @@ ul.typecho-list-notable li .loading {
|
||||
}
|
||||
|
||||
.typecho-post-area #advance-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.typecho-post-area .is-draft {
|
||||
@ -1715,25 +1717,26 @@ ul.typecho-list-notable li .loading {
|
||||
font-size: .92857em;
|
||||
}
|
||||
|
||||
.typecho-post-option .cat-list {
|
||||
.category-option ul {
|
||||
list-style: none;
|
||||
border: 1px solid #CCC;
|
||||
border: 1px solid #D9D9D6;
|
||||
padding: 6px 12px;
|
||||
background-color: #FFF;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.typecho-post-option .cat-list li {
|
||||
.category-option li {
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
.typecho-post-option .visibility-option,
|
||||
.typecho-post-option .allow-option {
|
||||
.visibility-option ul,
|
||||
.allow-option ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.typecho-post-option .visibility-option li,
|
||||
.typecho-post-option .allow-option li {
|
||||
.visibility-option {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/*.typecho-post-area .advance, .typecho-post-area .attach, .typecho-post-area .media {
|
||||
@ -1996,7 +1999,7 @@ ul.typecho-list-notable li .loading {
|
||||
*/
|
||||
#upload-panel {
|
||||
padding: 10px 15px;
|
||||
border: 1px dashed #CCC;
|
||||
border: 1px dashed #D9D9D6;
|
||||
background-color: #FFF;
|
||||
color: #999;
|
||||
font-size: .92857em;
|
||||
@ -2017,7 +2020,7 @@ ul.typecho-list-notable li .loading {
|
||||
#ui-datepicker-div {
|
||||
display: none;
|
||||
padding: 10px;
|
||||
border: 1px solid #CCC;
|
||||
border: 1px solid #D9D9D6;
|
||||
background: #FFF;
|
||||
}
|
||||
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
||||
@ -2086,7 +2089,7 @@ ul.token-input-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
border: 1px solid #CCC;
|
||||
border: 1px solid #D9D9D6;
|
||||
height: 34px;
|
||||
overflow: hidden;
|
||||
cursor: text;
|
||||
@ -2148,7 +2151,7 @@ div.token-input-dropdown {
|
||||
position: absolute;
|
||||
background-color: #FFF;
|
||||
overflow: hidden;
|
||||
border: 1px solid #CCC;
|
||||
border: 1px solid #D9D9D6;
|
||||
border-top-width: 0;
|
||||
cursor: default;
|
||||
z-index: 1;
|
||||
|
@ -25,10 +25,16 @@ $(document).ready(function() {
|
||||
$('#date').datetimepicker();
|
||||
|
||||
// tag autocomplete 提示
|
||||
$("#tags").tokenInput("http://shell.loopj.com/tokeninput/tvshows.php");
|
||||
$('#tags').tokenInput('http://shell.loopj.com/tokeninput/tvshows.php');
|
||||
// tag autocomplete 提示宽度设置
|
||||
$("#token-input-tags").focus(function() {
|
||||
$(".token-input-dropdown").width($(".token-input-list").css('width'));
|
||||
$('#token-input-tags').focus(function() {
|
||||
$('.token-input-dropdown').width($('.token-input-list').css('width'));
|
||||
});
|
||||
|
||||
// 高级选项控制
|
||||
$('#advance-panel-btn').click(function() {
|
||||
$('#advance-panel').toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -10,84 +10,48 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
|
||||
<div class="col-group typecho-page-main typecho-post-area">
|
||||
<form action="<?php $options->index('/action/contents-post-edit'); ?>" method="post" name="write_post">
|
||||
<div class="col-mb-12 col-tb-9">
|
||||
<div>
|
||||
<label for="title" class="typecho-label"><?php _e('标题'); ?>
|
||||
<?php if ($post->draft && $post->draft['cid'] != $post->cid): ?>
|
||||
<?php $postModifyDate = new Typecho_Date($post->draft['modified']); ?>
|
||||
<cite><?php _e('当前正在编辑的是保存于%s的草稿, 你可以<a href="%s">删除它</a>', $postModifyDate->word(),
|
||||
Typecho_Common::url('/action/contents-post-edit?do=deleteDraft&cid=' . $post->cid, $options->index)); ?></cite>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<p class="title"><input type="text" id="title" name="title" value="<?php echo htmlspecialchars($post->title); ?>" class="w-100 text title" /></p>
|
||||
<label for="title" class="typecho-label"><?php _e('标题'); ?>
|
||||
<?php if ($post->draft && $post->draft['cid'] != $post->cid): ?>
|
||||
<?php $postModifyDate = new Typecho_Date($post->draft['modified']); ?>
|
||||
<cite><?php _e('当前正在编辑的是保存于%s的草稿, 你可以<a href="%s">删除它</a>', $postModifyDate->word(),
|
||||
Typecho_Common::url('/action/contents-post-edit?do=deleteDraft&cid=' . $post->cid, $options->index)); ?></cite>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<p class="title"><input type="text" id="title" name="title" value="<?php echo htmlspecialchars($post->title); ?>" class="w-100 text title" /></p>
|
||||
|
||||
<p class="editor">
|
||||
<span class="btnBold">bold</span><!--
|
||||
--><span class="btnItalic">italic</span><!--
|
||||
--><span class="btnLink">link</span><!--
|
||||
--><span class="btnQuote">quote</span><!--
|
||||
--><span class="btnDel">del</span><!--
|
||||
--><span class="btnImg">img</span><!--
|
||||
--><span class="btnUl">ul</span><!--
|
||||
--><span class="btnOl">ol</span><!--
|
||||
--><span class="btnHeading">title</span><!--
|
||||
--><span class="btnCode">code</span><!--
|
||||
--><span class="btnPre">pre</span><!--
|
||||
--><span class="btnMore">more</span><!--
|
||||
--><span class="btnHr">hr</span>
|
||||
</p>
|
||||
<p>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text" name="text" class="w-100 mono"><?php echo htmlspecialchars($post->text); ?></textarea>
|
||||
</p>
|
||||
<?php include 'file-upload.php'; ?>
|
||||
<label for="tags" class="typecho-label"><?php _e('标签'); ?></label>
|
||||
<p><input id="tags" name="tags" type="text" value="<?php $post->tags(',', false); ?>" class="w-100 text" /></p>
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->content($post); ?>
|
||||
<p class="submit">
|
||||
<span class="left">
|
||||
<cite id="auto-save-message">保存于 1 分钟前</cite>
|
||||
<!-- <span class="typecho-preview-label"><input type="checkbox" name="preview" id="btn-preview" /> <label for="btn-preview"><?php _e('预览内容'); ?></label></span>
|
||||
<span class="advance close" tabindex="0"><?php _e('展开高级选项'); ?></span>
|
||||
<span class="attach" tabindex="0"><?php _e('展开附件'); ?></span> -->
|
||||
</span>
|
||||
<span class="right">
|
||||
<input type="hidden" name="cid" value="<?php $post->cid(); ?>" />
|
||||
<input type="hidden" name="do" value="publish" />
|
||||
<button type="button" id="btn-save"><?php _e('保存草稿'); ?></button>
|
||||
<button type="button" class="primary" id="btn-submit"><?php _e('发布文章 »'); ?></button>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id="advance-panel">
|
||||
<section class="typecho-post-option">
|
||||
<?php if($user->pass('editor', true)): ?>
|
||||
<label class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<ul class="visibility-option">
|
||||
<li><input id="publish" value="publish" name="visibility" type="radio"<?php if (($post->status == 'publish' && !$post->password) || !$post->status) { ?> checked="true"<?php } ?> /> <label for="publish"><?php _e('公开'); ?></label></li>
|
||||
<li><input id="password" value="password"name="visibility" type="radio"<?php if ($post->password) { ?> checked="true"<?php } ?> /> <label for="password">密码保护 <input type="text" id="post-password" name="post-password" class="text-s" value="<?php $post->password(); ?>" class="mini" /></label></li>
|
||||
<li><input id="private" value="private" name="visibility" type="radio"<?php if ($post->status == 'private') { ?> checked="true"<?php } ?> /> <label for="private">私密</label></li>
|
||||
<li><input id="waiting" value="waiting" name="visibility" type="radio"<?php if ($post->status == 'waiting') { ?> checked="true"<?php } ?> /> <label for="waiting">待审核</label></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<section class="typecho-post-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul class="allow-option">
|
||||
<li><input id="allowComment" name="allowComment" type="checkbox" value="1" <?php if($post->allow('comment')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
|
||||
<li><input id="allowPing" name="allowPing" type="checkbox" value="1" <?php if($post->allow('ping')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowPing"><?php _e('允许被引用'); ?></label></li>
|
||||
<li><input id="allowFeed" name="allowFeed" type="checkbox" value="1" <?php if($post->allow('feed')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowFeed"><?php _e('允许在聚合中出现'); ?></label></li>
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionRight($post); ?>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="typecho-post-option">
|
||||
<label for="trackback" class="typecho-label"><?php _e('引用通告'); ?></label>
|
||||
<p><textarea id="trackback" class="w-100 mono" name="trackback" rows="3"></textarea></p>
|
||||
<p class="description"><?php _e('每一行一个引用地址, 用回车隔开'); ?></p>
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionLeft($post); ?>
|
||||
</section>
|
||||
</div>
|
||||
<p class="editor">
|
||||
<span class="btnBold">bold</span><!--
|
||||
--><span class="btnItalic">italic</span><!--
|
||||
--><span class="btnLink">link</span><!--
|
||||
--><span class="btnQuote">quote</span><!--
|
||||
--><span class="btnDel">del</span><!--
|
||||
--><span class="btnImg">img</span><!--
|
||||
--><span class="btnUl">ul</span><!--
|
||||
--><span class="btnOl">ol</span><!--
|
||||
--><span class="btnHeading">title</span><!--
|
||||
--><span class="btnCode">code</span><!--
|
||||
--><span class="btnPre">pre</span><!--
|
||||
--><span class="btnMore">more</span><!--
|
||||
--><span class="btnHr">hr</span>
|
||||
</p>
|
||||
<p>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text" name="text" class="w-100 mono"><?php echo htmlspecialchars($post->text); ?></textarea>
|
||||
</p>
|
||||
<?php include 'file-upload.php'; ?>
|
||||
<label for="tags" class="typecho-label"><?php _e('标签'); ?></label>
|
||||
<p><input id="tags" name="tags" type="text" value="<?php $post->tags(',', false); ?>" class="w-100 text" /></p>
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->content($post); ?>
|
||||
<p class="submit">
|
||||
<a href="###" id="advance-panel-btn" class="left"><?php _e('高级选项'); ?></a>
|
||||
<span class="right">
|
||||
<span id="auto-save-message">保存于 1 分钟前</span>
|
||||
<input type="hidden" name="cid" value="<?php $post->cid(); ?>" />
|
||||
<input type="hidden" name="do" value="publish" />
|
||||
<button type="button" id="btn-preview"><?php _e('预览'); ?></button>
|
||||
<button type="button" id="btn-save"><?php _e('保存草稿'); ?></button>
|
||||
<button type="button" class="primary" id="btn-submit"><?php _e('发布文章'); ?></button>
|
||||
</span>
|
||||
</p>
|
||||
<div id="typecho-preview-box">预览</div>
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-3">
|
||||
@ -95,10 +59,11 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
|
||||
<label for="date" class="typecho-label"><?php _e('发布日期'); ?></label>
|
||||
<p><input class="typecho-date w-100" type="text" name="date" id="date" value="<?php $post->date(); ?>" /></p>
|
||||
</section>
|
||||
<section class="typecho-post-option">
|
||||
|
||||
<section class="typecho-post-option category-option">
|
||||
<label class="typecho-label"><?php _e('所属分类'); ?></label>
|
||||
<?php Typecho_Widget::widget('Widget_Metas_Category_List')->to($category); ?>
|
||||
<ul class="cat-list">
|
||||
<ul>
|
||||
<?php
|
||||
if ($post->have()) {
|
||||
$categories = Typecho_Common::arrayFlatten($post->categories, 'mid');
|
||||
@ -112,11 +77,13 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option">
|
||||
<label for="slug" class="typecho-label"><?php _e('URL 缩略名'); ?></label>
|
||||
<p><input type="text" id="slug" name="slug" value="<?php $post->slug(); ?>" class="mini w-100" /></p>
|
||||
<p class="description"><?php _e('为这篇日志自定义链接地址, 有利于搜索引擎收录'); ?></p>
|
||||
</section>
|
||||
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->option($post); ?>
|
||||
<?php if($post->have()): ?>
|
||||
<?php $modified = new Typecho_Date($post->modified); ?>
|
||||
@ -130,6 +97,39 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="advance-panel" class="col-mb-12 col-tb-9">
|
||||
<section class="typecho-post-option">
|
||||
<label for="trackback" class="typecho-label"><?php _e('引用通告'); ?></label>
|
||||
<p><textarea id="trackback" class="w-100 mono" name="trackback" rows="3"></textarea></p>
|
||||
<p class="description"><?php _e('每一行一个引用地址, 用回车隔开'); ?></p>
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionLeft($post); ?>
|
||||
</section>
|
||||
|
||||
<?php if($user->pass('editor', true)): ?>
|
||||
<section class="typecho-post-option visibility-option">
|
||||
<label class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<ul>
|
||||
<li><input id="publish" value="publish" name="visibility" type="radio"<?php if (($post->status == 'publish' && !$post->password) || !$post->status) { ?> checked="true"<?php } ?> /> <label for="publish"><?php _e('公开'); ?></label></li>
|
||||
<li><input id="password" value="password" name="visibility" type="radio"<?php if ($post->password) { ?> checked="true"<?php } ?> /> <label for="password">密码保护 <input type="text" id="post-password" name="post-password" class="text-s" value="<?php $post->password(); ?>" size="16" /></label></li>
|
||||
<li><input id="private" value="private" name="visibility" type="radio"<?php if ($post->status == 'private') { ?> checked="true"<?php } ?> /> <label for="private">私密</label></li>
|
||||
<li><input id="waiting" value="waiting" name="visibility" type="radio"<?php if ($post->status == 'waiting') { ?> checked="true"<?php } ?> /> <label for="waiting">待审核</label></li>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="typecho-post-option allow-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul>
|
||||
<li><input id="allowComment" name="allowComment" type="checkbox" value="1" <?php if($post->allow('comment')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
|
||||
<li><input id="allowPing" name="allowPing" type="checkbox" value="1" <?php if($post->allow('ping')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowPing"><?php _e('允许被引用'); ?></label></li>
|
||||
<li><input id="allowFeed" name="allowFeed" type="checkbox" value="1" <?php if($post->allow('feed')): ?>checked="true"<?php endif; ?> />
|
||||
<label for="allowFeed"><?php _e('允许在聚合中出现'); ?></label></li>
|
||||
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionRight($post); ?>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user