From ee8d5613cd3bc469678deece795fb43adb0e8f91 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 28 Sep 2012 16:53:05 -0400 Subject: [PATCH] "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 --- Open-ILS/src/templates/acq/invoice/view.tt2 | 3 +++ Open-ILS/web/js/ui/default/acq/invoice/view.js | 8 ++++++++ 2 files changed, 11 insertions(+) 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; -- 2.11.0