include 'common.php';
include 'header.php';
include 'menu.php';
Typecho_Widget::widget('Widget_Metas_Category_Admin')->to($categories);
?>
<?php include 'page-title.php'; ?>
<?php $categories->backLink(); ?>
<?php if($categories->have()): ?>
<?php while ($categories->next()): ?>
<?php $categories->name(); ?><?php if (count($categories->children) > 0): ?>
<?php echo _n('一个分类', '%d个分类', count($categories->children)); ?>
<?php echo _e('新增'); ?>
<?php $categories->slug(); ?><?php if ($options->defaultCategory == $categories->mid): ?>
<?php _e('默认'); ?>
<?php $categories->count(); ?><?php _e('没有任何分类'); ?>
include 'copyright.php';
include 'common-js.php';
?>
(function () {
$(document).ready(function () {
var table = $('.typecho-list-table').tableDnD({
onDrop : function () {
var ids = [];
$('input[type=checkbox]', table).each(function () {
ids.push($(this).val());
});
$.post('<?php $security->index('/action/metas-category-edit?do=sort'); ?>',
$.param({mid : ids}));
$('tr', table).each(function (i) {
if (i % 2) {
$(this).addClass('even');
} else {
$(this).removeClass('even');
}
});
}
});
table.tableSelectable({
checkEl : 'input[type=checkbox]',
rowEl : 'tr',
selectAllEl : '.typecho-table-select-all',
actionEl : '.dropdown-menu a'
});
$('.btn-drop').dropdownMenu({
btnEl : '.dropdown-toggle',
menuEl : '.dropdown-menu'
});
$('.dropdown-menu button.merge').click(function () {
var btn = $(this);
btn.parents('form').attr('action', btn.attr('rel')).submit();
});
<?php if (isset($request->mid)): ?>
$('.typecho-mini-panel').effect('highlight', '#AACB36');
});
})();
一键复制
编辑
Web IDE
原始数据
按行查看
历史