Sha256: 9e8867e8ad03f7c30833e8948bebc7ddc6d9141b6548945ea8f1bbb59b1cf913
Contents?: true
Size: 716 Bytes
Versions: 13
Compression:
Stored size: 716 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).attr('data-role', @model.get('role')) @$('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
13 entries across 13 versions & 2 rubygems