Sha256: 18d91b25a1dac3be0a589128cb1f3ea3e18bc4a2a24482dee7f350f805dab06e
Contents?: true
Size: 489 Bytes
Versions: 15
Compression:
Stored size: 489 Bytes
Contents
Locomotive.Views.Shared ||= {} Locomotive.Views.Shared.Fields ||= {} class Locomotive.Views.Shared.Fields.BelongsToView extends Locomotive.Views.Shared.Fields.RelationshipView render: -> @enable_select2() return @ enable_select2: -> options = $(@el).data() options.init_selection_fn = (el, callback) -> callback(id: el.val(), text: options.value) super($(@el), options) $(@el).on 'select2-selecting', (el) => @model.set "#{@options.name}_id", el.val
Version data entries
15 entries across 15 versions & 1 rubygems