Refine backend

This commit is contained in:
Flavio Copes 2015-10-08 17:30:18 +02:00
parent 61677d06d4
commit 1c1f6f6d16
2 changed files with 31 additions and 8 deletions

View file

@ -59,8 +59,14 @@
'</tr>');
})
$('.totalRetrieved').html(response.totalRetrieved);
var totalRetrieved = response.totalRetrieved * (parseInt(response.page) + 1);
$('.totalRetrieved').html(totalRetrieved);
$('.totalAvailable').html(response.totalAvailable);
if (totalRetrieved == response.totalAvailable) {
$('.js__load-more').hide();
}
})
.error(function() {
alert('Unexpected error');
@ -69,7 +75,7 @@
});
</script>
<h1>Latest comments</h1>
<h1>Comments from the last 7 days</h1>
<div class="admin-block default-box-shadow">
<table>