aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'ihatemoney/static/js')
-rw-r--r--ihatemoney/static/js/ihatemoney.js25
1 files changed, 7 insertions, 18 deletions
diff --git a/ihatemoney/static/js/ihatemoney.js b/ihatemoney/static/js/ihatemoney.js
index 24e82b7..c240dc1 100644
--- a/ihatemoney/static/js/ihatemoney.js
+++ b/ihatemoney/static/js/ihatemoney.js
@@ -1,18 +1,7 @@
- // Add scripts to select all or non of the checkboxes in the add_bill form
-function selectall()
- {
- var els = document.getElementsByName('payed_for');
- for(var i =0;i<els.length;i++)
- {
- els[i].checked=true;
- }
- }
-function selectnone()
- {
- var els = document.getElementsByName('payed_for');
- for(var i =0;i<els.length;i++)
- {
- els[i].checked=false;
- }
- }
-
+ // Utility to select all or none of the checkboxes in the add_bill form.
+function selectCheckboxes(value){
+ var els = document.getElementsByName('payed_for');
+ for(var i = 0; i < els.length; i++){
+ els[i].checked = value;
+ }
+}