Sha256: 5c2a7f2aa6e73c8a383589608aa739840e3a5d5d00d889cac6d7ea7e32326f22
Contents?: true
Size: 778 Bytes
Versions: 12
Compression:
Stored size: 778 Bytes
Contents
pageflow.ChapterItemView = Backbone.Marionette.ItemView.extend({ tagName: 'li', template: 'templates/chapter_item', ui: { title: '> a > .title', number: '> a > .number', pages: 'ul.pages' }, modelEvents: { change: 'update' }, onRender: function() { this.subview(new pageflow.SortableCollectionView({ el: this.ui.pages, collection: this.model.pages, itemViewConstructor: this.options.pageItemView || pageflow.NavigatablePageItemView, itemViewOptions: this.options.pageItemViewOptions, connectWith: 'ul.pages' })); this.update(); }, update: function() { this.ui.title.text(this.model.get('title') || '(Unbenannt)'); this.ui.number.text('Kapitel ' + (this.model.get('position') + 1)); } });
Version data entries
12 entries across 12 versions & 1 rubygems