Sha256: 99b2ede40c48c24d82c368bdbd3e639a4d83f7f8365a84cba5c3fe0da32f9671

Contents?: true

Size: 641 Bytes

Versions: 15

Compression:

Stored size: 641 Bytes

Contents

# http://eonasdan.github.io/bootstrap-datetimepicker/Options/

initialize = ->
  $('input.effective_date_time_picker:not(.initialized)').each (i, element) ->
    element = $(element)
    options = element.data('input-js-options') || {}

    element.addClass('initialized').datetimepicker(options)

$ -> initialize()
$(document).on 'page:change', -> initialize()
$(document).on 'turbolinks:load', -> initialize()
$(document).on 'turbolinks:render', -> initialize()
$(document).on 'cocoon:after-insert', -> initialize()
$(document).on 'turbolinks:before-cache', ->
  $('input.effective_date_time_picker.initialized').datetimepicker('destroy')

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
effective_form_inputs-1.1.11 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.10 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.9 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.8 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.7 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.6 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.5 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.4 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.3 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.2 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.1 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.1.0 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.0.9 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.0.8 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee
effective_form_inputs-1.0.7 app/assets/javascripts/effective_date_time_picker/initialize.js.coffee