]> git.joonet.de Git - adminer.git/commitdiff
Ability to jump to any page by JavaScript
authorJakub Vrana <jakub@vrana.cz>
Tue, 29 Jun 2010 13:17:27 +0000 (15:17 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 1 Jul 2010 07:59:18 +0000 (09:59 +0200)
adminer/select.inc.php
changes.txt

index ded22ef1a40b517ed7f55eecb08b09714f972c7a..1711d6f1de283be01d8a2080d72a09e18c979a5c 100644 (file)
@@ -362,7 +362,7 @@ if (!$columns) {
                        if (intval($limit) && $found_rows > $limit) {
                                // display first, previous 4, next 4 and last page
                                $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++) {
                                        echo pagination($i, $page);
                                }
index 0e78f32f94ef092f04315e548e30e4e35b9a184f..5e8733a1ff298f15f69602714f6bd08c98095289 100644 (file)
@@ -14,6 +14,7 @@ Disable spellchecking in SQL textareas
 Display auto_increment value of inserted item
 Allow disabling auto_increment value export
 Prefill auto_increment column name
+Ability to jump to any page by JavaScript
 Link last page above data in select
 Link table names in SQL queries
 Japanese translation