From: Bill Erickson Date: Fri, 28 Sep 2012 20:53:05 +0000 (-0400) Subject: "Select All" option in invoice search results X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ee8d5613cd3bc469678deece795fb43adb0e8f91;p=evergreen%2Fpines.git "Select All" option in invoice search results Adds a new Select All checkbox along the top of the invoice search results page. Signed-off-by: Bill Erickson Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/templates/acq/invoice/view.tt2 b/Open-ILS/src/templates/acq/invoice/view.tt2 index c1a7aa71f3..27f2916ae8 100644 --- a/Open-ILS/src/templates/acq/invoice/view.tt2 +++ b/Open-ILS/src/templates/acq/invoice/view.tt2 @@ -261,6 +261,9 @@ +
+  [% l('Select All') %] +
[% l('No Results') %]
diff --git a/Open-ILS/web/js/ui/default/acq/invoice/view.js b/Open-ILS/web/js/ui/default/acq/invoice/view.js index bd1ff0a19b..2036f6f5ff 100644 --- a/Open-ILS/web/js/ui/default/acq/invoice/view.js +++ b/Open-ILS/web/js/ui/default/acq/invoice/view.js @@ -411,11 +411,19 @@ function addSelectedToInvoice() { doAttachLi(true); } +allResSelected = false; function clearSearchResTable() { + allResSelected = false; while (resultsTbody.childNodes[0]) resultsTbody.removeChild(resultsTbody.childNodes[0]); } +function selectSearchResults() { + allResSelected = !allResSelected; + dojo.query('[name=search-results-checkbox]').forEach( + function(input) { input.checked = allResSelected }); +} + function updateTotalCost() { var totalCost = 0;