Ability to jump to any page by JavaScript

This commit is contained in:
Jakub Vrana 2010-06-29 15:17:27 +02:00
parent 07fd522905
commit 5a11c99e71
2 changed files with 2 additions and 1 deletions

View file

@ -362,7 +362,7 @@ if (!$columns) {
if (intval($limit) && $found_rows > $limit) { if (intval($limit) && $found_rows > $limit) {
// display first, previous 4, next 4 and last page // display first, previous 4, next 4 and last page
$max_page = floor(($found_rows - 1) / $limit); $max_page = floor(($found_rows - 1) / $limit);
echo lang('Page') . ":" . pagination(0, $page) . ($page > 5 ? " ..." : ""); echo '<a href="' . h(remove_from_uri("page")) . "\" onclick=\"var page = +prompt('" . lang('Page') . "', '" . ($page + 1) . "'); if (!isNaN(page) &amp;&amp; page) location.href = this.href + (page != 1 ? '&amp;page=' + (page - 1) : ''); return false;\">" . lang('Page') . "</a>:" . pagination(0, $page) . ($page > 5 ? " ..." : "");
for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) { for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) {
echo pagination($i, $page); echo pagination($i, $page);
} }

View file

@ -14,6 +14,7 @@ Disable spellchecking in SQL textareas
Display auto_increment value of inserted item Display auto_increment value of inserted item
Allow disabling auto_increment value export Allow disabling auto_increment value export
Prefill auto_increment column name Prefill auto_increment column name
Ability to jump to any page by JavaScript
Link last page above data in select Link last page above data in select
Link table names in SQL queries Link table names in SQL queries
Japanese translation Japanese translation