1
0
mirror of https://github.com/typecho/typecho.git synced 2025-04-14 06:41:53 +02:00
This commit is contained in:
joyqi 2013-10-12 22:31:22 +08:00
parent 55ddd0c94f
commit a0d06eb9a1
4 changed files with 7 additions and 56 deletions

@ -37,38 +37,6 @@
t.attr('target', '_blank');
});
/*
//打开链接
(function () {
_d.getElements('a').each(function (item) {
var _href = item.href;
if (_href && 0 != _href.indexOf('#')) {
//确认框
item.addEvent('click', function (event) {
var _lang = this.get('lang');
var _c = _lang ? confirm(_lang) : true;
if (!_c) {
event.stop();
}
});
if (/^<?php echo preg_quote($options->adminUrl, '/'); ?>.*$/.exec(_href)
|| /^<?php echo substr(preg_quote(Typecho_Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(_href)) {
return;
}
item.set('target', '_blank');
}
});
})();
Typecho.Table.init('.typecho-list-table');
Typecho.Table.init('.typecho-list-notable');
*/
});
})();
</script>

@ -28,6 +28,11 @@
function clickRow (t) {
var t = $(t), check = $(s.checkEl, t), checked = check.prop('checked');
if (!check.length) {
return;
}
check.prop('checked', !checked);
if (checked) {

@ -180,23 +180,9 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin');
<?php
include 'copyright.php';
include 'common-js.php';
include 'table-js.php';
?>
<script type="text/javascript">
(function () {
$(document).ready(function () {
$('.typecho-list-notable').tableSelectable({
checkEl : 'input[type=checkbox]',
rowEl : 'li',
selectAllEl : '.typecho-table-select-all',
actionEl : '.dropdown-menu a'
});
$('.btn-drop').dropdownMenu({
btnEl : '.dropdown-toggle',
menuEl : '.dropdown-menu'
});
});
})();
/*
(function () {
window.addEvent('domready', function() {

@ -59,7 +59,7 @@ $stat = Typecho_Widget::widget('Widget_Stat');
<?php Typecho_Widget::widget('Widget_Contents_Page_Admin')->to($pages); ?>
<?php if($pages->have()): ?>
<?php while($pages->next()): ?>
<tr<?php $pages->alt(' class="even"', ''); ?> id="<?php $pages->theId(); ?>">
<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>
@ -122,14 +122,6 @@ include 'table-js.php';
$.post('<?php $options->index('/action/contents-page-edit?do=sort'); ?>',
$.param({cid : ids}));
$('tr', table).each(function (i) {
if (i % 2) {
$(this).addClass('even');
} else {
$(this).removeClass('even');
}
});
}
});
});