aboutsummaryrefslogtreecommitdiff
path: root/htdocs
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-09-24 17:27:20 +1000
committerJeremy Kerr <jk@ozlabs.org>2008-09-24 17:27:20 +1000
commit2087fbfd96a42340e2a9057fe78cac4c3524b424 (patch)
tree94a04f5604d7a4f412a13f9354f3618510ba58e3 /htdocs
parent70e029436057b8a734c2b943ab2de8069b1fbd6a (diff)
downloadpatchwork-2087fbfd96a42340e2a9057fe78cac4c3524b424.tar
patchwork-2087fbfd96a42340e2a9057fe78cac4c3524b424.tar.gz
[html] Add select-all checkbox for patch lists
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/js/common.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/htdocs/js/common.js b/htdocs/js/common.js
index c87a5f9..f725693 100644
--- a/htdocs/js/common.js
+++ b/htdocs/js/common.js
@@ -4,3 +4,22 @@ function confirm_delete(type, name)
return confirm("Are you sure you want to delete the " + type +
" '" + name + "'?");
}
+
+function select_all(obj)
+{
+ var value = obj.checked;
+ var form = obj.form;
+
+ select_all_checkbox = obj;
+
+ for (var i = 0; i < form.elements.length; i++ ) {
+ var element = form.elements[i];
+ if (element.type != 'checkbox') {
+ continue;
+ }
+ if (element.name.substring(0, 9) != 'patch_id:') {
+ continue;
+ }
+ element.checked = value;
+ }
+}