Sha256: c9a29d0cf726649c6fcf02e993a5a0e00cc01ad8de6d1cdf45372b9bb1d7b07d
Contents?: true
Size: 586 Bytes
Versions: 10
Compression:
Stored size: 586 Bytes
Contents
Locomotive.Views.Inputs ||= {} class Locomotive.Views.Inputs.DocumentPickerView extends Backbone.View initialize: -> super @$input = @$('input[type=hidden]') @$link = @$('a.edit') render: -> label = @$input.data('label') Select2.helpers.build @$input, allowClear: true initSelection: (element, callback) -> callback(text: label) # hide the edit button if the user changes the selected document @$input.on 'select2-selecting', (el) => @$link.addClass('hide') remove: -> @$input.select2('destroy') super
Version data entries
10 entries across 10 versions & 1 rubygems