diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 96cc368b..edc77b3f 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -361,14 +361,8 @@ class lamList { " onMouseOut=\"list_out(this, '" . $rowID . "', '" . $this->type . "')\"\n" . " onClick=\"list_click(this, '" . $rowID . "', '" . $this->type . "')\"\n" . " onDblClick=\"top.location.href='../account/edit.php?type=" . $this->type . "&DN=" . rawurlencode($info[$i]['dn']) . "'\">\n"); - if (isset($_GET['selectall'])) { - echo " type . "')\"" . - " type=\"checkbox\" checked name=\"" . $rowID . "\">\n"; - } - else { - echo " type . "')\"" . - " type=\"checkbox\" name=\"" . $rowID . "\">\n"; - } + echo " type . "')\"" . + " type=\"checkbox\" name=\"" . $rowID . "\">\n"; echo " "; $this->listPrintToolLinks($info[$i], $rowID); echo "\n"; @@ -384,8 +378,7 @@ class lamList { $colspan = sizeof($this->attrArray) + 1; echo "type . "list\">\n"; echo "\"select\n"; - echo " type . "&norefresh=y&page=" . $this->page . - "&sort=" . $this->sortColumn . $this->filterText . "&selectall=yes\">" . + echo " " . "" . _("Select all") . "\n"; echo "\n"; echo (""); diff --git a/lam/templates/lib/list.js b/lam/templates/lib/list.js index c20dccd7..eff00f18 100644 --- a/lam/templates/lib/list.js +++ b/lam/templates/lib/list.js @@ -83,3 +83,19 @@ function addResizeHandler(item, min, max) { } ); } + +/** + * Selects/deselects all accounts on the page. + */ +function list_switchAccountSelection() { + // set checkbox selection + jQuery('.accountBoxUnchecked').attr('checked', 'checked'); + jQuery('.accountBoxChecked').removeAttr('checked'); + // switch CSS class + nowChecked = jQuery('.accountBoxUnchecked'); + nowUnchecked = jQuery('.accountBoxChecked'); + nowChecked.addClass('accountBoxChecked'); + nowChecked.removeClass('accountBoxUnchecked'); + nowUnchecked.addClass('accountBoxUnchecked'); + nowUnchecked.removeClass('accountBoxChecked'); +}