As we do in the rest of the application. Note we cannot add a rule enforcing double quotes because CoffeeScript Lint does not have such rule.
11 lines
329 B
CoffeeScript
11 lines
329 B
CoffeeScript
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)
|