adds select all/none to bulk moderation

This commit is contained in:
kikito
2015-09-08 20:46:18 +02:00
parent b9ebe8c2c4
commit 48ba9a436d
6 changed files with 47 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ var initialize_modules = function() {
App.Stats.initialize();
App.Dropdown.initialize();
App.LocationChanger.initialize();
App.CheckAllNone.initialize();
};
$(function(){

View File

@@ -0,0 +1,13 @@
App.CheckAllNone =
initialize: ->
$('[data-check-all]').on 'click', ->
target_name = $(this).data('check-all')
$("[name='" + target_name + "']").prop('checked', true)
$('[data-check-none]').on 'click', ->
target_name = $(this).data('check-none')
$("[name='" + target_name + "']").prop('checked', false)