aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/styles/prosilver/template')
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js27
-rw-r--r--phpBB/styles/prosilver/template/pagination.html55
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html8
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html8
4 files changed, 58 insertions, 40 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index fa838fde19..5d2382c4dd 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -25,20 +25,12 @@ function popup(url, width, height, name) {
/**
* Jump to page
*/
-function jumpto(item) {
- if (!item || !item.length) {
- item = $('a.pagination-trigger[data-lang-jump-page]');
- if (!item.length) {
- return;
- }
- }
+function jumpto(form) {
- var jump_page = item.attr('data-lang-jump-page'),
- 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);
+ var page = $(form).find("input[name='page-number']").val(),
+ per_page = $(form).find("input[name='per-page']").val(),
+ base_url = $(form).find("input[name='base-url']").val(),
+ start_name = $(form).find("input[name='start-name']").val();
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
if (base_url.indexOf('?') === -1) {
@@ -363,9 +355,16 @@ function parse_document(container)
/**
* Pagination
*/
- container.find('a.pagination-trigger').click(function() {
+ container.find('form.page-jump-form').submit(function(event) {
+ event.preventDefault();
jumpto($(this));
});
+
+ container.find('.pagination-trigger').click(function() {
+ $input = $(this).parent().find("input[name='page-number']");
+
+ setTimeout(function() { $input.focus(); },100);
+ });
/**
* Dropdowns
diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html
index e27a90900a..8b8631ce26 100644
--- a/phpBB/styles/prosilver/template/pagination.html
+++ b/phpBB/styles/prosilver/template/pagination.html
@@ -1,18 +1,37 @@
- <!-- IF BASE_URL -->
- <a href="#" class="pagination-trigger" title="{L_JUMP_TO_PAGE}" data-lang-jump-page="{L_JUMP_PAGE|e('html_attr')}{L_COLON}" data-on-page="{CURRENT_PAGE}" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-base-is-route="{BASE_IS_ROUTE}" data-start-name="{START_NAME}">{PAGE_NUMBER}</a> &bull;
- <!-- ELSE -->
- {PAGE_NUMBER} &bull;
- <!-- ENDIF -->
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF pagination.S_IS_PREV -->
- <!-- ELSEIF pagination.S_IS_CURRENT -->
- <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
- <li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF pagination.S_IS_NEXT -->
- <!-- ELSE -->
- <li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+<ul>
+<!-- IF BASE_URL -->
+ <li class="dropdown-container dropdown-button-control dropdown-jump-to jump-to">
+ <a href="#" class="pagination-trigger dropdown-trigger" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents">
+ <li>{L_JUMP_TO_PAGE_FORM}</li>
+ <li>
+ <form class="page-jump-form" method="get">
+ <fieldset>
+ <input type="text" name="page-number" maxlength="6" title="{L_SEARCH_KEYWORDS}" class="inputbox tiny" value="" placeholder="{CURRENT_PAGE}" />
+ <input class="button2" value="{L_GO}" type="submit" />
+ <input type="hidden" value="{PER_PAGE}" name="per-page">
+ <input type="hidden" value="{START_NAME}" name="start-name">
+ <input type="hidden" value="{BASE_URL|e('html_attr')}" name="base-url">
+ </fieldset>
+ </form>
+ </li>
+ </ul>
+ </div>
+ </li>
+<!-- ENDIF -->
+<!-- BEGIN pagination -->
+ <!-- IF pagination.S_IS_PREV -->
+ <li class="previous"><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a></li>
+ <!-- ELSEIF pagination.S_IS_CURRENT -->
+ <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
+ <li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF pagination.S_IS_NEXT -->
+ <li class="next"><a href="{pagination.PAGE_URL}">{L_NEXT}</a></li>
+ <!-- ELSE -->
+ <li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+<!-- END pagination -->
+</ul>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index c747dd01f5..51aaeb937e 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -59,11 +59,11 @@
<div class="pagination">
<!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
- {TOTAL_TOPICS} &bull;
+ {TOTAL_TOPICS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -233,11 +233,11 @@
<div class="pagination">
<!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
- {TOTAL_TOPICS} &bull;
+ {TOTAL_TOPICS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index fb0b9733e7..2133f9a21a 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -51,11 +51,11 @@
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS} &bull;
+ <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
<!-- ENDIF -->
@@ -352,11 +352,11 @@
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- {TOTAL_POSTS} &bull;
+ {TOTAL_POSTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
<!-- ENDIF -->