Sha256: ce0e2e2e8ec61a10213f9b93a382b2df699efb183623f1fbb15bfd756601308a
Contents?: true
Size: 782 Bytes
Versions: 30
Compression:
Stored size: 782 Bytes
Contents
Locomotive.Views.Sites ||= {} class Locomotive.Views.Sites.MembershipEntryView extends Backbone.View className: 'entry' events: 'change select' : 'change' 'click a.remove': 'remove' render: -> data = @model.toJSON() data.index = @options.index $(@el).html(ich.membership_entry(data)) $(@el).data('role', @model.get('role')) $(@el).attr('data-role', @model.get('role')) # for testing purpose @$('select').val(@model.get('role')) return @ change: (event) -> value = $(event.target).val() @options.parent_view.change_entry(@model, value) remove: (event) -> event.stopPropagation() & event.preventDefault() @$('select').editableField('destroy') @options.parent_view.remove_entry(@model) super()
Version data entries
30 entries across 30 versions & 1 rubygems