mirror of
https://github.com/typecho/typecho.git
synced 2025-03-21 10:29:40 +01:00
添加日期选择控件
重命名 jQuery 插件名称
This commit is contained in:
parent
e555d365fd
commit
e4dcdc0492
@ -1975,8 +1975,71 @@ ul.autocompleter-choices span.autocompleter-queried {
|
||||
}
|
||||
|
||||
|
||||
/* Jquery Timepicker */
|
||||
#ui-datepicker-div {
|
||||
padding: 10px;
|
||||
border: 1px solid #CCC;
|
||||
background: #FFF;
|
||||
}
|
||||
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
||||
.ui-timepicker-div dl { text-align: left; }
|
||||
.ui-timepicker-div dl dt { float: left; clear:left; }
|
||||
.ui-timepicker-div dl dd { margin: 0 0 10px 40%; }
|
||||
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
||||
|
||||
/* Tokeninput style */
|
||||
#ui-datepicker-div .ui-datepicker-header {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #EEE;
|
||||
}
|
||||
#ui-datepicker-div .ui-datepicker-prev { float: left; cursor: pointer; }
|
||||
#ui-datepicker-div .ui-datepicker-next { float: right; cursor: pointer; }
|
||||
#ui-datepicker-div .ui-datepicker-title {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
#ui-datepicker-div .ui-datepicker-calendar th { line-height: 24px; }
|
||||
#ui-datepicker-div .ui-datepicker-calendar a {
|
||||
display: block;
|
||||
width: 30px;
|
||||
background-color: #F3F3F0;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
#ui-datepicker-div .ui-datepicker-calendar a:hover {
|
||||
background-color: #E9E9E6;
|
||||
text-decoration: none;
|
||||
}
|
||||
#ui-datepicker-div .ui-datepicker-today a {
|
||||
background-color: #E9E9E6;
|
||||
color: #444;
|
||||
}
|
||||
#ui-datepicker-div .ui-datepicker-current-day a {
|
||||
background-color: #467B96 !important;
|
||||
color: #FFF;
|
||||
}
|
||||
#ui-datepicker-div .ui-timepicker-div {
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #EEE;
|
||||
}
|
||||
#ui-datepicker-div select { height: 20px; }
|
||||
#ui-datepicker-div .ui-datepicker-buttonpane {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #EEE;
|
||||
}
|
||||
#ui-datepicker-div button { height: 28px; }
|
||||
#ui-datepicker-div .ui-datepicker-current {
|
||||
float: left;
|
||||
border-color: #F3F3F0;
|
||||
color: #467B96;
|
||||
background: #F3F3F0;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
#ui-datepicker-div .ui-datepicker-close { float: right; }
|
||||
|
||||
/* Jquery Tokeninput */
|
||||
ul.token-input-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
|
2134
admin/javascript/timepicker.js
Normal file
2134
admin/javascript/timepicker.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,13 +16,17 @@
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- jQuery Plugin: Tokenizing Autocomplete Text Entry -->
|
||||
<script src="<?php $options->adminUrl('javascript/jquery.tokeninput.js?v=' . $suffixVersion); ?>"></script>
|
||||
|
||||
<script src="<?php $options->adminUrl('javascript/timepicker.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminUrl('javascript/tokeninput.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// tag 提示
|
||||
// 日期时间控件
|
||||
$('#date').datetimepicker();
|
||||
|
||||
// tag autocomplete 提示
|
||||
$("#tags").tokenInput("http://shell.loopj.com/tokeninput/tvshows.php");
|
||||
// 修复 tag 提示宽度
|
||||
// tag autocomplete 提示宽度设置
|
||||
$(".token-input-dropdown").width($(".token-input-list").css('width'));
|
||||
});
|
||||
</script>
|
||||
|
@ -80,31 +80,8 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
|
||||
<div class="col-mb-12 col-tb-3">
|
||||
<div class="typecho-post-option">
|
||||
<section>
|
||||
<label for="date" class="typecho-label"><?php _e('日期'); ?></label>
|
||||
<p>
|
||||
<select disabled class="typecho-date" name="month" id="month">
|
||||
<option value="1" <?php if (1 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('一月'); ?></option>
|
||||
<option value="2" <?php if (2 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('二月'); ?></option>
|
||||
<option value="3" <?php if (3 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('三月'); ?></option>
|
||||
<option value="4" <?php if (4 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('四月'); ?></option>
|
||||
<option value="5" <?php if (5 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('五月'); ?></option>
|
||||
<option value="6" <?php if (6 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('六月'); ?></option>
|
||||
<option value="7" <?php if (7 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('七月'); ?></option>
|
||||
<option value="8" <?php if (8 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('八月'); ?></option>
|
||||
<option value="9" <?php if (9 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('九月'); ?></option>
|
||||
<option value="10" <?php if (10 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('十月'); ?></option>
|
||||
<option value="11" <?php if (11 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('十一月'); ?></option>
|
||||
<option value="12" <?php if (12 == $post->date->format('n')): ?>selected="true"<?php endif; ?>><?php _e('十二月'); ?></option>
|
||||
</select>
|
||||
<input disabled class="typecho-date" size="4" maxlength="4" type="text" name="day" id="day" value="<?php $post->date('d'); ?>" />
|
||||
,
|
||||
<input disabled class="typecho-date" size="4" maxlength="4" type="text" name="year" id="year" value="<?php $post->date('Y'); ?>" />
|
||||
@
|
||||
<input disabled class="typecho-date" size="2" maxlength="2" type="text" name="hour" id="hour" value="<?php $post->date('H'); ?>" />
|
||||
:
|
||||
<input disabled class="typecho-date" size="2" maxlength="2" type="text" name="min" id="min" value="<?php $post->date('i'); ?>" />
|
||||
</p>
|
||||
<p class="description"><?php _e('请选择一个发布日期'); ?></p>
|
||||
<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>
|
||||
<label class="typecho-label"><?php _e('分类'); ?></label>
|
||||
@ -125,7 +102,7 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
|
||||
</section>
|
||||
<section>
|
||||
<label for="slug" class="typecho-label"><?php _e('缩略名'); ?></label>
|
||||
<p><input type="text" id="slug" name="slug" value="<?php $post->slug(); ?>" class="mini" /></p>
|
||||
<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); ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user