Sha256: 98195c7d5b12e28f037bacf9fd2ecb57d79bf988030b9f2acce85f126b5fc35f
Contents?: true
Size: 788 Bytes
Versions: 64
Compression:
Stored size: 788 Bytes
Contents
pageflow.StorylinesCollection = Backbone.Collection.extend({ autoConsolidatePositions: false, mixins: [pageflow.orderedCollection], model: pageflow.Storyline, url: function() { return '/entries/' + pageflow.entry.get('id') + '/storylines'; }, initialize: function() { this.listenTo(this, 'change:main', function(model, value) { if (value) { this.each(function(storyline) { if (storyline.isMain() && storyline !== model) { storyline.configuration.unset('main'); } }); } }); }, main: function() { return this.find(function(storyline) { return storyline.configuration.get('main'); }) || this.first(); }, comparator: function(chapter) { return chapter.get('position'); } });
Version data entries
64 entries across 64 versions & 1 rubygems