diff --git a/src/postorius/static/postorius/css/style.css b/src/postorius/static/postorius/css/style.css index c4bb03b..04c2f9b 100755 --- a/src/postorius/static/postorius/css/style.css +++ b/src/postorius/static/postorius/css/style.css @@ -308,18 +308,6 @@ display: block; } - -/* Pagination */ -.pager .pager-content { - margin: 0 1em; -} -.pager .pager-content span { - border: none; - cursor: pointer; -} -.pager .pager-content form { - display: none; -} -.pager .pager-content form select { - width: 4em; +.hidden { + display: none; } diff --git a/src/postorius/static/postorius/js/script.js b/src/postorius/static/postorius/js/script.js index 604c7ac..2c2d364 100755 --- a/src/postorius/static/postorius/js/script.js +++ b/src/postorius/static/postorius/js/script.js @@ -24,11 +24,12 @@ $(function() { /* Pagination */ - $(".pager .pager-content span").click(function() { + $(".pager .pager-select a").click(function(e) { + e.preventDefault(); $(this).hide(); - $(this).next().css("display", "inline-block"); + $(this).next("form").css("display", "inline-block"); }); - $(".pager .pager-content form select").change(function() { + $(".pager .pager-select form select").change(function() { $(this).closest("form").submit(); }); diff --git a/src/postorius/templates/postorius/_pagination.html b/src/postorius/templates/postorius/_pagination.html index 4b6192a..9860969 100644 --- a/src/postorius/templates/postorius/_pagination.html +++ b/src/postorius/templates/postorius/_pagination.html @@ -2,6 +2,7 @@ {% load i18n %} {% if page.paginator.num_pages > 1 %} + {% endif %} diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index 78963d0..0104aa6 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -484,7 +484,7 @@ return utils.render_api_error(request) # Paginate - paginator = Paginator(lists, 15) # Show 10 lists per page + paginator = Paginator(lists, 15) # Show 15 lists per page page = request.GET.get('page') try: lists = paginator.page(page)