adds select all/none to bulk moderation
This commit is contained in:
@@ -32,6 +32,7 @@ var initialize_modules = function() {
|
||||
App.Stats.initialize();
|
||||
App.Dropdown.initialize();
|
||||
App.LocationChanger.initialize();
|
||||
App.CheckAllNone.initialize();
|
||||
};
|
||||
|
||||
$(function(){
|
||||
|
||||
13
app/assets/javascripts/check_all_none.js.coffee
Normal file
13
app/assets/javascripts/check_all_none.js.coffee
Normal 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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user