mirror of
https://github.com/kokororin/typecho-plugin-Access.git
synced 2025-03-14 03:40:21 +08:00
改进删除记录后的空白页问题
This commit is contained in:
parent
64594b7640
commit
477c71b437
@ -127,7 +127,7 @@ $access = new Access_Core();
|
||||
|
||||
<?php if($access->logs['rows'] > 1): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php echo $access->logs['page']; ?>
|
||||
<?php echo $access->logs['page'];?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
@ -314,10 +314,16 @@ $(document).ready(function() {
|
||||
data: JSON.stringify(ids),
|
||||
success: function(data) {
|
||||
if (data.code == 0) {
|
||||
swal('删除成功', '所选记录已删除', 'success');
|
||||
$.each(ids, function(index, elem) {
|
||||
$('.typecho-list-table tbody tr[data-id="' + elem + '"]').fadeOut(500).remove();
|
||||
});
|
||||
swal({title:'删除成功',
|
||||
text:'所选记录已删除',
|
||||
type:'success'}, function() {
|
||||
if($('.typecho-list-table tbody tr').length == 0) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
swal('错误', '发生错误了', 'warning');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user