[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA4-397-g4c214a1

Marc Delisle lem9 at users.sourceforge.net
Sat Mar 19 20:29:56 CET 2011


The branch, master has been updated
       via  4c214a105bbdc91168e2404601e9cf961aab52ed (commit)
      from  f5954a7d2f1ba1ca115ef057a6e0e47e01698678 (commit)


- Log -----------------------------------------------------------------
commit 4c214a105bbdc91168e2404601e9cf961aab52ed
Author: Marc Delisle <marc at infomarc.info>
Date:   Sat Mar 19 15:28:23 2011 -0400

    - In Browse mode, move the Show dialog on its own line
    - Put the Next and End buttons are the very right side of the line of
      buttons

-----------------------------------------------------------------------

Summary of changes:
 libraries/display_tbl.lib.php |  134 ++++++++++++++++++-----------------------
 1 files changed, 59 insertions(+), 75 deletions(-)

diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 9c98f61..d8e29e1 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -289,74 +289,6 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
         PMA_displayTableNavigationOneButton('<', __('Previous'), $pos_prev, $html_sql_query);
 
     } // end move back
-    ?>
-<td>
-       
-</td>
-<td align="center">
-<?php // if displaying a VIEW, $unlim_num_rows could be zero because
-      // of $cfg['MaxExactCountViews']; in this case, avoid passing
-      // the 5th parameter to checkFormElementInRange()
-      // (this means we can't validate the upper limit ?>
-    <form action="sql.php" method="post"
-onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 1) && checkFormElementInRange(this, 'pos', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 0<?php echo $unlim_num_rows > 0 ? ',' . $unlim_num_rows - 1 : ''; ?>))">
-        <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
-        <input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
-        <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
-        <input type="submit" name="navig" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?> value="<?php echo __('Show'); ?> :" />
-        <input type="text" name="session_max_rows" size="3" value="<?php echo (($_SESSION['tmp_user_values']['max_rows'] != 'all') ? $_SESSION['tmp_user_values']['max_rows'] : $GLOBALS['cfg']['MaxRows']); ?>" class="textfield" onfocus="this.select()" />
-        <?php echo __('row(s) starting from row #') . "\n"; ?>
-        <input type="text" name="pos" size="6" value="<?php echo (($pos_next >= $unlim_num_rows) ? 0 : $pos_next); ?>" class="textfield" onfocus="this.select()" />
-        <br />
-    <?php
-    // Display mode (horizontal/vertical and repeat headers)
-    $choices = array(
-        'horizontal'        => __('horizontal'),
-        'horizontalflipped' => __('horizontal (rotated headers)'),
-        'vertical'          => __('vertical'));
-    $param1 = PMA_generate_html_dropdown('disp_direction', $choices, $_SESSION['tmp_user_values']['disp_direction'], $id_for_direction_dropdown);
-    unset($choices);
-
-    $param2 = '            <input type="text" size="3" name="repeat_cells" value="' . $_SESSION['tmp_user_values']['repeat_cells'] . '" class="textfield" />' . "\n"
-            . '           ';
-    echo '    ' . sprintf(__('in %s mode and repeat headers after %s cells'), "\n" . $param1, "\n" . $param2) . "\n";
-    ?>
-    </form>
-</td>
-<td>
-       
-</td>
-    <?php
-    // Move to the next page or to the last one
-    if (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows) && $num_rows >= $_SESSION['tmp_user_values']['max_rows']
-        && $_SESSION['tmp_user_values']['max_rows'] != 'all') {
-
-        // display the Next button
-        PMA_displayTableNavigationOneButton('>',
-            __('Next'),
-            $pos_next,
-            $html_sql_query);
-
-        // prepare some options for the End button
-        if ($is_innodb && $unlim_num_rows > $GLOBALS['cfg']['MaxExactCount']) {
-            $input_for_real_end = '<input id="real_end_input" type="hidden" name="find_real_end" value="1" />';
-            // no backquote around this message
-            $onclick = '';
-        } else {
-            $input_for_real_end = $onclick = '';
-        }
-
-        // display the End button
-        PMA_displayTableNavigationOneButton('>>',
-            __('End'),
-            @((ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows'])- 1) * $_SESSION['tmp_user_values']['max_rows']),
-            $html_sql_query,
-            'onsubmit="return ' . (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows && $num_rows >= $_SESSION['tmp_user_values']['max_rows']) ? 'true' : 'false') . '"',
-            $input_for_real_end,
-            $onclick
-            );
-    } // end move toward
-
 
     //page redirection
     // (unless we are showing all records)
@@ -367,9 +299,6 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
         if ($nbTotalPage > 1){ //if2
        ?>
    <td>
-          
-   </td>
-   <td>
         <?php
             $_url_params = array(
                 'db'        => $db,
@@ -403,9 +332,6 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
         echo "\n";
         ?>
 <td>
-       
-</td>
-<td>
     <form action="sql.php" method="post">
         <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
         <input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
@@ -417,11 +343,69 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
 </td>
         <?php
     } // end show all
-    echo "\n";
+
+    // Move to the next page or to the last one
+    if (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows) && $num_rows >= $_SESSION['tmp_user_values']['max_rows']
+        && $_SESSION['tmp_user_values']['max_rows'] != 'all') {
+
+        // display the Next button
+        PMA_displayTableNavigationOneButton('>',
+            __('Next'),
+            $pos_next,
+            $html_sql_query);
+
+        // prepare some options for the End button
+        if ($is_innodb && $unlim_num_rows > $GLOBALS['cfg']['MaxExactCount']) {
+            $input_for_real_end = '<input id="real_end_input" type="hidden" name="find_real_end" value="1" />';
+            // no backquote around this message
+            $onclick = '';
+        } else {
+            $input_for_real_end = $onclick = '';
+        }
+
+        // display the End button
+        PMA_displayTableNavigationOneButton('>>',
+            __('End'),
+            @((ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows'])- 1) * $_SESSION['tmp_user_values']['max_rows']),
+            $html_sql_query,
+            'onsubmit="return ' . (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows && $num_rows >= $_SESSION['tmp_user_values']['max_rows']) ? 'true' : 'false') . '"',
+            $input_for_real_end,
+            $onclick
+            );
+    } // end move toward
     ?>
 </tr>
 </table>
 
+<?php // if displaying a VIEW, $unlim_num_rows could be zero because
+      // of $cfg['MaxExactCountViews']; in this case, avoid passing
+      // the 5th parameter to checkFormElementInRange()
+      // (this means we can't validate the upper limit ?>
+<div>
+    <form action="sql.php" method="post"
+onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 1) && checkFormElementInRange(this, 'pos', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 0<?php echo $unlim_num_rows > 0 ? ',' . $unlim_num_rows - 1 : ''; ?>))">
+        <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
+        <input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
+        <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
+        <input type="submit" name="navig" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?> value="<?php echo __('Show'); ?> :" />
+        <input type="text" name="session_max_rows" size="3" value="<?php echo (($_SESSION['tmp_user_values']['max_rows'] != 'all') ? $_SESSION['tmp_user_values']['max_rows'] : $GLOBALS['cfg']['MaxRows']); ?>" class="textfield" onfocus="this.select()" />
+        <?php echo __('row(s) starting from row #') . "\n"; ?>
+        <input type="text" name="pos" size="6" value="<?php echo (($pos_next >= $unlim_num_rows) ? 0 : $pos_next); ?>" class="textfield" onfocus="this.select()" />
+    <?php
+    // Display mode (horizontal/vertical and repeat headers)
+    $choices = array(
+        'horizontal'        => __('horizontal'),
+        'horizontalflipped' => __('horizontal (rotated headers)'),
+        'vertical'          => __('vertical'));
+    $param1 = PMA_generate_html_dropdown('disp_direction', $choices, $_SESSION['tmp_user_values']['disp_direction'], $id_for_direction_dropdown);
+    unset($choices);
+
+    $param2 = '            <input type="text" size="3" name="repeat_cells" value="' . $_SESSION['tmp_user_values']['repeat_cells'] . '" class="textfield" />' . "\n"
+            . '           ';
+    echo '    ' . sprintf(__('in %s mode and repeat headers after %s cells'), "\n" . $param1, "\n" . $param2) . "\n";
+    ?>
+    </form>
+</div>
     <?php
 } // end of the 'PMA_displayTableNavigation()' function
 


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list