Merged patch #534660 - Check All / Uncheck All

This commit is contained in:
Loïc Chapeaux
2002-03-25 20:45:17 +00:00
parent 9824c1023f
commit f82a7df92b
2 changed files with 13 additions and 4 deletions

View File

@@ -10,6 +10,9 @@ $Source$
lang/russian-win1251.inc.php3: updated thanks to
Alvar Soome <finsoft at users.sourceforge.net>, Sandis J<>rics and
Artyom Rabzonov <tyomych at gmx.net>.
* db_details.php3, line 386: fixed a js error.
* libraries/functions.js, lines 412-422: merged patch
#534660 - Check All / Uncheck All, thanks to "Leblanc".
2002-03-24 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* user_details.php3, line 1191: fixed bug #534159 - Can't change user

View File

@@ -409,11 +409,17 @@ function setPointer(theRow, theAction, theDefaultColor, thePointerColor, theMark
function setCheckboxes(the_form, do_check)
{
var elts = document.forms[the_form].elements['selected_tbl[]'];
var elts_cnt = elts.length;
var elts_cnt = (typeof(elts.length) != 'undefined')
? elts.length
: 0;
if (elts_cnt) {
for (var i = 0; i < elts_cnt; i++) {
elts[i].checked = do_check;
} // end for
} else {
elts.checked = do_check;
} // end if... else
return true;
} // end of the 'setCheckboxes()' function