mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/11805] Fix "jump to page" feature for pagination in routes
PHPBB3-11805
This commit is contained in:
parent
0abb4a5ad3
commit
f16a7e351f
1 changed files with 7 additions and 3 deletions
|
@ -40,10 +40,14 @@ function jumpto(item) {
|
|||
page = prompt(jump_page, on_page);
|
||||
|
||||
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
|
||||
if (base_url.indexOf('?') === -1) {
|
||||
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
document.location.href = base_url.replace('%d', page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue