aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet-admin.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/fixmystreet-admin.js')
-rw-r--r--web/js/fixmystreet-admin.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/js/fixmystreet-admin.js b/web/js/fixmystreet-admin.js
index 8191fc254..0323b1742 100644
--- a/web/js/fixmystreet-admin.js
+++ b/web/js/fixmystreet-admin.js
@@ -31,6 +31,13 @@ $(function(){
});
}
+ // Some lists of checkboxes have 'select all/none' links at the top
+ $("a[data-select-none], a[data-select-all]").click(function(e) {
+ e.preventDefault();
+ var checked = $(this).filter('[data-select-all]').length > 0;
+ $(this).closest("ul").find('input[type=checkbox]').prop('checked', checked);
+ });
+
// admin hints: maybe better implemented as tooltips?
$(".admin-hint").on('click', function(){