Merge branch 'master' of github.com:mauricemeyer/pdnsmanager

This commit is contained in:
Maurice Meyer 2016-06-07 18:47:17 +02:00
commit 7e31420b28
2 changed files with 6 additions and 3 deletions

View file

@ -84,7 +84,7 @@ limitations under the License.
</tbody> </tbody>
</table> </table>
<nav id="pagination-wrapper" class="text-center defaulthidden"> <nav id="pagination-wrapper" class="text-center defaulthidden">
<ul id="pagination" class="pagination"> <ul id="pagination" class="pagination cursor-pointer">
</ul> </ul>
</nav> </nav>

View file

@ -20,8 +20,7 @@ var sort = {
} }
$(document).ready(function() { $(document).ready(function() {
// When the site is loaded, always show the first page requestData();
requestData(1);
$('#table-domains>thead>tr>td span').click(function() { $('#table-domains>thead>tr>td span').click(function() {
var field = $(this).siblings('strong').text().toLowerCase(); var field = $(this).siblings('strong').text().toLowerCase();
@ -55,6 +54,10 @@ $(document).ready(function() {
}); });
function requestData(page) { function requestData(page) {
if(typeof(page) !== 'number' || page <= 0) {
page = 1;
}
var restrictions = { var restrictions = {
csrfToken: $('#csrfToken').text(), csrfToken: $('#csrfToken').text(),
}; };