summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/application.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 1674044f8..3becbeb21 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -10,6 +10,13 @@ function checkAll (id, checked) {
}
}
+function toggleCheckboxesBySelector(selector) {
+ boxes = $$(selector);
+ var all_checked = true;
+ for (i = 0; i < boxes.length; i++) { if (boxes[i].checked == false) { all_checked = false; } }
+ for (i = 0; i < boxes.length; i++) { boxes[i].checked = !all_checked; }
+}
+
function showAndScrollTo(id, focus) {
Element.show(id);
if (focus!=null) { Form.Element.focus(focus); }