From 275910d8b0fd8d5edeee07eb05ad82da48cc72a3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 8 Mar 2014 15:59:40 +0100 Subject: [ticket/12090] Fix pagination for routes No clickable "jump to" at the moment, as we can not get the route url by the route name in js yet. Need to find another solution later. PHPBB3-12090 --- phpBB/styles/prosilver/template/forum_fn.js | 11 ++++------- phpBB/styles/prosilver/template/pagination.html | 6 +++++- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'phpBB/styles/prosilver') diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 408c9b9b8c..de51b54e9b 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -37,17 +37,14 @@ function jumpto(item) { on_page = item.attr('data-on-page'), per_page = item.attr('data-per-page'), base_url = item.attr('data-base-url'), + start_name = item.attr('data-start-name'), page = prompt(jump_page, on_page); if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) { - if (base_url.indexOf('%d') === -1) { - if (base_url.indexOf('?') === -1) { - document.location.href = base_url + '?start=' + ((page - 1) * per_page); - } else { - document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page); - } + if (base_url.indexOf('?') === -1) { + document.location.href = base_url + '?' + start_name + '=' + ((page - 1) * per_page); } else { - document.location.href = base_url.replace('%d', page); + document.location.href = base_url.replace(/&/g, '&') + '&' + start_name + '=' + ((page - 1) * per_page); } } } diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html index cb54193c3f..e27a90900a 100644 --- a/phpBB/styles/prosilver/template/pagination.html +++ b/phpBB/styles/prosilver/template/pagination.html @@ -1,4 +1,8 @@ - {PAGE_NUMBER} • + + {PAGE_NUMBER} • + + {PAGE_NUMBER} • +