mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-16 05:34:01 +02:00
[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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user