Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Oct 12, 2013
1 parent 55ddd0c commit a0d06eb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 56 deletions.
32 changes: 0 additions & 32 deletions admin/common-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
5 changes: 5 additions & 0 deletions admin/javascript/typecho.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
16 changes: 1 addition & 15 deletions admin/manage-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,23 +180,9 @@
<?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() {
Expand Down
10 changes: 1 addition & 9 deletions admin/manage-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<?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>
Expand Down Expand Up @@ -122,14 +122,6 @@

$.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');
}
});
}
});
});
Expand Down

0 comments on commit a0d06eb

Please sign in to comment.