Sha256: 1f2d6a7046b7dcdb6794c3dd5cd106dc9a19cac51cd0b20a36a2d19e3cc32607

Contents?: true

Size: 835 Bytes

Versions: 5

Compression:

Stored size: 835 Bytes

Contents

# Initializers
$ ->
  # jQuery datepickers (also evaluates dynamically added HTML)
  $(document).on 'focus', '.datepicker:not(.hasDatepicker)', ->
    defaults = dateFormat: 'yy-mm-dd'
    options = $(@).data 'datepicker-options'
    $(@).datepicker $.extend(defaults, options)

  # Clear Filters button
  $('.clear_filters_btn').click ->
    window.location.search = ''

  # Batch Actions dropdown
  $('.dropdown_button').popover()

  # Filter form: don't send any inputs that are empty
  $('.filter_form').submit ->
    $(@).find(':input').filter(-> @value is '').prop 'disabled', true

  # Filter form: for filters that let you choose the query method from
  # a dropdown, apply that choice to the filter input field.
  $('.filter_form_field.select_and_search select').change ->
    $(@).siblings('input').prop name: "q[#{@value}]"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yousty-activeadmin-1.0.4.pre app/assets/javascripts/active_admin/components/application.js.coffee
yousty-activeadmin-1.0.3.pre app/assets/javascripts/active_admin/components/application.js.coffee
yousty-activeadmin-1.0.2.pre app/assets/javascripts/active_admin/components/application.js.coffee
yousty-activeadmin-1.0.1.pre app/assets/javascripts/active_admin/components/application.js.coffee
yousty-activeadmin-1.0.0.pre app/assets/javascripts/active_admin/components/application.js.coffee