checkall in table list

This commit is contained in:
Marc Delisle
2002-01-03 00:40:20 +00:00
parent 6140c74dad
commit 890073e60f
3 changed files with 47 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-01-02 Marc Delisle <lem9@users.sourceforge.net>
* db_details.php3, libraries/functions.js: feature 474742: add
check all/uncheck all in the table list
2002-01-01 Marc Delisle <lem9@users.sourceforge.net> 2002-01-01 Marc Delisle <lem9@users.sourceforge.net>
* tbl_replace.php3, bug 497919: $funcs was being reset() * tbl_replace.php3, bug 497919: $funcs was being reset()
but was not defined (for example, only 1 field of type 'set') but was not defined (for example, only 1 field of type 'set')

View File

@@ -59,7 +59,7 @@ window.parent.frames['nav'].location.replace('./left.php3?lang=<?php echo $lang;
/** /**
* Drop/delete mutliple tables if required * Drop/delete multiple tables if required
*/ */
if ((!empty($submit_mult) && isset($selected_tbl)) if ((!empty($submit_mult) && isset($selected_tbl))
|| isset($mult_btnDrop)) { || isset($mult_btnDrop)) {
@@ -147,7 +147,7 @@ if ($num_tables == 0) {
// 2. Shows table informations on mysql >= 3.23 - staybyte - 11 June 2001 // 2. Shows table informations on mysql >= 3.23 - staybyte - 11 June 2001
else if (PMA_MYSQL_INT_VERSION >= 32300) { else if (PMA_MYSQL_INT_VERSION >= 32300) {
?> ?>
<form action="db_details.php3"> <form name="tablesForm" action="db_details.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" /> <input type="hidden" name="db" value="<?php echo $db; ?>" />
@@ -331,6 +331,17 @@ else if (PMA_MYSQL_INT_VERSION >= 32300) {
<input type="submit" name="submit_mult" value="<?php echo $strPrintView; ?>" /> <input type="submit" name="submit_mult" value="<?php echo $strPrintView; ?>" />
</td> </td>
</tr> </tr>
<tr>
<td>
<a href="" onclick="setCheckboxes('tablesForm', true); return false;">
<?php echo $GLOBALS['strCheckAll']; ?></a>
</td>
<td>&nbsp;</td>
<td>
<a href="" onclick="setCheckboxes('tablesForm', false); return false;">
<?php echo $GLOBALS['strUncheckAll']; ?></a>
</td>
</tr>
</table> </table>
</form> </form>
@@ -407,8 +418,18 @@ else {
&nbsp;<?php $strOr . "\n"; ?>&nbsp; &nbsp;<?php $strOr . "\n"; ?>&nbsp;
<input type="submit" name="submit_mult" value="<?php echo $strEmpty; ?>" /> <input type="submit" name="submit_mult" value="<?php echo $strEmpty; ?>" />
</td> </td>
</tr>
<tr> <tr>
<td>
<a href="" onclick="setCheckboxes('tablesForm', true); return false;">
<?php echo $GLOBALS['strCheckAll']; ?></a>
</td>
<td>&nbsp;</td>
<td>
<a href="" onclick="setCheckboxes('tablesForm', false); return false;">
<?php echo $GLOBALS['strUncheckAll']; ?></a>
</td>
</tr>
</table> </table>
</form> </form>

View File

@@ -325,3 +325,22 @@ function setPointer(theRow, thePointerColor)
return true; return true;
} // end of the 'setPointer()' function } // end of the 'setPointer()' function
/**
* Checks/unchecks all tables
*
* @param string the form name
* @param boolean whether to check or to uncheck the element
*
* @return boolean always true
*/
function setCheckboxes(the_form, do_check) {
var elts = document.forms[the_form].elements['selected_tbl[]'];
var elts_cnt = elts.length;
for (var i = 0; i < elts_cnt; i++) {
elts[i].checked = do_check;
} // end for
return true;
} // end of the 'setCheckboxes()' function