browse mode page drop-down
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
||||
2003-03-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* user_password.php3, header.inc.php3, libraries/user_password.js:
|
||||
put back js functions for user password change (= old user_details.js)
|
||||
* libraries/display_tbl.lib.php3, functions.js: new feature:
|
||||
browse mode page drop-down, thanks to Alexis Soulard (alexis_soulard)
|
||||
|
||||
2003-03-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* pdf_pages.php3: Automatic layout of tables on the schema
|
||||
|
@@ -348,6 +348,40 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
||||
<?php
|
||||
} // end move toward
|
||||
|
||||
|
||||
//page redirection
|
||||
$pageNow = @floor($pos / $session_max_rows) + 1;
|
||||
$nbTotalPage = @ceil($unlim_num_rows / $session_max_rows);
|
||||
|
||||
if ($nbTotalPage > 1){ //if1
|
||||
?>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php //<form> for keep the form alignment of button < and << ?>
|
||||
<form>
|
||||
<?php echo $GLOBALS['strPageNumber']; ?>
|
||||
<SELECT NAME="goToPage" onChange="goToUrl(this, '<?php echo "sql.php3?sql_query=".$encoded_query."&session_max_rows=".$session_max_rows."&disp_direction=".$disp_direction."&repeat_cells=".$repeat_cells."&goto=".$goto."&dontlimitchars=".$dontlimitchars."&".PMA_generate_common_url($db, $table)."&"; ?>')">
|
||||
|
||||
<?php
|
||||
for ($i=1; $i<=$nbTotalPage; $i++){
|
||||
if ($i == $pageNow) {
|
||||
$selected = 'selected="selected"';
|
||||
} else {
|
||||
$selected = "";
|
||||
}
|
||||
echo " <option ".$selected." value=\"".(($i - 1) * $session_max_rows)."\">".$i."</option>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
</SELECT>
|
||||
</form>
|
||||
</td>
|
||||
<?php
|
||||
} //_if1
|
||||
|
||||
|
||||
// Show all the records if allowed
|
||||
if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) {
|
||||
echo "\n";
|
||||
|
@@ -635,3 +635,10 @@ function onKeyDownArrowsHandler(e) {
|
||||
}
|
||||
e.returnValue = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* listbox redirection
|
||||
*/
|
||||
function goToUrl(selObj, goToLocation){
|
||||
eval("document.location.href = '" + goToLocation + "pos=" + selObj.options[selObj.selectedIndex].value + "'");
|
||||
}
|
||||
|
Reference in New Issue
Block a user