patch #1873188 [GUI] Making db pager work when js is disabled

This commit is contained in:
Marc Delisle
2008-01-25 17:42:23 +00:00
parent ba4c8f9e9d
commit 0858e97184
2 changed files with 16 additions and 13 deletions

View File

@@ -11,6 +11,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1871038 [import] Notice: undefined variable first_sql_delimiter - bug #1871038 [import] Notice: undefined variable first_sql_delimiter
- bug #1873110 [export] Problem exporting with a LIMIT clause - bug #1873110 [export] Problem exporting with a LIMIT clause
- bug #1871164 [GUI] Empty and navigation frame synch. - bug #1871164 [GUI] Empty and navigation frame synch.
- patch #1873188 [GUI] Making db pager work when js is disabled,
thanks to Jürgen Wind - windkiel
2.11.4.0 (2008-01-12) 2.11.4.0 (2008-01-12)
- bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE - bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE

View File

@@ -2074,8 +2074,8 @@ function PMA_pageselector($url, $rows, $pageNow = 1, $nbTotalPage = 1,
$showAll = 200, $sliceStart = 5, $sliceEnd = 5, $percent = 20, $showAll = 200, $sliceStart = 5, $sliceEnd = 5, $percent = 20,
$range = 10, $prompt = '') $range = 10, $prompt = '')
{ {
$gotopage = $prompt $gotopage = $prompt
. ' <select name="goToPage" onchange="goToUrl(this, \'' . ' <select name="pos" onchange="goToUrl(this, \''
. $url . '\');">' . "\n"; . $url . '\');">' . "\n";
if ($nbTotalPage < $showAll) { if ($nbTotalPage < $showAll) {
$pages = range(1, $nbTotalPage); $pages = range(1, $nbTotalPage);
@@ -2139,24 +2139,25 @@ function PMA_pageselector($url, $rows, $pageNow = 1, $nbTotalPage = 1,
$gotopage .= ' <option ' . $selected . ' value="' . (($i - 1) * $rows) . '">' . $i . '</option>' . "\n"; $gotopage .= ' <option ' . $selected . ' value="' . (($i - 1) * $rows) . '">' . $i . '</option>' . "\n";
} }
$gotopage .= ' </select>'; $gotopage .= ' </select><noscript><input type="submit" value="' . $GLOBALS['strGo'] . '" /></noscript>';
return $gotopage; return $gotopage;
} // end function } // end function
/** /**
* Generate navigation for a list * Generate navigation for a list
* *
* @todo use $pos from $_url_params * @todo use $pos from $_url_params
* @uses $GLOBALS['strPageNumber'] * @uses $GLOBALS['strPageNumber']
* @uses range() * @uses range()
* @param integer number of elements in the list * @param integer number of elements in the list
* @param integer current position in the list * @param integer current position in the list
* @param array url parameters * @param array url parameters
* @param string script name for form target * @param string script name for form target
* @param string target frame * @param string target frame
* @param integer maximum number of elements to display from the list * @param integer maximum number of elements to display from the list
* *
* @access public * @access public
*/ */
@@ -2191,7 +2192,7 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
. $caption2 . '</a>'; . $caption2 . '</a>';
} }
echo '<form action="./' . $script . '" method="post">' . "\n"; echo "\n", '<form action="./', basename($script), '" method="post" target="', $frame, '">', "\n";
echo PMA_generate_common_hidden_inputs($_url_params); echo PMA_generate_common_hidden_inputs($_url_params);
echo PMA_pageselector( echo PMA_pageselector(
$script . PMA_generate_common_url($_url_params) . '&', $script . PMA_generate_common_url($_url_params) . '&',
@@ -2213,7 +2214,7 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
$title4 = ''; $title4 = '';
} // end if... else... } // end if... else...
$_url_params['pos'] = $pos + $max_count; $_url_params['pos'] = $pos + $max_count;
echo '<a' . $title3 . ' href="' . $script echo '<a' . $title3 . ' href="' . $script
. PMA_generate_common_url($_url_params) . '" target="' . $frame . '">' . PMA_generate_common_url($_url_params) . '" target="' . $frame . '">'
. $caption3 . '</a>'; . $caption3 . '</a>';
$_url_params['pos'] = floor($count / $max_count) * $max_count; $_url_params['pos'] = floor($count / $max_count) * $max_count;