Sha256: eb23fcc141044189232599bdc32dc0ce6808c5c061546a02d0298d46d9b7eae2
Contents?: true
Size: 593 Bytes
Versions: 10
Compression:
Stored size: 593 Bytes
Contents
class @Select2Input.RelatedCollection extends Backbone.Collection comparator : 'position' initialize : () -> @on 'add', @addPosition @on 'relation-remove', @removeFromCollection addPosition : (model) -> model.set 'position', @length removeFromCollection : (model) => @remove model @_triggerChange() resort : () -> @sort() @_triggerChange() update : (data) -> @add new Select2Input.RelatedModel(data), merge : true @_triggerChange() getData : () -> @map (model) -> model.getData() _triggerChange : () -> @trigger 'data-change'
Version data entries
10 entries across 10 versions & 1 rubygems