aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template/forum_fn.js
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-08 15:59:40 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-08 16:02:44 +0100
commit275910d8b0fd8d5edeee07eb05ad82da48cc72a3 (patch)
tree1cbdd92dde1ea51b85829488b8b89a2baab9c282 /phpBB/styles/prosilver/template/forum_fn.js
parent6491477809bf6eed1cf4672e4a6439f24cce3b57 (diff)
downloadforums-275910d8b0fd8d5edeee07eb05ad82da48cc72a3.tar
forums-275910d8b0fd8d5edeee07eb05ad82da48cc72a3.tar.gz
forums-275910d8b0fd8d5edeee07eb05ad82da48cc72a3.tar.bz2
forums-275910d8b0fd8d5edeee07eb05ad82da48cc72a3.tar.xz
forums-275910d8b0fd8d5edeee07eb05ad82da48cc72a3.zip
[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
Diffstat (limited to 'phpBB/styles/prosilver/template/forum_fn.js')
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js11
1 files changed, 4 insertions, 7 deletions
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(/&amp;/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(/&amp;/g, '&') + '&' + start_name + '=' + ((page - 1) * per_page);
}
}
}